mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Add onFocus callback to popups
This commit is contained in:
parent
fd2c2346a8
commit
04932fce63
28 changed files with 412 additions and 336 deletions
|
|
@ -13,7 +13,7 @@ function PopupsFolderCreateViewModel()
|
|||
}, this);
|
||||
|
||||
this.folderName = ko.observable('');
|
||||
this.focusTrigger = ko.observable(false);
|
||||
this.folderName.focused = ko.observable(false);
|
||||
|
||||
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
|
||||
|
||||
|
|
@ -97,13 +97,17 @@ PopupsFolderCreateViewModel.prototype.clearPopup = function ()
|
|||
{
|
||||
this.folderName('');
|
||||
this.selectedParentValue('');
|
||||
this.focusTrigger(false);
|
||||
this.folderName.focused(false);
|
||||
};
|
||||
|
||||
PopupsFolderCreateViewModel.prototype.onShow = function ()
|
||||
{
|
||||
this.clearPopup();
|
||||
this.focusTrigger(true);
|
||||
};
|
||||
|
||||
PopupsFolderCreateViewModel.prototype.onFocus = function ()
|
||||
{
|
||||
this.folderName.focused(true);
|
||||
};
|
||||
|
||||
PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||
|
|
@ -113,7 +117,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
|||
var bResult = true;
|
||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||
{
|
||||
kn.delegateRun(self, 'cancelCommand');
|
||||
Utils.delegateRun(self, 'cancelCommand');
|
||||
bResult = false;
|
||||
}
|
||||
return bResult;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue