Drop cancelCommand in favor of closeCommand and improve AbstractViewPopup handling

This commit is contained in:
the-djmaze 2022-02-24 22:40:17 +01:00
parent 06b5b83588
commit 2edd55f01f
36 changed files with 82 additions and 118 deletions

View file

@ -3,9 +3,7 @@ import 'External/User/ko';
import { isArray, pString } from 'Common/Utils'; import { isArray, pString } from 'Common/Utils';
import { mailToHelper, setLayoutResizer } from 'Common/UtilsUser'; import { mailToHelper, setLayoutResizer } from 'Common/UtilsUser';
import { import { Scope } from 'Common/Enums';
Scope
} from 'Common/Enums';
import { import {
FolderType, FolderType,

View file

@ -57,36 +57,30 @@ export class AbstractViewPopup extends AbstractView
constructor(name) constructor(name)
{ {
super('Popups' + name, ViewType.Popup); super('Popups' + name, ViewType.Popup);
if (name in Scope) { this.keyScope.scope = name;
this.keyScope.scope = Scope[name];
}
this.bDisabeCloseOnEsc = false;
this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 }); this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 });
}
/*
onShowWithDelay() {}
onHideWithDelay() {}
cancelCommand() {} this.onClose = this.onClose.debounce(200);
closeCommand() {} shortcuts.add('escape,close', '', name, () => {
*/ if (this.modalVisibility() && this.onClose()) {
/** this.closeCommand();
* @returns {void}
*/
registerPopupKeyDown() {
addEventListener('keydown', event => {
if (event && this.modalVisibility()) {
if (!this.bDisabeCloseOnEsc && 'Escape' == event.key) {
this.cancelCommand();
return false;
} else if ('Backspace' == event.key && !inFocus()) {
return false; return false;
} }
}
return true; return true;
}); });
shortcuts.add('backspace', '', name, inFocus());
} }
onClose() {
return true;
}
/*
afterShow() {}
afterHide() {}
closeCommand() {}
*/
} }
AbstractViewPopup.showModal = function(params = []) { AbstractViewPopup.showModal = function(params = []) {

View file

@ -48,7 +48,7 @@ const
ViewModelClass.__dom = vmDom; ViewModelClass.__dom = vmDom;
if (ViewType.Popup === position) { if (ViewType.Popup === position) {
vm.cancelCommand = vm.closeCommand = createCommand(() => hideScreenPopup(ViewModelClass)); vm.closeCommand = createCommand(() => hideScreenPopup(ViewModelClass));
// Firefox / Safari HTMLDialogElement not defined // Firefox / Safari HTMLDialogElement not defined
if (!vmDom.showModal) { if (!vmDom.showModal) {
@ -75,10 +75,10 @@ const
if (e.target === vmDom) { if (e.target === vmDom) {
if (vmDom.classList.contains('animate')) { if (vmDom.classList.contains('animate')) {
autofocus(vmDom); autofocus(vmDom);
vm.onShowWithDelay && vm.onShowWithDelay(); vm.afterShow && vm.afterShow();
} else { } else {
vmDom.close(); vmDom.close();
vm.onHideWithDelay && vm.onHideWithDelay(); vm.afterHide && vm.afterHide();
} }
} }
}; };
@ -115,12 +115,7 @@ const
} }
*/ */
}); });
if ('ontransitionend' in vmDom) {
vmDom.addEventListener('transitionend', endShowHide); vmDom.addEventListener('transitionend', endShowHide);
} else {
// For Edge < 79 and mobile browsers
vm.modalVisibility.subscribe(() => ()=>setTimeout(endShowHide({target:vmDom}), 500));
}
} }
ko.applyBindingAccessorsToNode( ko.applyBindingAccessorsToNode(
@ -133,9 +128,6 @@ const
); );
vm.onBuild && vm.onBuild(vmDom); vm.onBuild && vm.onBuild(vmDom);
if (vm && ViewType.Popup === position) {
vm.registerPopupKeyDown();
}
fireEvent('rl-view-model', vm); fireEvent('rl-view-model', vm);
} else { } else {

View file

@ -49,7 +49,7 @@ export class AccountPopupView extends AbstractViewPopup {
this.submitErrorAdditional((data && data.ErrorMessageAdditional) || ''); this.submitErrorAdditional((data && data.ErrorMessageAdditional) || '');
} else { } else {
rl.app.accountsAndIdentities(); rl.app.accountsAndIdentities();
this.cancelCommand(); this.closeCommand();
} }
}, { }, {
Email: this.email(), Email: this.email(),

View file

@ -57,7 +57,7 @@ export class AdvancedSearchPopupView extends AbstractViewPopup {
MessagelistUserStore.mainSearch(search); MessagelistUserStore.mainSearch(search);
} }
this.cancelCommand(); this.closeCommand();
} }
parseSearchStringValue(search) { parseSearchStringValue(search) {

View file

@ -19,17 +19,16 @@ export class AskPopupView extends AbstractViewPopup {
this.fNoAction = null; this.fNoAction = null;
this.focusOnShow = true; this.focusOnShow = true;
this.bDisabeCloseOnEsc = true;
} }
yesClick() { yesClick() {
this.cancelCommand(); this.closeCommand();
isFunction(this.fYesAction) && this.fYesAction(); isFunction(this.fYesAction) && this.fYesAction();
} }
noClick() { noClick() {
this.cancelCommand(); this.closeCommand();
isFunction(this.fNoAction) && this.fNoAction(); isFunction(this.fNoAction) && this.fNoAction();
} }
@ -52,10 +51,15 @@ export class AskPopupView extends AbstractViewPopup {
this.focusOnShow = focusOnShow ? (askPass ? 'input[type="password"]' : '.buttonYes') : ''; this.focusOnShow = focusOnShow ? (askPass ? 'input[type="password"]' : '.buttonYes') : '';
} }
onShowWithDelay() { afterShow() {
this.focusOnShow && this.querySelector(this.focusOnShow).focus(); this.focusOnShow && this.querySelector(this.focusOnShow).focus();
} }
onClose() {
this.noClick();
return false;
}
onBuild() { onBuild() {
// shortcuts.add('tab', 'shift', 'Ask', () => { // shortcuts.add('tab', 'shift', 'Ask', () => {
shortcuts.add('tab,arrowright,arrowleft', '', 'Ask', () => { shortcuts.add('tab,arrowright,arrowleft', '', 'Ask', () => {
@ -66,11 +70,6 @@ export class AskPopupView extends AbstractViewPopup {
btn.focus(); btn.focus();
return false; return false;
}); });
shortcuts.add('escape', '', 'Ask', () => {
this.noClick();
return false;
});
} }
} }

View file

@ -259,8 +259,6 @@ export class ComposePopupView extends AbstractViewPopup {
] ]
}); });
this.bDisabeCloseOnEsc = true;
this.tryToClosePopup = this.tryToClosePopup.debounce(200); this.tryToClosePopup = this.tryToClosePopup.debounce(200);
this.iTimer = 0; this.iTimer = 0;
@ -643,6 +641,11 @@ export class ComposePopupView extends AbstractViewPopup {
} }
} }
onClose() {
this.skipCommand();
return false;
}
skipCommand() { skipCommand() {
this.bSkipNextHide = true; this.bSkipNextHide = true;
@ -1330,10 +1333,6 @@ export class ComposePopupView extends AbstractViewPopup {
shortcuts.add('contextmenu', '', ScopeCompose, e => this.popupMenu(e)); shortcuts.add('contextmenu', '', ScopeCompose, e => this.popupMenu(e));
shortcuts.add('m', 'meta', ScopeCompose, e => this.popupMenu(e)); shortcuts.add('m', 'meta', ScopeCompose, e => this.popupMenu(e));
shortcuts.add('escape,close', '', ScopeCompose, () => {
this.skipCommand();
return false;
});
shortcuts.add('arrowdown', 'meta', ScopeCompose, () => { shortcuts.add('arrowdown', 'meta', ScopeCompose, () => {
this.skipCommand(); this.skipCommand();
return false; return false;
@ -1360,7 +1359,7 @@ export class ComposePopupView extends AbstractViewPopup {
}); });
shortcuts.add('escape,close', 'shift', ScopeCompose, () => { shortcuts.add('escape,close', 'shift', ScopeCompose, () => {
this.modalVisibility() && this.tryToClosePopup(); this.tryToClosePopup();
return false; return false;
}); });

View file

@ -157,7 +157,7 @@ export class FilterPopupView extends AbstractViewPopup {
} }
} }
onShowWithDelay() { afterShow() {
this.isNew() && this.filter() && this.filter().nameFocused(true); this.isNew() && this.filter() && this.filter().nameFocused(true);
} }
} }

