fire a warning before closing an unsaved file
This commit is contained in:
@@ -113,6 +113,11 @@
|
||||
CodeMirror.showHint(cm, CodeMirror.pythonHint);
|
||||
}
|
||||
{{pass}}
|
||||
store_changes_function = function(instance, changeObj) {
|
||||
jQuery(instance).data('saved', false);
|
||||
instance.off("change", store_changes_function);
|
||||
}
|
||||
editor.on("change", store_changes_function);
|
||||
// save the editor as textarea data attribute
|
||||
jQuery("#{{=id}} textarea").data('editor', editor);
|
||||
var hlLine = editor.addLineClass(0, "background", "activeline");
|
||||
|
||||
Reference in New Issue
Block a user