mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fixed bug with context menu hiding (on Esc)
This commit is contained in:
parent
aea3d8d9ff
commit
5d99d5750c
3 changed files with 20 additions and 16 deletions
|
|
@ -35,6 +35,8 @@ elements one-by-one.
|
|||
* Added function loadModule thet make it easier to connect
|
||||
new module.
|
||||
|
||||
* Fixed bug with context menu hiding (on Esc). Keys was unbinded.
|
||||
|
||||
|
||||
2012.10.01, Version 0.1.7
|
||||
|
||||
|
|
|
|||
16
client.js
16
client.js
|
|
@ -1243,13 +1243,13 @@ CloudClient.init = function(){
|
|||
this.OLD_BROWSER = true;
|
||||
Util.jsload(CloudClient.LIBDIRCLIENT + 'ie.js',
|
||||
function(){
|
||||
Util.jqueryLoad( CloudClient.initModules );
|
||||
Util.jqueryLoad( initModules );
|
||||
});
|
||||
}
|
||||
else CloudClient.initModules();
|
||||
else initModules();
|
||||
};
|
||||
|
||||
CloudClient.initModules = function(){
|
||||
function initModules(){
|
||||
|
||||
loadModule({
|
||||
path : 'keyBinding.js',
|
||||
|
|
@ -1266,14 +1266,14 @@ CloudClient.initModules = function(){
|
|||
for(var i = 0, n = pModules.length; i < n ; i++)
|
||||
loadModule(pModules[i]);
|
||||
|
||||
CloudClient.baseInit();
|
||||
baseInit();
|
||||
},
|
||||
|
||||
error: CloudClient.baseInit
|
||||
error: baseInit
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
CloudClient.baseInit = function(){
|
||||
function baseInit(){
|
||||
if(applicationCache){
|
||||
var lFunc = applicationCache.onupdateready;
|
||||
applicationCache.onupdateready = function(){
|
||||
|
|
@ -1341,7 +1341,7 @@ CloudClient.baseInit = function(){
|
|||
'height:' + lHeight +'px;' +
|
||||
'}'
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/* функция меняет ссыки на ajax-овые */
|
||||
CloudClient._changeLinks = function(pPanelID){
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ var CloudCommander, $;
|
|||
|
||||
KeyBinding.set();
|
||||
},
|
||||
|
||||
// define the elements of the menu
|
||||
items: {
|
||||
view: {name: 'View', callback: function(key, opt){
|
||||
|
|
@ -208,16 +209,17 @@ var CloudCommander, $;
|
|||
|
||||
var key_event = (function(pEvent){
|
||||
/* если клавиши можно обрабатывать */
|
||||
if( KeyBinding.get() )
|
||||
if( KeyBinding.get() ){
|
||||
/* if shift + F10 pressed */
|
||||
if(pEvent.keyCode === cloudcmd.KEY.F10 &&
|
||||
pEvent.shiftKey){
|
||||
var lCurrent = Util.getCurrentFile();
|
||||
if(lCurrent)
|
||||
$(lCurrent).contextMenu();
|
||||
|
||||
pEvent.preventDefault();
|
||||
if(pEvent.keyCode === cloudcmd.KEY.F10 && pEvent.shiftKey){
|
||||
var lCurrent = Util.getCurrentFile();
|
||||
if(lCurrent)
|
||||
$(lCurrent).contextMenu();
|
||||
pEvent.preventDefault();
|
||||
}
|
||||
}
|
||||
else if (pEvent.keyCode === cloudcmd.KEY.ESC)
|
||||
KeyBinding.set();
|
||||
});
|
||||
|
||||
/* добавляем обработчик клавишь */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue