Mercurial > kallithea
annotate rhodecode/templates/files/files.html @ 2691:e70be4cf96e8 beta
fixed issues with non-ascii chars in new file browser
- patches history.js to handle non-ascii urls properly
- wrap c.file.path into unicode for mako
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 04 Aug 2012 20:21:40 +0200 |
parents | 4d7dfda32d10 |
children | acc05c33cc0c |
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 |
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%def name="title()"> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
4 ${_('%s files') % c.repo_name} - ${c.rhodecode_name} |
99
5b57295601b6
Updated basic files browser with, pygments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
6 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
7 <%def name="breadcrumbs_links()"> |
2492
79818f546538
i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents:
2428
diff
changeset
|
8 ${h.link_to(_(u'Home'),h.url('/'))} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
9 » |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
10 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
11 » |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
12 ${_('files')} |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1705
diff
changeset
|
13 %if c.file: |
644
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
14 @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
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()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
19 ${self.menu('files')} |
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()"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
23 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
24 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
25 <div class="title"> |
644
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
26 ${self.breadcrumbs()} |
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
27 <ul class="links"> |
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
28 <li> |
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
29 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
30 </li> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
31 </ul> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
32 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
33 <div class="table"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
34 <div id="files_data"> |
1699
623b228cf325
cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents:
644
diff
changeset
|
35 <%include file='files_ypjax.html'/> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
36 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
278
diff
changeset
|
37 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
38 </div> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
39 |
1699
623b228cf325
cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents:
644
diff
changeset
|
40 <script type="text/javascript"> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
41 var CACHE = {}; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
42 var CACHE_EXPIRE = 60*1000; //cache for 60s |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
43 //used to construct links from the search list |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
44 var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
45 //send the nodelist request to this url |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
46 var url_base = '${h.url("files_nodelist_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
|
47 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
48 var ypjax_links = function(){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
49 YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
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 //don't do ypjax on middle click |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
52 if(e.which == 2 || !History.enabled){ |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
53 return true; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
54 } |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
55 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
56 var el = e.currentTarget; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
57 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
|
58 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
59 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
|
60 _base_url = _base_url.replace('//','/') |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
61 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
62 //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
|
63 parts = url.split(_base_url) |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
64 if(parts.length != 2){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
65 return false; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
66 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
67 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
68 var parts2 = parts[1].split('/'); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
69 var rev = parts2.shift(); // pop the first element which is the revision |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
70 var f_path = parts2.join('/'); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
71 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
72 var title = "${_('%s files') % c.repo_name}" + " - " + f_path; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
73 |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
74 var _node_list_url = node_list_url.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
|
75 var _url_base = url_base.replace('__REV__',rev).replace('__FPATH__', f_path); |
e70be4cf96e8
fixed issues with non-ascii chars in new file browser
Marcin Kuzminski <marcin@python-works.com>
parents:
2687
diff
changeset
|
76 |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
77 // 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
|
78 var data = {url:url,title:title, url_base:_url_base, |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
79 node_list_url:_node_list_url}; |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
80 History.pushState(data, title, url); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
81 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
82 //now we're sure that we can do ypjax things |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
83 YUE.preventDefault(e) |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
84 return false; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
85 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
86 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
87 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
88 var callbacks = function(State){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
89 ypjax_links(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
90 tooltip_activate(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
91 fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
92 // Inform Google Analytics of the change |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
93 if ( typeof window.pageTracker !== 'undefined' ) { |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
94 window.pageTracker._trackPageview(State.url); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
95 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
96 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
97 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
98 YUE.onDOMReady(function(){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
99 ypjax_links(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
100 var container = 'files_data'; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
101 //Bind to StateChange Event |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
102 History.Adapter.bind(window,'statechange',function(){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
103 var State = History.getState(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
104 cache_key = State.url; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
105 //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
|
106 var _cache_obj = CACHE[cache_key]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
107 var _cur_time = new Date().getTime(); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
108 // 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
|
109 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
|
110 YUD.get(container).innerHTML=_cache_obj[1]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
111 YUD.setStyle(container,'opacity','1.0'); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
112 |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
113 //callbacks after ypjax call |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
114 callbacks(State); |
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 else{ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
117 ypjax(State.url,container,function(o){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
118 //callbacks after ypjax call |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
119 callbacks(State); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
120 if (o !== undefined){ |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
121 //store our request in cache |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
122 var _expire_on = new Date().getTime()+CACHE_EXPIRE; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
123 CACHE[cache_key] = [_expire_on, o.responseText]; |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
124 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
125 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
126 } |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
127 }); |
2687
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
128 |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
129 // init the search filter |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
130 var _State = { |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
131 url: "${h.url.current()}", |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
132 data: { |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
133 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}"), |
2691
e70be4cf96e8
fixed issues with non-ascii chars in new file browser
Marcin Kuzminski <marcin@python-works.com>
parents:
2687
diff
changeset
|
134 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${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
|
135 } |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
136 } |
4d7dfda32d10
Disable the html4 history mock for old browsers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
137 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
|
138 }); |
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
139 |
1699
623b228cf325
cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents:
644
diff
changeset
|
140 </script> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
141 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
142 </%def> |