Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /home/h33678/data/www/it-man.ztu.edu.ua/bower_components/knockout/src/binding/defaultBindings/ drwxr-xr-x |
Viewing file: Select action/file-type: ko.bindingHandlers['selectedOptions'] = { 'after': ['options', 'foreach'], 'init': function (element, valueAccessor, allBindings) { ko.utils.registerEventHandler(element, "change", function () { var value = valueAccessor(), valueToWrite = []; ko.utils.arrayForEach(element.getElementsByTagName("option"), function(node) { if (node.selected) valueToWrite.push(ko.selectExtensions.readValue(node)); }); ko.expressionRewriting.writeValueToProperty(value, allBindings, 'selectedOptions', valueToWrite); }); }, 'update': function (element, valueAccessor) { if (ko.utils.tagNameLower(element) != "select") throw new Error("values binding applies only to SELECT elements"); var newValue = ko.utils.unwrapObservable(valueAccessor()), previousScrollTop = element.scrollTop; if (newValue && typeof newValue.length == "number") { ko.utils.arrayForEach(element.getElementsByTagName("option"), function(node) { var isSelected = ko.utils.arrayIndexOf(newValue, ko.selectExtensions.readValue(node)) >= 0; if (node.selected != isSelected) { // This check prevents flashing of the select element in IE ko.utils.setOptionNodeSelectionState(node, isSelected); } }); } element.scrollTop = previousScrollTop; } }; ko.expressionRewriting.twoWayBindings['selectedOptions'] = true; |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0365 ]-- |