mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
refactored
This commit is contained in:
parent
4709f86d60
commit
3a6edf2fd0
4 changed files with 27 additions and 36 deletions
|
|
@ -202,11 +202,11 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror;
|
|||
/* если клавиши можно обрабатывать */
|
||||
if( KeyBinding.get() ){
|
||||
/* if f4 or f3 pressed */
|
||||
var lF3 = cloudcmd.KEY.F3;
|
||||
var lF4 = cloudcmd.KEY.F4;
|
||||
var lShow = Util.bind( CodeMirrorEditor.show, CodeMirrorEditor );
|
||||
var lF3 = cloudcmd.KEY.F3,
|
||||
lF4 = cloudcmd.KEY.F4,
|
||||
lShow = Util.bind( CodeMirrorEditor.show, CodeMirrorEditor );
|
||||
|
||||
if(!pEvent.shiftKey){
|
||||
if(!pEvent.shiftKey)
|
||||
switch(pEvent.keyCode)
|
||||
{
|
||||
case lF4:
|
||||
|
|
@ -217,24 +217,18 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror;
|
|||
ReadOnly = true;
|
||||
lShow();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* добавляем обработчик клавишь */
|
||||
if (document.addEventListener)
|
||||
document.addEventListener('keydown', key_event, false);
|
||||
if (document.addEventListener)
|
||||
document.addEventListener('keydown', key_event, false);
|
||||
|
||||
else{
|
||||
var lFunc;
|
||||
if( Util.isFunction(document.onkeydown) )
|
||||
lFunc = document.onkeydown;
|
||||
|
||||
var lFunc = document.onkeydown;
|
||||
document.onkeydown = function(){
|
||||
if(lFunc)
|
||||
lFunc();
|
||||
|
||||
Util.exec(lFunc);
|
||||
key_event();
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue