Show More
@@ -487,4 +487,4 b' class FilesController(BaseRepoController' | |||||
487 | cs = self.__get_cs_or_redirect(revision, repo_name) |
|
487 | cs = self.__get_cs_or_redirect(revision, repo_name) | |
488 | _d, _f = ScmModel().get_nodes(repo_name, cs.raw_id, f_path, |
|
488 | _d, _f = ScmModel().get_nodes(repo_name, cs.raw_id, f_path, | |
489 | flat=False) |
|
489 | flat=False) | |
490 | return _d + _f |
|
490 | return {'nodes': _d + _f} |
@@ -611,8 +611,8 b' var renderInlineComments = function(file' | |||||
611 | } |
|
611 | } | |
612 |
|
612 | |||
613 |
|
613 | |||
614 |
var fileBrowserListeners = function(current_url, node_list_url, url_base |
|
614 | var fileBrowserListeners = function(current_url, node_list_url, url_base){ | |
615 | truncated_lbl, nomatch_lbl){ |
|
615 | ||
616 | var current_url_branch = +"?branch=__BRANCH__"; |
|
616 | var current_url_branch = +"?branch=__BRANCH__"; | |
617 | var url = url_base; |
|
617 | var url = url_base; | |
618 | var node_url = node_list_url; |
|
618 | var node_url = node_list_url; | |
@@ -641,7 +641,7 b' var fileBrowserListeners = function(curr' | |||||
641 | YUC.initHeader('X-PARTIAL-XHR',true); |
|
641 | YUC.initHeader('X-PARTIAL-XHR',true); | |
642 | YUC.asyncRequest('GET',url,{ |
|
642 | YUC.asyncRequest('GET',url,{ | |
643 | success:function(o){ |
|
643 | success:function(o){ | |
644 | nodes = JSON.parse(o.responseText); |
|
644 | nodes = JSON.parse(o.responseText).nodes; | |
645 | YUD.setStyle('node_filter_box_loading','display','none'); |
|
645 | YUD.setStyle('node_filter_box_loading','display','none'); | |
646 | YUD.setStyle('node_filter_box','display',''); |
|
646 | YUD.setStyle('node_filter_box','display',''); | |
647 | n_filter.focus(); |
|
647 | n_filter.focus(); | |
@@ -685,9 +685,8 b' var fileBrowserListeners = function(curr' | |||||
685 | 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)); |
|
685 | 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)); | |
686 | } |
|
686 | } | |
687 | if(match.length >= matches_max){ |
|
687 | if(match.length >= matches_max){ | |
688 |
match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(truncated |
|
688 | match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['search truncated'])); | |
689 | } |
|
689 | } | |
690 |
|
||||
691 | } |
|
690 | } | |
692 | } |
|
691 | } | |
693 | if(query != ""){ |
|
692 | if(query != ""){ | |
@@ -695,7 +694,7 b' var fileBrowserListeners = function(curr' | |||||
695 | YUD.setStyle('tbody_filtered','display',''); |
|
694 | YUD.setStyle('tbody_filtered','display',''); | |
696 |
|
695 | |||
697 | if (match.length==0){ |
|
696 | if (match.length==0){ | |
698 |
match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format( |
|
697 | match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format(_TM['no matching files'])); | |
699 | } |
|
698 | } | |
700 |
|
699 | |||
701 | YUD.get('tbody_filtered').innerHTML = match.join(""); |
|
700 | YUD.get('tbody_filtered').innerHTML = match.join(""); |
@@ -43,7 +43,9 b'' | |||||
43 | 'Stop following this repository':"${_('Stop following this repository')}", |
|
43 | 'Stop following this repository':"${_('Stop following this repository')}", | |
44 | 'Start following this repository':"${_('Start following this repository')}", |
|
44 | 'Start following this repository':"${_('Start following this repository')}", | |
45 | 'Group':"${_('Group')}", |
|
45 | 'Group':"${_('Group')}", | |
46 | 'members':"${_('members')}" |
|
46 | 'members':"${_('members')}", | |
|
47 | 'search truncated': "${_('search truncated')}", | |||
|
48 | 'no matching files': "${_('no matching files')}" | |||
47 |
|
49 | |||
48 | }; |
|
50 | }; | |
49 | var _TM = TRANSLATION_MAP; |
|
51 | var _TM = TRANSLATION_MAP; |
@@ -41,8 +41,6 b' var YPJAX_TITLE = "${c.repo_name} ${_(\'F' | |||||
41 | var current_url = "${h.url.current()}"; |
|
41 | var current_url = "${h.url.current()}"; | |
42 | var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path='__FPATH__')}'; |
|
42 | var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path='__FPATH__')}'; | |
43 | var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}'; |
|
43 | var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}'; | |
44 | var truncated_lbl = "${_('search truncated')}"; |
|
44 | fileBrowserListeners(current_url, node_list_url, url_base); | |
45 | var nomatch_lbl = "${_('no matching files')}"; |
|
|||
46 | fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl); |
|
|||
47 | </script> |
|
45 | </script> | |
48 | </%def> |
|
46 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now