Small refactoring (popup key scope optimization)

This commit is contained in:
RainLoop Team 2014-04-08 02:36:38 +04:00
parent 77cdc4690b
commit a96e1d80c3
22 changed files with 226 additions and 254 deletions

View file

@ -60,6 +60,7 @@ function PopupsPluginViewModel()
}, this.hasConfiguration);
this.bDisabeCloseOnEsc = true;
this.sDefaultKeyScope = Enums.KeyState.All;
Knoin.constructorEnd(this);
}
@ -127,11 +128,11 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
PopupsPluginViewModel.prototype.onBuild = function ()
{
key('esc', _.bind(function () {
key('esc', Enums.KeyState.All, _.bind(function () {
if (this.modalVisibility())
{
this.tryToClosePopup();
return false;
}
}));
}, this));
};