Added: rainloop.user filters to sieve script

This commit is contained in:
djmaze 2021-01-20 10:10:59 +01:00
parent 76bc8aa107
commit c7d6426c88
5 changed files with 260 additions and 13 deletions

View file

@ -48,6 +48,7 @@ class SieveScriptPopupView extends AbstractViewNext {
this.saving = true;
this.saveError(false);
// script.body(script.filtersToRaw());
Remote.filtersScriptSave(
(result, data) => {
@ -108,6 +109,16 @@ class SieveScriptPopupView extends AbstractViewNext {
]);
}
toggleFiltersRaw() {
if (!this.rawActive()) {
let script = this.script(),
changed = script.hasChanges();
script.body(script.filtersToRaw());
script.hasChanges(changed);
}
this.rawActive(!this.rawActive());
}
onBuild(oDom) {
oDom.addEventListener('click', event => {
const el = event.target.closestWithin('.filter-item .e-action', oDom),