diff --git a/dev/External/ko.js b/dev/External/ko.js index 379e2140b..8ccf3b482 100644 --- a/dev/External/ko.js +++ b/dev/External/ko.js @@ -243,16 +243,6 @@ ko.bindingHandlers.initDom = { init: (element, fValueAccessor) => fValueAccessor()(element) }; -ko.bindingHandlers.appendDom = { - update: (element, fValueAccessor) => { - $(element) - .hide() - .empty() - .append(ko.unwrap(fValueAccessor())) - .show(); - } -}; - ko.bindingHandlers.draggable = { init: (element, fValueAccessor, fAllBindingsAccessor) => { const Globals = require('Common/Globals'), @@ -685,16 +675,14 @@ ko.extenders.specialThrottle = (target, option) => { write: (bValue) => { if (bValue) { target.valueForRead(bValue); + } else if (target.valueForRead()) { + clearTimeout(target.iSpecialThrottleTimeout); + target.iSpecialThrottleTimeout = setTimeout(() => { + target.valueForRead(false); + target.iSpecialThrottleTimeout = 0; + }, target.iSpecialThrottleTimeoutValue); } else { - if (target.valueForRead()) { - clearTimeout(target.iSpecialThrottleTimeout); - target.iSpecialThrottleTimeout = setTimeout(() => { - target.valueForRead(false); - target.iSpecialThrottleTimeout = 0; - }, target.iSpecialThrottleTimeoutValue); - } else { - target.valueForRead(bValue); - } + target.valueForRead(bValue); } } }); @@ -714,11 +702,6 @@ ko.observable.fn.idleTrigger = function() { return this.extend({ 'idleTrigger': true }); }; -ko.observable.fn.validateNone = function() { - this.hasError = ko.observable(false); - return this; -}; - ko.observable.fn.validateEmail = function() { this.hasError = ko.observable(false); @@ -742,16 +725,4 @@ ko.observable.fn.deleteAccessHelper = function() { return this; }; -ko.observable.fn.validateFunc = function(fFunc) { - this.hasFuncError = ko.observable(false); - - if (isFunction(fFunc)) { - this.subscribe(value => this.hasFuncError(!fFunc(value))); - - this.valueHasMutated(); - } - - return this; -}; - export default ko;