mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup closeCommand & cancelCommand because both are defined for popups
This commit is contained in:
parent
c46e190a3a
commit
d69743cee5
5 changed files with 9 additions and 9 deletions
|
|
@ -38,9 +38,6 @@ class AbstractView {
|
||||||
keyScope(this.sCurrentScope);
|
keyScope(this.sCurrentScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelCommand() {}
|
|
||||||
closeCommand() {}
|
|
||||||
|
|
||||||
querySelector(selectors) {
|
querySelector(selectors) {
|
||||||
return this.viewModelDom.querySelector(selectors);
|
return this.viewModelDom.querySelector(selectors);
|
||||||
}
|
}
|
||||||
|
|
@ -68,7 +65,10 @@ export class AbstractViewPopup extends AbstractView
|
||||||
this.sDefaultScope = Scope[name];
|
this.sDefaultScope = Scope[name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
cancelCommand() {}
|
||||||
|
closeCommand() {}
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
@ -76,7 +76,7 @@ export class AbstractViewPopup extends AbstractView
|
||||||
addEventListener('keydown', event => {
|
addEventListener('keydown', event => {
|
||||||
if (event && this.modalVisibility && this.modalVisibility()) {
|
if (event && this.modalVisibility && this.modalVisibility()) {
|
||||||
if (!this.bDisabeCloseOnEsc && 'Escape' == event.key) {
|
if (!this.bDisabeCloseOnEsc && 'Escape' == event.key) {
|
||||||
this.cancelCommand && this.cancelCommand();
|
this.cancelCommand();
|
||||||
return false;
|
return false;
|
||||||
} else if ('Backspace' == event.key && !inFocus()) {
|
} else if ('Backspace' == event.key && !inFocus()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class AddOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cancelCommand && this.cancelCommand();
|
this.cancelCommand();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class FilterPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
this.fTrueCallback && this.fTrueCallback(this.filter());
|
this.fTrueCallback && this.fTrueCallback(this.filter());
|
||||||
|
|
||||||
this.modalVisibility() && this.closeCommand && this.closeCommand();
|
this.modalVisibility() && this.closeCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class NewOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
openpgpKeyring.store();
|
openpgpKeyring.store();
|
||||||
|
|
||||||
rl.app.reloadOpenPgpKeys();
|
rl.app.reloadOpenPgpKeys();
|
||||||
this.cancelCommand && this.cancelCommand();
|
this.cancelCommand();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class PluginPopupView extends AbstractViewPopup {
|
||||||
if (!isPopupVisible(AskPopupView)) {
|
if (!isPopupVisible(AskPopupView)) {
|
||||||
showScreenPopup(AskPopupView, [
|
showScreenPopup(AskPopupView, [
|
||||||
i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'),
|
i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'),
|
||||||
() => this.modalVisibility() && this.cancelCommand && this.cancelCommand()
|
() => this.modalVisibility() && this.cancelCommand()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue