New Ask popup

Fix inputosaurus fake span width detection
Add Esc trigger to all popups (#29)
Many minor fixes
This commit is contained in:
RainLoop Team 2013-12-14 03:27:12 +04:00
parent 214d905f90
commit dcc486a114
57 changed files with 1200 additions and 307 deletions

View file

@ -111,3 +111,28 @@ PopupsPluginViewModel.prototype.onShow = function (oPlugin)
}
}
};
PopupsPluginViewModel.prototype.tryToClosePopup = function ()
{
var self = this;
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
}
}]);
};
PopupsPluginViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
self.tryToClosePopup();
bResult = false;
}
return bResult;
});
};