diff --git a/ChangeLog b/ChangeLog index 74597729..0910cd21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/client.js b/client.js index 0941ec14..287bbbc0 100644 --- a/client.js +++ b/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){ diff --git a/lib/client/menu.js b/lib/client/menu.js index caf2fded..dd8259b8 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -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(); }); /* добавляем обработчик клавишь */