Changeset - 530bd12fc18a
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 13 years ago 2012-06-08 22:26:39
marcin@python-works.com
removed JSON array envelope from filter files function
- switched to translation map for labels in file filter
4 files changed with 10 insertions and 11 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -487,4 +487,4 @@ class FilesController(BaseRepoController
 
            cs = self.__get_cs_or_redirect(revision, repo_name)
 
            _d, _f = ScmModel().get_nodes(repo_name, cs.raw_id, f_path,
 
                                          flat=False)
 
            return _d + _f
 
            return {'nodes': _d + _f}
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -611,8 +611,8 @@ var renderInlineComments = function(file
 
}
 

	
 

	
 
var fileBrowserListeners = function(current_url, node_list_url, url_base,
 
									truncated_lbl, nomatch_lbl){
 
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;	
 
@@ -641,7 +641,7 @@ var fileBrowserListeners = function(curr
 
	  YUC.initHeader('X-PARTIAL-XHR',true);
 
	  YUC.asyncRequest('GET',url,{
 
	      success:function(o){
 
	        nodes = JSON.parse(o.responseText);
 
	        nodes = JSON.parse(o.responseText).nodes;
 
	        YUD.setStyle('node_filter_box_loading','display','none');
 
	        YUD.setStyle('node_filter_box','display','');
 
	        n_filter.focus();
 
@@ -685,9 +685,8 @@ var fileBrowserListeners = function(curr
 
	                    match.push('<tr><td><a class="browser-{0}" href="{1}">{2}</a></td><td colspan="5"></td></tr>'.format(t,node_url.replace('__FPATH__',n),n_hl));
 
	                }
 
	                if(match.length >= matches_max){
 
	                    match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(truncated_lbl));
 
	                    match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['search truncated']));
 
	                }
 
	                
 
	            }                       
 
	        }
 
	        if(query != ""){
 
@@ -695,7 +694,7 @@ var fileBrowserListeners = function(curr
 
	            YUD.setStyle('tbody_filtered','display','');
 
	            
 
	            if (match.length==0){
 
	              match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(nomatch_lbl));
 
	              match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['no matching files']));
 
	            }                           
 
	            
 
	            YUD.get('tbody_filtered').innerHTML = match.join("");   
rhodecode/templates/base/root.html
Show inline comments
 
@@ -43,7 +43,9 @@
 
                'Stop following this repository':"${_('Stop following this repository')}",
 
                'Start following this repository':"${_('Start following this repository')}",
 
                'Group':"${_('Group')}",
 
                'members':"${_('members')}"
 
                'members':"${_('members')}",
 
                'search truncated': "${_('search truncated')}",
 
                'no matching files': "${_('no matching files')}"                
 

	
 
            };
 
            var _TM = TRANSLATION_MAP;
rhodecode/templates/files/files.html
Show inline comments
 
@@ -41,8 +41,6 @@ var YPJAX_TITLE = "${c.repo_name} ${_('F
 
var current_url = "${h.url.current()}";
 
var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path='__FPATH__')}';
 
var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}';
 
var truncated_lbl = "${_('search truncated')}";
 
var nomatch_lbl = "${_('no matching files')}";
 
fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl);
 
fileBrowserListeners(current_url, node_list_url, url_base);
 
</script>
 
</%def>
0 comments (0 inline, 0 general)