mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Cleanup Squire and Knockout with help of Chromium Code Coverage
Bugfix: Squire inlineNodeNames the 'I' tag was missing Improved: Squire style editing
This commit is contained in:
parent
0158a5fe1e
commit
fac36e828b
9 changed files with 2820 additions and 3034 deletions
|
|
@ -1,4 +1,4 @@
|
|||
var arrayChangeEventName = 'arrayChange';
|
||||
const arrayChangeEventName = 'arrayChange';
|
||||
ko.extenders['trackArrayChanges'] = (target, options) => {
|
||||
// Use the provided options--each call to trackArrayChanges overwrites the previously set options
|
||||
target.compareArrayOptions = {};
|
||||
|
|
|
|||
|
|
@ -32,22 +32,6 @@ ko.observableArray['fn'] = {
|
|||
this.valueHasMutated();
|
||||
}
|
||||
return removedValues;
|
||||
},
|
||||
|
||||
'removeAll': function (arrayOfValues) {
|
||||
// If you passed zero args, we remove everything
|
||||
if (arrayOfValues === undefined) {
|
||||
var underlyingArray = this.peek();
|
||||
var allValues = underlyingArray.slice(0);
|
||||
this.valueWillMutate();
|
||||
underlyingArray.splice(0, underlyingArray.length);
|
||||
this.valueHasMutated();
|
||||
return allValues;
|
||||
}
|
||||
// If you passed an arg, we interpret it as an array of entries to remove
|
||||
if (!arrayOfValues)
|
||||
return [];
|
||||
return this['remove'](value => arrayOfValues.includes(value));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue