mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-03-05 19:23:48 +08:00
replaced knockout hasfocus with autofocus=""
This commit is contained in:
parent
650e962fdf
commit
b4ab5b891a
12 changed files with 18 additions and 50 deletions
|
@ -20,9 +20,7 @@ class AccountPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
submitRequest: false,
|
submitRequest: false,
|
||||||
submitError: '',
|
submitError: '',
|
||||||
submitErrorAdditional: '',
|
submitErrorAdditional: ''
|
||||||
|
|
||||||
emailFocus: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.email.subscribe(() => this.emailError(false));
|
this.email.subscribe(() => this.emailError(false));
|
||||||
|
@ -84,10 +82,6 @@ class AccountPopupView extends AbstractViewPopup {
|
||||||
this.email(account.email);
|
this.email(account.email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.emailFocus(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { AccountPopupView, AccountPopupView as default };
|
export { AccountPopupView, AccountPopupView as default };
|
||||||
|
|
|
@ -12,8 +12,6 @@ class AdvancedSearchPopupView extends AbstractViewPopup {
|
||||||
super('AdvancedSearch');
|
super('AdvancedSearch');
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
fromFocus: false,
|
|
||||||
|
|
||||||
from: '',
|
from: '',
|
||||||
to: '',
|
to: '',
|
||||||
subject: '',
|
subject: '',
|
||||||
|
@ -142,18 +140,12 @@ class AdvancedSearchPopupView extends AbstractViewPopup {
|
||||||
this.hasAttachment(false);
|
this.hasAttachment(false);
|
||||||
this.starred(false);
|
this.starred(false);
|
||||||
this.unseen(false);
|
this.unseen(false);
|
||||||
|
|
||||||
this.fromFocus(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(search) {
|
onShow(search) {
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
this.parseSearchStringValue(search);
|
this.parseSearchStringValue(search);
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.fromFocus(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { AdvancedSearchPopupView, AdvancedSearchPopupView as default };
|
export { AdvancedSearchPopupView, AdvancedSearchPopupView as default };
|
||||||
|
|
|
@ -18,7 +18,6 @@ class FolderCreatePopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
folderName: '',
|
folderName: '',
|
||||||
folderNameFocused: false,
|
|
||||||
|
|
||||||
selectedParentValue: UNUSED_OPTION_VALUE
|
selectedParentValue: UNUSED_OPTION_VALUE
|
||||||
});
|
});
|
||||||
|
@ -59,22 +58,17 @@ class FolderCreatePopupView extends AbstractViewPopup {
|
||||||
}
|
}
|
||||||
|
|
||||||
simpleFolderNameValidation(sName) {
|
simpleFolderNameValidation(sName) {
|
||||||
return /^[^\\/]+$/g.test(sName.trim());
|
return /^[^\\/]+$/g.test(sName);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearPopup() {
|
clearPopup() {
|
||||||
this.folderName('');
|
this.folderName('');
|
||||||
this.selectedParentValue('');
|
this.selectedParentValue('');
|
||||||
this.folderNameFocused(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.folderNameFocused(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { FolderCreatePopupView, FolderCreatePopupView as default };
|
export { FolderCreatePopupView, FolderCreatePopupView as default };
|
||||||
|
|
|
@ -11,7 +11,6 @@ class NewOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
email: '',
|
email: '',
|
||||||
emailFocus: '',
|
|
||||||
emailError: false,
|
emailError: false,
|
||||||
|
|
||||||
name: '',
|
name: '',
|
||||||
|
@ -101,10 +100,6 @@ class NewOpenPgpKeyPopupView extends AbstractViewPopup {
|
||||||
onShow() {
|
onShow() {
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.emailFocus(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { NewOpenPgpKeyPopupView, NewOpenPgpKeyPopupView as default };
|
export { NewOpenPgpKeyPopupView, NewOpenPgpKeyPopupView as default };
|
||||||
|
|
|
@ -20,7 +20,6 @@ class TemplatePopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
name: '',
|
name: '',
|
||||||
nameError: false,
|
nameError: false,
|
||||||
nameFocus: false,
|
|
||||||
|
|
||||||
body: '',
|
body: '',
|
||||||
bodyLoading: false,
|
bodyLoading: false,
|
||||||
|
@ -144,10 +143,6 @@ class TemplatePopupView extends AbstractViewPopup {
|
||||||
this.editorSetBody('');
|
this.editorSetBody('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.nameFocus(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { TemplatePopupView, TemplatePopupView as default };
|
export { TemplatePopupView, TemplatePopupView as default };
|
||||||
|
|
|
@ -9,7 +9,6 @@ class TwoFactorTestPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
this.addObservables({
|
this.addObservables({
|
||||||
code: '',
|
code: '',
|
||||||
codeFocused: false,
|
|
||||||
codeStatus: null,
|
codeStatus: null,
|
||||||
|
|
||||||
testing: false
|
testing: false
|
||||||
|
@ -36,7 +35,6 @@ class TwoFactorTestPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
clearPopup() {
|
clearPopup() {
|
||||||
this.code('');
|
this.code('');
|
||||||
this.codeFocused(false);
|
|
||||||
this.codeStatus(null);
|
this.codeStatus(null);
|
||||||
this.testing(false);
|
this.testing(false);
|
||||||
|
|
||||||
|
@ -48,10 +46,6 @@ class TwoFactorTestPopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
this.koTestedTrigger = koTestedTrigger;
|
this.koTestedTrigger = koTestedTrigger;
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowWithDelay() {
|
|
||||||
this.codeFocused(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { TwoFactorTestPopupView, TwoFactorTestPopupView as default };
|
export { TwoFactorTestPopupView, TwoFactorTestPopupView as default };
|
||||||
|
|
|
@ -22,8 +22,9 @@
|
||||||
<label class="control-label" data-i18n="GLOBAL/EMAIL"></label>
|
<label class="control-label" data-i18n="GLOBAL/EMAIL"></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<label style="margin-top: 5px;" data-bind="visible: !isNew()"><strong data-bind="text: email"></strong></label>
|
<label style="margin-top: 5px;" data-bind="visible: !isNew()"><strong data-bind="text: email"></strong></label>
|
||||||
<input type="email" class="inputEmail input-xlarge" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="email" class="inputEmail input-xlarge"
|
||||||
data-bind="visible: isNew, textInput: email, onEnter: addAccountCommand, hasfocus: emailFocus" />
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
|
data-bind="visible: isNew, textInput: email, onEnter: addAccountCommand" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group" data-bind="css: {'error': passwordError}">
|
<div class="control-group" data-bind="css: {'error': passwordError}">
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
<span data-i18n="GLOBAL/FROM"></span>
|
<span data-i18n="GLOBAL/FROM"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" class="uiInput inputFrom" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" class="uiInput inputFrom"
|
||||||
data-bind="value: from, onEnter: searchCommand, hasfocus: fromFocus, onEsc: cancelCommand" />
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
|
data-bind="value: from, onEnter: searchCommand, onEsc: cancelCommand" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
<span data-i18n="GLOBAL/NAME"></span>
|
<span data-i18n="GLOBAL/NAME"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" class="uiInput inputName" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" class="uiInput inputName"
|
||||||
data-bind="textInput: folderName, hasfocus: folderNameFocused, onEnter: createFolderCommand" />
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
|
data-bind="textInput: folderName, onEnter: createFolderCommand" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
<label class="control-label" data-i18n="GLOBAL/EMAIL"></label>
|
<label class="control-label" data-i18n="GLOBAL/EMAIL"></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="email" class="inputEmail input-large"
|
<input type="email" class="inputEmail input-large"
|
||||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="value: email, hasfocus: emailFocus" />
|
data-bind="value: email" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
<div class="control-group" data-bind="css: {'error': nameError}">
|
<div class="control-group" data-bind="css: {'error': nameError}">
|
||||||
<label class="control-label" data-i18n="GLOBAL/NAME"></label>
|
<label class="control-label" data-i18n="GLOBAL/NAME"></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" class="inputName input-xlarge" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" class="inputName input-xlarge"
|
||||||
data-bind="textInput: name, onEnter: addTemplateCommand, hasfocus: nameFocus" />
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
|
data-bind="textInput: name, onEnter: addTemplateCommand" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" class="uiInput inputName"
|
<input type="text" class="uiInput inputName"
|
||||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="textInput: code, hasfocus: codeFocused, onEnter: testCodeCommand" />
|
data-bind="textInput: code, onEnter: testCodeCommand" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue