Mercurial > kallithea
annotate rhodecode/templates/files/files.html @ 3603:eacd33e0c5b3 beta
use valid options for the top menu: repositories, journal, search and admin
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 26 Mar 2013 17:46:40 +0100 |
parents | 1f334a68d057 |
children | ec6354949623 |
rev | line source |
---|---|
128
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
106
diff
changeset
|
1 <%inherit file="/base/base.html"/> |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
3 <%def name="title(*args)"> |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
4 ${_('%s Files') % c.repo_name} |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
5 %if hasattr(c,'file'): |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
6 · ${c.file.path or '\\'} |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
7 %endif |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
8 · ${c.rhodecode_name} |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
10 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
11 <%def name="breadcrumbs_links()"> |
3532 | 12 ${_('Files')} |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1705
diff
changeset
|
13 %if c.file: |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
14 @ ${h.show_id(c.changeset)} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
15 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
16 </%def> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
17 |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <%def name="page_nav()"> |
3603
eacd33e0c5b3
use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents:
3582
diff
changeset
|
19 ${self.menu('repositories')} |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
21 |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <%def name="main()"> |
3552
7967d00e4692
Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents:
3532
diff
changeset
|
23 ${self.context_bar('files')} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
24 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
25 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
26 <div class="title"> |
644
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
27 ${self.breadcrumbs()} |
3197 | 28 <ul class="links"> |
29 <li> | |
30 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> | |
31 </li> | |
32 </ul> | |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
33 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
34 <div class="table"> |
3197 | 35 <div id="files_data"> |
36 <%include file='files_ypjax.html'/> | |
37 </div> | |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
38 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
39 </div> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
40 |
1699
623b228cf325
cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents:
644
diff
changeset
|
41 <script type="text/javascript"> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
42 var CACHE = {}; |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
43 var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
44 //used to construct links from the search list |
2891
9812e617c564
fix files quick filter links
Marcin Kuzminski <marcin@python-works.com>
parents:
2867
diff
changeset
|
45 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
46 //send the nodelist request to this url |
2891
9812e617c564
fix files quick filter links
Marcin Kuzminski <marcin@python-works.com>
parents:
2867
diff
changeset
|
47 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
48 // send the node history requst to this url |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
49 var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
50 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
51 var ypjax_links = function(){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
52 YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
53 |
3197 | 54 //don't do ypjax on middle click |
55 if(e.which == 2 || !History.enabled){ | |
56 return true; | |
57 } | |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
58 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
59 var el = e.currentTarget; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
60 var url = el.href; |
2691
e70be4cf96e8
fixed issues with non-ascii chars in new file browser
Marcin Kuzminski <marcin@python-works.com>
parents:
2687
diff
changeset
|
61 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
62 var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
63 _base_url = _base_url.replace('//','/') |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
64 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
65 //extract rev and the f_path from url. |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
66 parts = url.split(_base_url) |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
67 if(parts.length != 2){ |
3197 | 68 return false; |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
69 } |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
70 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
71 var parts2 = parts[1].split('/'); |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
72 var rev = parts2.shift(); // pop the first element which is the revision |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
73 var f_path = parts2.join('/'); |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
74 |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
75 //page title make this consistent with title() mako function on top |
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3552
diff
changeset
|
76 var title = "${_('%s Files') % c.repo_name}" + " · " + (f_path || '\\') + " · " + "${c.rhodecode_name}"; |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
77 |
2891
9812e617c564
fix files quick filter links
Marcin Kuzminski <marcin@python-works.com>
parents:
2867
diff
changeset
|
78 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
9812e617c564
fix files quick filter links
Marcin Kuzminski <marcin@python-works.com>
parents:
2867
diff
changeset
|
79 var _url_base = url_base.replace('__REV__',rev); |
2691
e70be4cf96e8
fixed issues with non-ascii chars in new file browser
Marcin Kuzminski <marcin@python-works.com>
parents:
2687
diff
changeset
|
80 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
81 // Change our States and save some data for handling events |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
82 var data = {url:url,title:title, url_base:_url_base, |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
83 node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
84 History.pushState(data, title, url); |
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
85 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
86 //now we're sure that we can do ypjax things |
2977
cff9d4e1d821
Fixed issue when node didn't exists at 'tip' and we tried calculate history based on that assumption.
Marcin Kuzminski <marcin@python-works.com>
parents:
2891
diff
changeset
|
87 YUE.preventDefault(e); |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
88 return false; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
89 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
90 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
91 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
92 var callbacks = function(State){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
93 ypjax_links(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
94 tooltip_activate(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
95 fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
3029
685ebc84c2e9
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3003
diff
changeset
|
96 |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
97 if(YUD.get('hlcode')){ |
3197 | 98 YUE.on('hlcode', 'mouseup', getSelectionLink); |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
99 } |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
100 //console.log(State); |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
101 if(YUD.get('load_node_history')){ |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
102 //remove all listeners due to problems of history state |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
103 YUE.removeListener('load_node_history', 'click'); |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
104 YUE.on('load_node_history', 'click', function(e){ |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
105 var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
3003
adf8ee7b8f2a
fire tooltips after loading the history
Marcin Kuzminski <marcin@python-works.com>
parents:
3001
diff
changeset
|
106 ypjax(_url, 'node_history', function(o){ |
3197 | 107 tooltip_activate(); |
3003
adf8ee7b8f2a
fire tooltips after loading the history
Marcin Kuzminski <marcin@python-works.com>
parents:
3001
diff
changeset
|
108 }) |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
109 }); |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
110 } |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
111 // Inform Google Analytics of the change |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
112 if ( typeof window.pageTracker !== 'undefined' ) { |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
113 window.pageTracker._trackPageview(State.url); |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
114 } |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
115 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
116 |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
117 YUE.onDOMReady(function(){ |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
118 ypjax_links(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
119 var container = 'files_data'; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
120 //Bind to StateChange Event |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
121 History.Adapter.bind(window,'statechange',function(){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
122 var State = History.getState(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
123 cache_key = State.url; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
124 //check if we have this request in cache maybe ? |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
125 var _cache_obj = CACHE[cache_key]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
126 var _cur_time = new Date().getTime(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
127 // get from cache if it's there and not yet expired ! |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
128 if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
129 YUD.get(container).innerHTML=_cache_obj[1]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
130 YUD.setStyle(container,'opacity','1.0'); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
131 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
132 //callbacks after ypjax call |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
133 callbacks(State); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
134 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
135 else{ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
136 ypjax(State.url,container,function(o){ |
3197 | 137 //callbacks after ypjax call |
138 callbacks(State); | |
139 if (o !== undefined){ | |
140 //store our request in cache | |
141 var _expire_on = new Date().getTime()+CACHE_EXPIRE; | |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
142 CACHE[cache_key] = [_expire_on, o.responseText]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
143 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
144 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
145 } |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
146 }); |
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2691
diff
changeset
|
147 |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
148 // init the search filter |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
149 var _State = { |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
150 url: "${h.url.current()}", |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
151 data: { |
2891
9812e617c564
fix files quick filter links
Marcin Kuzminski <marcin@python-works.com>
parents:
2867
diff
changeset
|
152 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
3001
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
153 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
154 rev:"${c.changeset.raw_id}", |
37c7abd34d44
implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents:
2977
diff
changeset
|
155 f_path: "${h.safe_unicode(c.file.path)}" |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
156 } |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
157 } |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
158 fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
159 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
160 |
1699
623b228cf325
cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents:
644
diff
changeset
|
161 </script> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
162 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
163 </%def> |