View file

@ -54,7 +54,7 @@ export class FolderClearPopupView extends AbstractViewPopup {
this.clearingError(getNotification(iError)); this.clearingError(getNotification(iError));
} else { } else {
MessagelistUserStore.reload(true); MessagelistUserStore.reload(true);
this.cancelCommand(); this.closeCommand();
} }
}, { }, {
Folder: folderToClear.fullName Folder: folderToClear.fullName

View file

@ -79,7 +79,7 @@ export class FolderCreatePopupView extends AbstractViewPopup {
} }
); );
this.cancelCommand(); this.closeCommand();
} }
simpleFolderNameValidation(sName) { simpleFolderNameValidation(sName) {

View file

@ -100,7 +100,7 @@ export class IdentityPopupView extends AbstractViewPopup {
this.submitError(getNotification(iError)); this.submitError(getNotification(iError));
} else { } else {
rl.app.accountsAndIdentities(); rl.app.accountsAndIdentities();
this.cancelCommand(); this.closeCommand();
} }
}, { }, {
Id: this.id, Id: this.id,
@ -162,11 +162,11 @@ export class IdentityPopupView extends AbstractViewPopup {
} }
} }
onShowWithDelay() { afterShow() {
this.owner() || this.emailFocused(true); this.owner() || this.emailFocused(true);
} }
onHideWithDelay() { afterHide() {
this.clearPopup(); this.clearPopup();
} }
} }

View file

@ -52,6 +52,6 @@ export class LanguagesPopupView extends AbstractViewPopup {
changeLanguage(lang) { changeLanguage(lang) {
this.fLang && this.fLang(lang); this.fLang && this.fLang(lang);
this.cancelCommand(); this.closeCommand();
} }
} }

View file

@ -70,7 +70,7 @@ export class OpenPgpGeneratePopupView extends AbstractViewPopup {
if (keyPair) { if (keyPair) {
const fn = () => { const fn = () => {
this.submitRequest(false); this.submitRequest(false);
this.cancelCommand(); this.closeCommand();
}; };
OpenPGPUserStore.storeKeyPair(keyPair); OpenPGPUserStore.storeKeyPair(keyPair);

View file

@ -63,7 +63,7 @@ export class OpenPgpImportPopupView extends AbstractViewPopup {
return; return;
} }
this.cancelCommand(); this.closeCommand();
} }
onShow() { onShow() {

View file

@ -28,11 +28,8 @@ export class PluginPopupView extends AbstractViewPopup {
hasConfiguration: () => 0 < this.config().length hasConfiguration: () => 0 < this.config().length
}); });
this.bDisabeCloseOnEsc = true;
this.keyScope.scope = Scope.All; this.keyScope.scope = Scope.All;
this.tryToClosePopup = this.tryToClosePopup.debounce(200);
decorateKoCommands(this, { decorateKoCommands(this, {
saveCommand: self => self.hasConfiguration() saveCommand: self => self.hasConfiguration()
}); });
@ -64,7 +61,7 @@ export class PluginPopupView extends AbstractViewPopup {
Remote.request('AdminPluginSettingsUpdate', Remote.request('AdminPluginSettingsUpdate',
iError => iError iError => iError
? this.saveError(getNotification(iError)) ? this.saveError(getNotification(iError))
: this.cancelCommand(), : this.closeCommand(),
oConfig); oConfig);
} }
@ -98,21 +95,13 @@ export class PluginPopupView extends AbstractViewPopup {
} }
} }
tryToClosePopup() { onClose() {
if (AskPopupView.hidden()) { if (AskPopupView.hidden()) {
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.closeCommand()
]); ]);
} }
}
onBuild() {
shortcuts.add('escape', '', Scope.All, () => {
if (this.modalVisibility()) {
this.tryToClosePopup();
return false; return false;
} }
});
}
} }

View file

@ -129,7 +129,7 @@ export class SieveScriptPopupView extends AbstractViewPopup {
this.saveError(false); this.saveError(false);
} }
onShowWithDelay() { afterShow() {
// Sometimes not everything is translated, try again // Sometimes not everything is translated, try again
i18nToNodes(this.viewModelDom); i18nToNodes(this.viewModelDom);
} }

View file

@ -1,15 +1,8 @@
import ko from 'ko'; import ko from 'ko';
import { import { Capa, Scope } from 'Common/Enums';
Capa,
Scope
} from 'Common/Enums';
import { import { ComposeType, FolderType, MessageSetAction } from 'Common/EnumsUser';
ComposeType,
FolderType,
MessageSetAction
} from 'Common/EnumsUser';
import { UNUSED_OPTION_VALUE } from 'Common/Consts'; import { UNUSED_OPTION_VALUE } from 'Common/Consts';

View file

@ -1,5 +1,5 @@
<header> <header>
<a class="close" href="#" data-bind="command: cancelCommand">×</a> <a class="close" href="#" data-bind="command: closeCommand">×</a>
<h3 data-i18n="POPUPS_TWO_FACTOR_TEST/TITLE_TEST_CODE"></h3> <h3 data-i18n="POPUPS_TWO_FACTOR_TEST/TITLE_TEST_CODE"></h3>
</header> </header>
<div class="modal-body form-horizontal"> <div class="modal-body form-horizontal">

View file

@ -82,7 +82,7 @@
<span data-i18n="POPUPS_TWO_FACTOR_CFG/BUTTON_ACTIVATE"></span> <span data-i18n="POPUPS_TWO_FACTOR_CFG/BUTTON_ACTIVATE"></span>
</a> </a>
<!-- <!--
<a class="btn" data-bind="command: cancelCommand, visible: viewEnable() || !lock()"> <a class="btn" data-bind="command: closeCommand, visible: viewEnable() || !lock()">
<i class="icon-ok" ></i> <i class="icon-ok" ></i>
<span data-i18n="GLOBAL/DONE"></span> <span data-i18n="GLOBAL/DONE"></span>
</a> </a>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-bind="text: headerText"></h3> <h3 data-bind="text: headerText"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">
@ -189,7 +189,7 @@
<i class="fontastic" data-bind="css: {'icon-spinner': testing()}"></i> <i class="fontastic" data-bind="css: {'icon-spinner': testing()}"></i>
<span data-i18n="POPUPS_DOMAIN/BUTTON_TEST"></span> <span data-i18n="POPUPS_DOMAIN/BUTTON_TEST"></span>
</a> </a>
<a class="btn buttonClose" data-bind="command: cancelCommand" data-icon="✖" data-i18n="POPUPS_DOMAIN/BUTTON_CLOSE"></a> <a class="btn buttonClose" data-bind="command: closeCommand" data-icon="✖" data-i18n="POPUPS_DOMAIN/BUTTON_CLOSE"></a>
<a class="btn" data-bind="command: createOrAddCommand, visible: edit()"> <a class="btn" data-bind="command: createOrAddCommand, visible: edit()">
<i class="fontastic" data-bind="css: {'icon-spinner': saving()}"></i> <i class="fontastic" data-bind="css: {'icon-spinner': saving()}"></i>
<span data-i18n="POPUPS_DOMAIN/BUTTON_UPDATE"></span> <span data-i18n="POPUPS_DOMAIN/BUTTON_UPDATE"></span>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="POPUPS_DOMAIN_ALIAS/TITLE_ADD_DOMAIN_ALIAS"></h3> <h3 data-i18n="POPUPS_DOMAIN_ALIAS/TITLE_ADD_DOMAIN_ALIAS"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">
@ -31,7 +31,7 @@
</div> </div>
</div> </div>
<footer> <footer>
<a class="btn buttonClose" data-bind="command: cancelCommand" data-icon="✖" data-i18n="POPUPS_DOMAIN_ALIAS/BUTTON_CLOSE"></a> <a class="btn buttonClose" data-bind="command: closeCommand" data-icon="✖" data-i18n="POPUPS_DOMAIN_ALIAS/BUTTON_CLOSE"></a>
<a class="btn" data-bind="command: createCommand"> <a class="btn" data-bind="command: createCommand">
<i class="fontastic" data-bind="visible: !saving()"></i> <i class="fontastic" data-bind="visible: !saving()"></i>
<i class="icon-spinner" data-bind="visible: saving"></i> <i class="icon-spinner" data-bind="visible: saving"></i>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h4> <h4>
<span data-i18n="POPUPS_PLUGIN/TITLE_PLUGIN"></span> <span data-i18n="POPUPS_PLUGIN/TITLE_PLUGIN"></span>
&nbsp; &nbsp;
@ -30,6 +30,6 @@
</form> </form>
</div> </div>
<footer> <footer>
<a class="btn buttonClose" data-bind="command: cancelCommand" data-icon="✖" data-i18n="POPUPS_PLUGIN/BUTTON_CLOSE"></a> <a class="btn buttonClose" data-bind="command: closeCommand" data-icon="✖" data-i18n="POPUPS_PLUGIN/BUTTON_CLOSE"></a>
<a class="btn" data-bind="command: saveCommand, visible: hasConfiguration" data-icon="✔" data-i18n="GLOBAL/SAVE"></a> <a class="btn" data-bind="command: saveCommand, visible: hasConfiguration" data-icon="✔" data-i18n="GLOBAL/SAVE"></a>
</footer> </footer>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="POPUPS_LANGUAGES/TITLE_LANGUAGES"></h3> <h3 data-i18n="POPUPS_LANGUAGES/TITLE_LANGUAGES"></h3>
</header> </header>
<div class="modal-body" style="min-height: 150px;" data-bind="foreach: languages"> <div class="modal-body" style="min-height: 150px;" data-bind="foreach: languages">

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3> <h3>
<span data-bind="visible: isNew" data-i18n="POPUPS_ADD_ACCOUNT/TITLE_ADD_ACCOUNT"></span> <span data-bind="visible: isNew" data-i18n="POPUPS_ADD_ACCOUNT/TITLE_ADD_ACCOUNT"></span>
<span data-bind="visible: !isNew()" data-i18n="POPUPS_ADD_ACCOUNT/TITLE_UPDATE_ACCOUNT"></span> <span data-bind="visible: !isNew()" data-i18n="POPUPS_ADD_ACCOUNT/TITLE_UPDATE_ACCOUNT"></span>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="SEARCH/TITLE_ADV"></h3> <h3 data-i18n="SEARCH/TITLE_ADV"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">
@ -9,22 +9,22 @@
<div class="control-group"> <div class="control-group">
<label data-i18n="GLOBAL/FROM"></label> <label data-i18n="GLOBAL/FROM"></label>
<input type="text" autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" <input type="text" autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: from, onEsc: cancelCommand"> data-bind="value: from, onEsc: closeCommand">
</div> </div>
<div class="control-group"> <div class="control-group">
<label data-i18n="GLOBAL/TO"></label> <label data-i18n="GLOBAL/TO"></label>
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: to, onEsc: cancelCommand"> data-bind="value: to, onEsc: closeCommand">
</div> </div>
<div class="control-group"> <div class="control-group">
<label data-i18n="GLOBAL/SUBJECT"></label> <label data-i18n="GLOBAL/SUBJECT"></label>
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: subject, onEsc: cancelCommand"> data-bind="value: subject, onEsc: closeCommand">
</div> </div>
<div class="control-group"> <div class="control-group">
<label data-i18n="SEARCH/LABEL_ADV_TEXT"></label> <label data-i18n="SEARCH/LABEL_ADV_TEXT"></label>
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="value: text, onEsc: cancelCommand"> data-bind="value: text, onEsc: closeCommand">
</div> </div>
</div> </div>
<div class="span4"> <div class="span4">

View file

@ -1,6 +1,6 @@
<header class="b-header-toolbar g-ui-user-select-none"> <header class="b-header-toolbar g-ui-user-select-none">
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<div class="btn-toolbar"> <div class="btn-toolbar">

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3> <h3>
<span data-i18n="POPUPS_FILTER/TITLE_CREATE_FILTER" data-bind="visible: isNew"></span> <span data-i18n="POPUPS_FILTER/TITLE_CREATE_FILTER" data-bind="visible: isNew"></span>
<span data-i18n="POPUPS_FILTER/TITLE_EDIT_FILTER" data-bind="visible: !isNew()"></span> <span data-i18n="POPUPS_FILTER/TITLE_EDIT_FILTER" data-bind="visible: !isNew()"></span>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3> <h3>
<span data-i18n="POPUPS_CLEAR_FOLDER/TITLE_CLEAR_FOLDER" data-bind="visible: !clearingProcess()"></span> <span data-i18n="POPUPS_CLEAR_FOLDER/TITLE_CLEAR_FOLDER" data-bind="visible: !clearingProcess()"></span>
<span data-i18n="POPUPS_CLEAR_FOLDER/TITLE_CLEARING_PROCESS" data-bind="visible: clearingProcess"></span> <span data-i18n="POPUPS_CLEAR_FOLDER/TITLE_CLEARING_PROCESS" data-bind="visible: clearingProcess"></span>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="POPUPS_CREATE_FOLDER/TITLE_CREATE_FOLDER"></h3> <h3 data-i18n="POPUPS_CREATE_FOLDER/TITLE_CREATE_FOLDER"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="POPUPS_SYSTEM_FOLDERS/TITLE_SYSTEM_FOLDERS"></h3> <h3 data-i18n="POPUPS_SYSTEM_FOLDERS/TITLE_SYSTEM_FOLDERS"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">

View file

@ -1,5 +1,5 @@
<header class="g-ui-user-select-none"> <header class="g-ui-user-select-none">
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3> <h3>
<span data-bind="visible: !edit()" data-i18n="POPUPS_IDENTITY/TITLE_ADD_IDENTITY"></span> <span data-bind="visible: !edit()" data-i18n="POPUPS_IDENTITY/TITLE_ADD_IDENTITY"></span>
<span data-bind="visible: edit" data-i18n="POPUPS_IDENTITY/TITLE_UPDATE_IDENTITY"></span> <span data-bind="visible: edit" data-i18n="POPUPS_IDENTITY/TITLE_UPDATE_IDENTITY"></span>

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="SHORTCUTS_HELP/LEGEND_SHORTCUTS_HELP"></h3> <h3 data-i18n="SHORTCUTS_HELP/LEGEND_SHORTCUTS_HELP"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="OPENPGP/POPUP_GENERATE_TITLE"></h3> <h3 data-i18n="OPENPGP/POPUP_GENERATE_TITLE"></h3>
</header> </header>
<form id="openpgp-generate" class="modal-body form-horizontal" autocomplete="off" data-bind="submit: submitForm"> <form id="openpgp-generate" class="modal-body form-horizontal" autocomplete="off" data-bind="submit: submitForm">

View file

@ -1,5 +1,5 @@
<header> <header>
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="OPENPGP/POPUP_IMPORT_TITLE"></h3> <h3 data-i18n="OPENPGP/POPUP_IMPORT_TITLE"></h3>
</header> </header>
<form id="openpgp-import" class="modal-body form-horizontal" autocomplete="off" data-bind="submit: submitForm"> <form id="openpgp-import" class="modal-body form-horizontal" autocomplete="off" data-bind="submit: submitForm">

View file

@ -1,5 +1,5 @@
<header class="g-ui-user-select-none"> <header class="g-ui-user-select-none">
<a href="#" class="close" data-bind="command: cancelCommand">×</a> <a href="#" class="close" data-bind="command: closeCommand">×</a>
<h3 data-i18n="OPENPGP/POPUP_VIEW_TITLE"></h3> <h3 data-i18n="OPENPGP/POPUP_VIEW_TITLE"></h3>
</header> </header>
<div class="modal-body"> <div class="modal-body">
@ -10,6 +10,6 @@
</div> </div>
</div> </div>
<footer> <footer>
<a class="btn buttonClose" data-bind="command: cancelCommand" data-icon="✖" data-i18n="GLOBAL/CLOSE"></a> <a class="btn buttonClose" data-bind="command: closeCommand" data-icon="✖" data-i18n="GLOBAL/CLOSE"></a>
<a class="btn buttonClose" data-bind="click: selectKey" data-icon="🔑" data-i18n="OPENPGP/POPUP_VIEW_BUTTON"></a> <a class="btn buttonClose" data-bind="click: selectKey" data-icon="🔑" data-i18n="OPENPGP/POPUP_VIEW_BUTTON"></a>
</footer> </footer>

View file

@ -1,6 +1,6 @@
<!-- ko with: script --> <!-- ko with: script -->
<header> <header>
<a href="#" class="close" data-bind="command: $root.cancelCommand">×</a> <a href="#" class="close" data-bind="command: $root.closeCommand">×</a>
<h3> <h3>
<span data-i18n="POPUPS_SIEVE_SCRIPT/TITLE_CREATE" data-bind="visible: !exists()"></span> <span data-i18n="POPUPS_SIEVE_SCRIPT/TITLE_CREATE" data-bind="visible: !exists()"></span>
<span data-i18n="POPUPS_SIEVE_SCRIPT/TITLE_EDIT" data-bind="visible: exists"></span> <span data-i18n="POPUPS_SIEVE_SCRIPT/TITLE_EDIT" data-bind="visible: exists"></span>