Remove useless clearPopup() functions

This commit is contained in:
djmaze 2021-11-03 14:58:34 +01:00
parent ba895ba887
commit 2a7348081a
9 changed files with 20 additions and 82 deletions

View file

@ -21,15 +21,6 @@ class AskPopupView extends AbstractViewPopup {
this.bDisabeCloseOnEsc = true;
}
clearPopup() {
this.askDesc('');
this.yesButton(i18n('POPUPS_ASK/BUTTON_YES'));
this.noButton(i18n('POPUPS_ASK/BUTTON_NO'));
this.fYesAction = null;
this.fNoAction = null;
}
yesClick() {
this.cancelCommand();
@ -52,21 +43,11 @@ class AskPopupView extends AbstractViewPopup {
* @returns {void}
*/
onShow(askDesc, fYesFunc = null, fNoFunc = null, yesButton = '', noButton = '', isFocusYesOnShow = true) {
this.clearPopup();
this.fYesAction = fYesFunc || null;
this.fNoAction = fNoFunc || null;
this.askDesc(askDesc || '');
if (yesButton) {
this.yesButton(yesButton);
}
if (noButton) {
this.noButton(noButton);
}
this.yesButton(yesButton || i18n('POPUPS_ASK/BUTTON_YES'));
this.noButton(noButton || i18n('POPUPS_ASK/BUTTON_NO'));
this.fYesAction = fYesFunc;
this.fNoAction = fNoFunc;
this.bFocusYesOnShow = !!isFocusYesOnShow;
}