Mercurial > kallithea
comparison rhodecode/templates/files/files_add.html @ 1699:623b228cf325 beta
cleaned up JS files in files templates.
- fixed some small issues with editing/adding git files using codemirror
- small css fixes
- separated files/dir browsing into separate template
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 19 Nov 2011 21:00:02 +0200 |
parents | 53d076664e08 |
children | 48840976caa8 |
comparison
equal
deleted
inserted
replaced
1698:8fdabc8cce1a | 1699:623b228cf325 |
---|---|
81 <input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" /> | 81 <input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" /> |
82 ${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")} | 82 ${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")} |
83 </div> | 83 </div> |
84 ${h.end_form()} | 84 ${h.end_form()} |
85 <script type="text/javascript"> | 85 <script type="text/javascript"> |
86 var myCodeMirror = CodeMirror.fromTextArea(YUD.get('editor'),{ | 86 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; |
87 mode: "null", | 87 initCodeMirror('editor',reset_url); |
88 lineNumbers:true | |
89 }); | |
90 YUE.on('reset','click',function(e){ | |
91 window.location="${h.url('files_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path)}"; | |
92 }); | |
93 | |
94 YUE.on('file_enable','click',function(){ | |
95 YUD.setStyle('editor_container','display',''); | |
96 YUD.setStyle('upload_file_container','display','none'); | |
97 YUD.setStyle('filename_container','display',''); | |
98 }); | |
99 | |
100 YUE.on('upload_file_enable','click',function(){ | |
101 YUD.setStyle('editor_container','display','none'); | |
102 YUD.setStyle('upload_file_container','display',''); | |
103 YUD.setStyle('filename_container','display','none'); | |
104 }); | |
105 | |
106 </script> | 88 </script> |
107 </div> | 89 </div> |
108 </div> | 90 </div> |
109 </div> | 91 </div> |
110 </%def> | 92 </%def> |