##// END OF EJS Templates
fix files quick filter links
marcink -
r2891:9812e617 beta
parent child Browse files
Show More
@@ -673,10 +673,7 b' var removeReviewer = function(reviewer_i'
673 673 }
674 674
675 675 var fileBrowserListeners = function(current_url, node_list_url, url_base){
676
677 676 var current_url_branch = +"?branch=__BRANCH__";
678 var url = url_base;
679 var node_url = node_list_url;
680 677
681 678 YUE.on('stay_at_branch','click',function(e){
682 679 if(e.target.checked){
@@ -700,7 +697,7 b' var fileBrowserListeners = function(curr'
700 697 YUD.setStyle('search_activate_id','display','none');
701 698 YUD.setStyle('add_node_id','display','none');
702 699 YUC.initHeader('X-PARTIAL-XHR',true);
703 YUC.asyncRequest('GET',url,{
700 YUC.asyncRequest('GET', node_list_url, {
704 701 success:function(o){
705 702 nodes = JSON.parse(o.responseText).nodes;
706 703 YUD.setStyle('node_filter_box_loading','display','none');
@@ -743,8 +740,8 b' var fileBrowserListeners = function(curr'
743 740 var n_hl = n.substring(0,pos)
744 741 +"<b>{0}</b>".format(n.substring(pos,pos+query.length))
745 742 +n.substring(pos+query.length)
746 node_url = node_url.replace('__FPATH__',n);
747 match.push('<tr><td><a class="browser-{0}" href="{1}">{2}</a></td><td colspan="5"></td></tr>'.format(t,node_url,n_hl));
743 var new_url = url_base.replace('__FPATH__',n);
744 match.push('<tr><td><a class="browser-{0}" href="{1}">{2}</a></td><td colspan="5"></td></tr>'.format(t,new_url,n_hl));
748 745 }
749 746 if(match.length >= matches_max){
750 747 match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['search truncated']));
@@ -41,9 +41,9 b''
41 41 var CACHE = {};
42 42 var CACHE_EXPIRE = 60*1000; //cache for 60s
43 43 //used to construct links from the search list
44 var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
44 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
45 45 //send the nodelist request to this url
46 var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
46 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
47 47
48 48 var ypjax_links = function(){
49 49 YUE.on(YUQ('.ypjax-link'), 'click',function(e){
@@ -71,8 +71,8 b' var ypjax_links = function(){'
71 71
72 72 var title = "${_('%s files') % c.repo_name}" + " - " + f_path;
73 73
74 var _node_list_url = node_list_url.replace('__REV__',rev);
75 var _url_base = url_base.replace('__REV__',rev).replace('__FPATH__', f_path);
74 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
75 var _url_base = url_base.replace('__REV__',rev);
76 76
77 77 // Change our States and save some data for handling events
78 78 var data = {url:url,title:title, url_base:_url_base,
@@ -132,8 +132,8 b' YUE.onDOMReady(function(){'
132 132 var _State = {
133 133 url: "${h.url.current()}",
134 134 data: {
135 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}"),
136 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}")
135 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
136 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}")
137 137 }
138 138 }
139 139 fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
General Comments 0
You need to be logged in to leave comments. Login now