diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py
--- a/rhodecode/controllers/files.py
+++ b/rhodecode/controllers/files.py
@@ -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}
diff --git a/rhodecode/public/js/rhodecode.js b/rhodecode/public/js/rhodecode.js
--- a/rhodecode/public/js/rhodecode.js
+++ b/rhodecode/public/js/rhodecode.js
@@ -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('
{2} | |
'.format(t,node_url.replace('__FPATH__',n),n_hl));
}
if(match.length >= matches_max){
- match.push('{0} | |
'.format(truncated_lbl));
+ match.push('{0} | |
'.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('{0} | |
'.format(nomatch_lbl));
+ match.push('{0} | |
'.format(_TM['no matching files']));
}
YUD.get('tbody_filtered').innerHTML = match.join("");
diff --git a/rhodecode/templates/base/root.html b/rhodecode/templates/base/root.html
--- a/rhodecode/templates/base/root.html
+++ b/rhodecode/templates/base/root.html
@@ -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;
diff --git a/rhodecode/templates/files/files.html b/rhodecode/templates/files/files.html
--- a/rhodecode/templates/files/files.html
+++ b/rhodecode/templates/files/files.html
@@ -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);
%def>