diff --git a/lib/client/edit/_codemirror.js b/lib/client/edit/_codemirror.js index ecc3c91f..1b411c08 100644 --- a/lib/client/edit/_codemirror.js +++ b/lib/client/edit/_codemirror.js @@ -17,34 +17,31 @@ var CloudCmd, Util, DOM, CodeMirror; CallBacks = [ hide, init, - _show, + show, load ]; /** * function calls all CodeMirror editor functions */ - this.show = show; + this.show = function(){ + DOM.Images.showLoad(); + Util.loadOnLoad( CallBacks ); + }; /** * function hides CodeMirror editor */ this.hide = hide; - /** - * function bind keys - */ this.init = function(){ - CloudCmd.Edit = Edit; + Edit.show(); + CallBacks.pop(); + + DOM.Events.addKey(listener); + DOM.setButtonKey('f4', Edit.show); }; - - show(); - CallBacks.pop(); - - /* добавляем обработчик клавишь */ - DOM.Events.addKey(lListener); - DOM.setButtonKey('f4', Edit.show); - function lListener(pEvent){ + function listener(pEvent){ var lIsBind = Key.isBind(); if (lIsBind) { @@ -147,7 +144,7 @@ var CloudCmd, Util, DOM, CodeMirror; /** * function shows CodeMirror editor */ - function _show(pCallBack){ + function show(pCallBack){ /* if CodeMirror function show already * called do not call it again @@ -179,11 +176,6 @@ var CloudCmd, Util, DOM, CodeMirror; function lFalseLoading(){ Loading = false; } } - function show() { - DOM.Images.showLoad(); - Util.loadOnLoad( CallBacks ); - } - /** * function hides CodeMirror editor */