mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
KnockoutJS drop the twoWayBindings code
This commit is contained in:
parent
df8f13e359
commit
4af874e1d1
5 changed files with 1 additions and 16 deletions
|
|
@ -113,7 +113,6 @@ ko.bindingHandlers['checked'] = {
|
|||
}
|
||||
}
|
||||
};
|
||||
//ko.expressionRewriting.twoWayBindings['checked'] = true;
|
||||
|
||||
ko.bindingHandlers['checkedValue'] = {
|
||||
'update'(element, valueAccessor) {
|
||||
|
|
|
|||
|
|
@ -36,4 +36,3 @@ ko.bindingHandlers['hasfocus'] = {
|
|||
}
|
||||
}
|
||||
};
|
||||
//ko.expressionRewriting.twoWayBindings.add('hasfocus');
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ ko.bindingHandlers['textInput'] = {
|
|||
ko.computed(updateView, { disposeWhenNodeIsRemoved: element });
|
||||
}
|
||||
};
|
||||
//ko.expressionRewriting.twoWayBindings.add('textInput');
|
||||
|
||||
// textinput is an alias for textInput
|
||||
ko.bindingHandlers['textinput'] = {
|
||||
|
|
|
|||
|
|
@ -112,4 +112,3 @@ ko.bindingHandlers['value'] = {
|
|||
},
|
||||
'update': () => {} // Keep for backwards compatibility with code that may have wrapped value binding
|
||||
};
|
||||
//ko.expressionRewriting.twoWayBindings.add('value');
|
||||
|
|
|
|||
|
|
@ -112,9 +112,6 @@ ko.expressionRewriting = (() => {
|
|||
return result;
|
||||
},
|
||||
|
||||
// Two-way bindings include a write function that allow the handler to update the value even if it's not an observable.
|
||||
// twoWayBindings = new Set,
|
||||
|
||||
preProcessBindings = (bindingsStringOrKeyValueArray) => {
|
||||
|
||||
var resultStrings = [],
|
||||
|
|
@ -125,13 +122,7 @@ ko.expressionRewriting = (() => {
|
|||
var /*writableVal,*/ obj = ko.bindingHandlers[key];
|
||||
if (obj?.['preprocess'] && !obj['preprocess'](val, key, processKeyValue))
|
||||
return;
|
||||
/*
|
||||
if (twoWayBindings.has(key) && (writableVal = getWriteableValue(val))) {
|
||||
// For two-way bindings, provide a write method in case the value
|
||||
// isn't a writable observable.
|
||||
propertyAccessorResultStrings.push("'" + key + "':function(_z){" + writableVal + "=_z}");
|
||||
}
|
||||
*/
|
||||
|
||||
// Values are wrapped in a function so that each value can be accessed independently
|
||||
val = 'function(){return ' + val + ' }';
|
||||
resultStrings.push("'" + key + "':" + val);
|
||||
|
|
@ -148,8 +139,6 @@ ko.expressionRewriting = (() => {
|
|||
};
|
||||
|
||||
return {
|
||||
// twoWayBindings: twoWayBindings,
|
||||
|
||||
parseObjectLiteral: parseObjectLiteral,
|
||||
|
||||
preProcessBindings: preProcessBindings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue