mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03: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: '',
|
name: '',
|
||||||
nameError: false,
|
nameError: false,
|
||||||
nameFocused: false,
|
|
||||||
|
|
||||||
conditionsType: FilterRulesType.Any,
|
conditionsType: FilterRulesType.Any,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,19 +186,13 @@ export class FilterPopupView extends rl.pluginPopupView {
|
||||||
|
|
||||||
beforeShow(oFilter, fTrueCallback, bEdit) {
|
beforeShow(oFilter, fTrueCallback, bEdit) {
|
||||||
// onShow(oFilter, fTrueCallback, bEdit) {
|
// onShow(oFilter, fTrueCallback, bEdit) {
|
||||||
|
this.populateOptions();
|
||||||
|
|
||||||
this.isNew(!bEdit);
|
this.isNew(!bEdit);
|
||||||
|
|
||||||
this.fTrueCallback = fTrueCallback;
|
this.fTrueCallback = fTrueCallback;
|
||||||
this.filter(oFilter);
|
this.filter(oFilter);
|
||||||
|
|
||||||
this.selectedFolderValue(oFilter.actionValue());
|
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="modal-body" data-bind="with: filter">
|
||||||
<div class="control-group" data-bind="css: {'error': nameError}">
|
<div class="control-group" data-bind="css: {'error': nameError}">
|
||||||
<input type="text" class="span5"
|
<input type="text" class="span5"
|
||||||
data-bind="value: name, hasfocus: nameFocused"
|
data-bind="value: name"
|
||||||
autocorrect="off" autocapitalize="off" spellcheck="false"
|
autofocus="" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-i18n="[placeholder]GLOBAL/NAME">
|
data-i18n="[placeholder]GLOBAL/NAME">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue