mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Resolve #400
This commit is contained in:
parent
593d3af6d4
commit
663fb1485a
3 changed files with 4 additions and 11 deletions
|
@ -40,7 +40,6 @@ export class FilterModel extends AbstractModel {
|
|||
|
||||
name: '',
|
||||
nameError: false,
|
||||
nameFocused: false,
|
||||
|
||||
conditionsType: FilterRulesType.Any,
|
||||
|
||||
|
|
|
@ -186,19 +186,13 @@ export class FilterPopupView extends rl.pluginPopupView {
|
|||
|
||||
beforeShow(oFilter, fTrueCallback, bEdit) {
|
||||
// onShow(oFilter, fTrueCallback, bEdit) {
|
||||
this.populateOptions();
|
||||
|
||||
this.isNew(!bEdit);
|
||||
|
||||
this.fTrueCallback = fTrueCallback;
|
||||
this.filter(oFilter);
|
||||
|
||||
this.selectedFolderValue(oFilter.actionValue());
|
||||
|
||||
bEdit || oFilter.nameFocused(true);
|
||||
|
||||
this.populateOptions();
|
||||
}
|
||||
|
||||
afterShow() {
|
||||
this.isNew() && this.filter().nameFocused(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<div class="modal-body" data-bind="with: filter">
|
||||
<div class="control-group" data-bind="css: {'error': nameError}">
|
||||
<input type="text" class="span5"
|
||||
data-bind="value: name, hasfocus: nameFocused"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: name"
|
||||
autofocus="" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-i18n="[placeholder]GLOBAL/NAME">
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue