Changeset - 55af73733793
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2018-12-25 20:23:42
mads@kiilerich.com
files: more cleanup of what history "state" actually is
1 file changed with 6 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/files/files.html
Show inline comments
 
@@ -80,9 +80,9 @@ var ypjax_links = function(){
 
        var _url_base = url_base.replace('__REV__',rev);
 

	
 
        // Change our States and save some data for handling events
 
        var data = {url:url,title:title, url_base:_url_base,
 
                    node_list_url:_node_list_url, rev:rev, f_path:f_path};
 
        History.pushState(data, title, url);
 
        var state = {url:url, title:title, url_base:_url_base,
 
                     node_list_url:_node_list_url, rev:rev, f_path:f_path};
 
        History.pushState(state, title, url);
 

	
 
        //now we're sure that we can do ypjax things
 
        e.preventDefault();
 
@@ -222,16 +222,9 @@ $(document).ready(function(){
 
    });
 

	
 
    // init the search filter
 
    var _State = {
 
       url: ${h.js(h.url.current())},
 
       data: {
 
         node_list_url: node_list_url.replace('__REV__',${h.js(c.changeset.raw_id)}).replace('__FPATH__', ${h.js(h.safe_unicode(c.file.path))}),
 
         url_base: url_base.replace('__REV__',${h.js(c.changeset.raw_id)}),
 
         rev:${h.js(c.changeset.raw_id)},
 
         f_path: ${h.js(h.safe_unicode(c.file.path))}
 
       }
 
    }
 
    fileBrowserListeners(_State.data.node_list_url, _State.data.url_base);
 
    var _node_list_url = node_list_url.replace('__REV__', ${h.js(c.changeset.raw_id)}).replace('__FPATH__', ${h.js(h.safe_unicode(c.file.path))});
 
    var _url_base = url_base.replace('__REV__', ${h.js(c.changeset.raw_id)});
 
    fileBrowserListeners(_node_list_url, _url_base);
 

	
 
    // change branch filter
 
    $("#branch_selector").select2({
0 comments (0 inline, 0 general)