mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
Resolve #960
This commit is contained in:
parent
bd9e50f222
commit
9dd917894d
1 changed files with 1 additions and 3 deletions
|
@ -59,6 +59,7 @@ export class AbstractViewPopup extends AbstractView
|
||||||
super('Popups' + name, ViewTypePopup);
|
super('Popups' + name, ViewTypePopup);
|
||||||
this.keyScope.scope = name;
|
this.keyScope.scope = name;
|
||||||
this.modalVisible = ko.observable(false).extend({ rateLimit: 0 });
|
this.modalVisible = ko.observable(false).extend({ rateLimit: 0 });
|
||||||
|
this.close = () => this.modalVisible(false);
|
||||||
addShortcut('escape,close', '', name, () => {
|
addShortcut('escape,close', '', name, () => {
|
||||||
if (this.modalVisible() && false !== this.onClose()) {
|
if (this.modalVisible() && false !== this.onClose()) {
|
||||||
this.close();
|
this.close();
|
||||||
|
@ -79,9 +80,6 @@ export class AbstractViewPopup extends AbstractView
|
||||||
onHide() {} // Happens before animation transitionend
|
onHide() {} // Happens before animation transitionend
|
||||||
afterHide() {} // Happens after animation transitionend
|
afterHide() {} // Happens after animation transitionend
|
||||||
*/
|
*/
|
||||||
close() {
|
|
||||||
this.modalVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractViewPopup.showModal = function(params = []) {
|
AbstractViewPopup.showModal = function(params = []) {
|
||||||
|
|
Loading…
Reference in a new issue