mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Change KnockoutJS to just warn for missing Observables.
Sieve doesn't need them, for now.
This commit is contained in:
parent
76ade5eac0
commit
96d034b36a
17 changed files with 78 additions and 130 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
MULTILINE_DOTSTART
|
||||
} from 'Sieve/RegEx';
|
||||
|
||||
import { arrayToString, getMatchTypes, getComparators, koObserve } from 'Sieve/Utils';
|
||||
import { arrayToString, getMatchTypes, getComparators } from 'Sieve/Utils';
|
||||
|
||||
/**
|
||||
* abstract
|
||||
|
|
@ -154,7 +154,6 @@ export /*abstract*/ class TestCommand extends GrammarCommand
|
|||
this._comparator = '';
|
||||
this._match_type = '';
|
||||
this.relational_match = ''; // GrammarQuotedString DQUOTE ( "gt" / "ge" / "lt" / "le" / "eq" / "ne" ) DQUOTE
|
||||
koObserve(this, 'match_type');
|
||||
}
|
||||
|
||||
get require() { return /:value|:count/.test(this._match_type) ? 'relational' : ''; }
|
||||
|
|
|
|||
|
|
@ -58,18 +58,6 @@ export const
|
|||
serverErrorDesc(text);
|
||||
},
|
||||
|
||||
koObserve = (obj, prop) => {
|
||||
// Object.getOwnPropertyNames(obj).forEach(prop => {
|
||||
// prop = prop.replace(/^_/, '');
|
||||
obj['ko_' + prop] = ko.computed({
|
||||
read: () => obj[prop],
|
||||
write: (v) => obj[prop] = v,
|
||||
pure:true
|
||||
});
|
||||
// });
|
||||
// Object.preventExtensions(obj);
|
||||
},
|
||||
|
||||
getComparators = (validOnly = 0) => {
|
||||
let result = [
|
||||
// Default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue