diff --git a/dev/Sieve/Model/Filter.js b/dev/Sieve/Model/Filter.js index f5239405e..016400a21 100644 --- a/dev/Sieve/Model/Filter.js +++ b/dev/Sieve/Model/Filter.js @@ -36,7 +36,6 @@ export class FilterModel extends AbstractModel { this.addObservables({ enabled: true, askDelete: false, - canBeDeleted: true, name: '', nameError: false, @@ -181,27 +180,6 @@ export class FilterModel extends AbstractModel { return true; } - toJSON() { - return { -// '@Object': 'Object/Filter', - ID: this.id, - Enabled: this.enabled() ? 1 : 0, - Name: this.name, - Conditions: this.conditions, - ConditionsType: this.conditionsType, - - ActionType: this.actionType(), - ActionValue: this.actionValue, - ActionValueSecond: this.actionValueSecond, - ActionValueThird: this.actionValueThird, - ActionValueFourth: this.actionValueFourth, - - Keep: this.keep() ? 1 : 0, - Stop: this.stop() ? 1 : 0, - MarkAsRead: this.markAsRead() ? 1 : 0 - }; - } - addCondition() { this.conditions.push(new FilterConditionModel()); } diff --git a/dev/Sieve/Model/FilterCondition.js b/dev/Sieve/Model/FilterCondition.js index 8e54cff69..0313a9736 100644 --- a/dev/Sieve/Model/FilterCondition.js +++ b/dev/Sieve/Model/FilterCondition.js @@ -81,16 +81,6 @@ export class FilterConditionModel extends AbstractModel { // static reviveFromJson(json) {} - toJSON() { - return { -// '@Object': 'Object/FilterCondition', - Field: this.field, - Type: this.type, - Value: this.value, - ValueSecond: this.valueSecond - }; - } - cloneSelf() { const filterCond = new FilterConditionModel(); diff --git a/dev/Sieve/Model/Script.js b/dev/Sieve/Model/Script.js index 231bf22f4..7d1f4faa1 100644 --- a/dev/Sieve/Model/Script.js +++ b/dev/Sieve/Model/Script.js @@ -261,7 +261,6 @@ export class SieveScriptModel extends AbstractModel exists: false, nameError: false, askDelete: false, - canBeDeleted: true, hasChanges: false }); @@ -317,7 +316,6 @@ export class SieveScriptModel extends AbstractModel if (script.allowFilters()) { script.filters(sieveScriptToFilters(script.body())); } - script.canBeDeleted(SIEVE_FILE_NAME !== json.name); script.exists(true); script.hasChanges(false); } diff --git a/snappymail/v/0.0.0/app/templates/Views/User/PopupsSieveScript.html b/snappymail/v/0.0.0/app/templates/Views/User/PopupsSieveScript.html index f162bc8af..2ebd054d1 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/PopupsSieveScript.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/PopupsSieveScript.html @@ -61,7 +61,7 @@ data-i18n="GLOBAL/ARE_YOU_SURE">