mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactored
This commit is contained in:
parent
b767b005ea
commit
fb0aa4d55c
1 changed files with 12 additions and 20 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue