Mercurial > kallithea
comparison rhodecode/templates/files/files_source.html @ 2931:4c7cc3a4c330 beta
fixed issue with show at revision button. Some JS were not properly loaded due to ajaxified files view.
Removed JS code and the logic for that is in python view now. Simpler and less ugly JS callbacks
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 17 Oct 2012 21:13:04 +0200 |
parents | a01c5994015c |
children | 37c7abd34d44 |
comparison
equal
deleted
inserted
replaced
2930:a01c5994015c | 2931:4c7cc3a4c330 |
---|---|
6 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | 6 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
7 ${h.hidden('diff2',c.file_changeset.raw_id)} | 7 ${h.hidden('diff2',c.file_changeset.raw_id)} |
8 ${h.select('diff1',c.file_changeset.raw_id,c.file_history)} | 8 ${h.select('diff1',c.file_changeset.raw_id,c.file_history)} |
9 ${h.submit('diff',_('diff to revision'),class_="ui-btn")} | 9 ${h.submit('diff',_('diff to revision'),class_="ui-btn")} |
10 ${h.submit('show_rev',_('show at revision'),class_="ui-btn")} | 10 ${h.submit('show_rev',_('show at revision'),class_="ui-btn")} |
11 ${h.hidden('annotate', c.annotate)} | |
11 ${h.end_form()} | 12 ${h.end_form()} |
12 </div> | 13 </div> |
13 <div class="file_author"> | 14 <div class="file_author"> |
14 <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div> | 15 <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div> |
15 %for email, user in c.authors: | 16 %for email, user in c.authors: |
109 | 110 |
110 //sets old anchor | 111 //sets old anchor |
111 window.location.hash = old_hash; | 112 window.location.hash = old_hash; |
112 | 113 |
113 } | 114 } |
114 YUE.on('show_rev','click',function(e){ | 115 |
115 YUE.preventDefault(e); | |
116 var cs = YUD.get('diff1').value; | |
117 %if c.annotate: | |
118 var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |
119 %else: | |
120 var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |
121 %endif | |
122 window.location = url; | |
123 }); | |
124 YUE.on('hlcode','mouseup',getSelectionLink("${_('Selection link')}")) | 116 YUE.on('hlcode','mouseup',getSelectionLink("${_('Selection link')}")) |
125 }); | 117 }); |
126 </script> | 118 </script> |