From 9e430184ba5063110e5ec72c6137e4d38f92e206 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 23 Nov 2012 13:15:16 +0000 Subject: syntax editor + minibar: fix bug with repeated switching back and forth By avoiding "this" in callback functions, the code can be kept cleaner. --- src/www/syntax-editor/editor_online.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/www/syntax-editor') diff --git a/src/www/syntax-editor/editor_online.js b/src/www/syntax-editor/editor_online.js index 9edcf2947..a519d28ce 100644 --- a/src/www/syntax-editor/editor_online.js +++ b/src/www/syntax-editor/editor_online.js @@ -35,7 +35,7 @@ if(window.Minibar) // Minibar loaded? }, // get us back to the editor! abstract_action: function(tree) { - var minibar=this; + //var minibar=this; // how to get hold of new minibar? var editor_options = { target: "editor", @@ -45,13 +45,14 @@ if(window.Minibar) // Minibar loaded? abstr: tree } } - minibar.hide(); - minibar.editor.show(); + editor.minibar.hide(); + editor.show(); } } editor.hide(); editor.minibar=new Minibar(server,minibar_options); - editor.minibar.editor = editor; // :S + //editor.minibar.editor = editor; // :S + editor.minibar.show() } if(/^\?\/tmp\//.test(location.search)) { var args=decodeURIComponent(location.search.substr(1)).split(" ") -- cgit v1.2.3