Changeset - 9812e617c564
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-10-02 23:24:41
marcin@python-works.com
fix files quick filter links
2 files changed with 9 insertions and 12 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -673,10 +673,7 @@ var removeReviewer = function(reviewer_i
 
}
 

	
 
var fileBrowserListeners = function(current_url, node_list_url, url_base){
 
	
 
	var current_url_branch = +"?branch=__BRANCH__";
 
	var url = url_base;
 
	var node_url = node_list_url;	
 

	
 
	YUE.on('stay_at_branch','click',function(e){
 
	    if(e.target.checked){
 
@@ -700,7 +697,7 @@ var fileBrowserListeners = function(curr
 
	  YUD.setStyle('search_activate_id','display','none');
 
	  YUD.setStyle('add_node_id','display','none');
 
	  YUC.initHeader('X-PARTIAL-XHR',true);
 
	  YUC.asyncRequest('GET',url,{
 
	  YUC.asyncRequest('GET', node_list_url, {
 
	      success:function(o){
 
	        nodes = JSON.parse(o.responseText).nodes;
 
	        YUD.setStyle('node_filter_box_loading','display','none');
 
@@ -743,8 +740,8 @@ var fileBrowserListeners = function(curr
 
	                    var n_hl = n.substring(0,pos)
 
	                      +"<b>{0}</b>".format(n.substring(pos,pos+query.length))
 
	                      +n.substring(pos+query.length)
 
	                    node_url = node_url.replace('__FPATH__',n);
 
	                    match.push('<tr><td><a class="browser-{0}" href="{1}">{2}</a></td><td colspan="5"></td></tr>'.format(t,node_url,n_hl));
 
	                    var new_url = url_base.replace('__FPATH__',n);
 
	                    match.push('<tr><td><a class="browser-{0}" href="{1}">{2}</a></td><td colspan="5"></td></tr>'.format(t,new_url,n_hl));
 
	                }
 
	                if(match.length >= matches_max){
 
	                    match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['search truncated']));
rhodecode/templates/files/files.html
Show inline comments
 
@@ -41,9 +41,9 @@
 
var CACHE = {};
 
var CACHE_EXPIRE = 60*1000; //cache for 60s
 
//used to construct links from the search list
 
var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
//send the nodelist request to this url
 
var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 

	
 
var ypjax_links = function(){
 
    YUE.on(YUQ('.ypjax-link'), 'click',function(e){
 
@@ -71,8 +71,8 @@ var ypjax_links = function(){
 

	
 
        var title = "${_('%s files') % c.repo_name}" + " - " + f_path;
 

	
 
        var _node_list_url = node_list_url.replace('__REV__',rev);
 
        var _url_base = url_base.replace('__REV__',rev).replace('__FPATH__', f_path);
 
        var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
 
        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,
 
@@ -132,8 +132,8 @@ YUE.onDOMReady(function(){
 
    var _State = {
 
       url: "${h.url.current()}",
 
       data: {
 
         node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}"),
 
         url_base: url_base.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}")
 
         node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
 
         url_base: url_base.replace('__REV__',"${c.changeset.raw_id}")
 
       }
 
    }
 
    fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
0 comments (0 inline, 0 general)