code cleanup (to remove the code of former editors)

fix breakpoints integration
This commit is contained in:
ilvalle
2013-05-28 14:34:01 +02:00
parent 9b4888e6d7
commit ad718b48e8
3 changed files with 48 additions and 102 deletions
+4 -8
View File
@@ -33,17 +33,14 @@
<script src="{{=cm}}/emmet.min.js"></script>
<script language="Javascript" type="text/javascript" src="{{=URL('static','js/ajax_editor.js')}}"></script>
<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
doListBreakpoints({{=XML("'%s','%s://%s%s'" % ('currentFilenameJS',
request.env['wsgi_url_scheme'], request.env['http_host'],
URL(c='debug', f='list_breakpoints')))}});
});
jQuery(document).on('shown click', 'a[data-toggle="tab"]', function (e) {
var tab_id = jQuery(this).attr('href');
var editor = jQuery(tab_id + " textarea").data('editor');
editor.setSize(jQuery(tab_id).width(), jQuery(tab_id).height());
editor.refresh();
if (editor) {
editor.setSize(jQuery(tab_id).width(), jQuery(tab_id).height());
editor.refresh();
}
//jQuery(function(){jQuery('.CodeMirror-scroll').css("height","auto").css("overflow-x","auto");});
});
@@ -70,7 +67,6 @@ jQuery(document).on('click', '#restore', function (e) {
load_file(jQuery(this).attr("href"));
});
// open the selected file
jQuery(document).on('click', 'a.editor_filelink', function (e) {
e.preventDefault();
@@ -1,8 +1,5 @@
{{def shortcut(combo, description):
return XML('<li><span class="teletype-text">%s</span><span>%s</span></li>' % (combo, description))
##TODO
#eseguire dolistbreakpoint ogni volta che si fa una load
}}
<form action="{{=URL('edit', args=filename)}}" method="post" name="editform" id="editform" class="form-inline">
@@ -26,7 +23,7 @@
{{pass}}
<p class="formfield">
{{if functions:}}
<span style="text-align:left;" id="exposed">
<span style="text-align:left;" class="exposed">
{{=B(T('exposes:'))}} {{=XML(', '.join([A(f,_target="_blank", _href=URL(a=app,c=controller,f=f)).xml() for f in functions]))}}
</span>
{{if editviewlinks:}}<br/>
@@ -75,6 +72,11 @@
jQuery("#{{=id}} textarea").data('editor', editor);
var hlLine = editor.setLineClass(0, "activeline");
window.mirror = editor; //backward compatibility
doListBreakpoints({{=XML("'%s','%s://%s%s'" % (filename,
request.env['wsgi_url_scheme'], request.env['http_host'],
URL(c='debug', f='list_breakpoints')))}}, editor);
</script>
<div class="editor-bar-bottom" style="margin-top:9px;">