mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
More improvements to view Sieve Scripts.
This commit is contained in:
parent
d1f9249ac1
commit
a31834458b
5 changed files with 93 additions and 155 deletions
|
|
@ -19,8 +19,12 @@ class SieveScriptPopupView extends AbstractViewNext {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
// this.filters = FilterStore.filters;
|
||||
this.filters = ko.observableArray([]);
|
||||
this.filters.loading = ko.observable(false).extend({ throttle: 200 });
|
||||
this.filters.saving = ko.observable(false).extend({ throttle: 200 });
|
||||
|
||||
this.modules = FilterStore.modules;
|
||||
this.filters = FilterStore.filters;
|
||||
|
||||
this.script = {
|
||||
filters: FilterStore.filters,
|
||||
|
|
@ -29,17 +33,16 @@ class SieveScriptPopupView extends AbstractViewNext {
|
|||
|
||||
ko.addObservablesTo(this, {
|
||||
isNew: true,
|
||||
inited: false,
|
||||
serverError: false,
|
||||
serverErrorDesc: '',
|
||||
saveErrorText: '',
|
||||
haveChanges: false,
|
||||
|
||||
saveErrorText: ''
|
||||
filterRaw: ''
|
||||
});
|
||||
|
||||
this.serverError.subscribe(value => value || this.serverErrorDesc(''), this);
|
||||
|
||||
this.filterRaw = FilterStore.raw;
|
||||
// this.filterRaw = FilterStore.raw;
|
||||
this.filterRaw.capa = FilterStore.capa;
|
||||
this.filterRaw.active = ko.observable(false);
|
||||
this.filterRaw.allow = ko.observable(false);
|
||||
|
|
@ -148,6 +151,10 @@ class SieveScriptPopupView extends AbstractViewNext {
|
|||
this.fTrueCallback = fTrueCallback;
|
||||
this.filters(oScript.filters());
|
||||
|
||||
this.filterRaw(oScript.body());
|
||||
this.filterRaw.active(!oScript.allowFilters());
|
||||
this.filterRaw.error(false);
|
||||
|
||||
this.isNew(!bEdit);
|
||||
|
||||
if (!bEdit && oScript) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue