1/** 2 * Input 3 * 4 * @author Thomas Famula <[email protected]> 5 */ 6 7var il = il || {}; 8il.UI = il.UI || {}; 9 10il.UI.input = (function ($) { 11 12 var signals_per_id = {}; 13 14 var setSignalsForId = function (id, signals) { 15 signals_per_id[id] = signals; 16 }; 17 18 var onFieldUpdate = function (event, id, val) { 19 var input = $("#" + id); 20 var signals = signals_per_id[id]; 21 for (var i = 0; i < signals.length; i++) { 22 var s = signals[i]; 23 var options = s.options; 24 options.string_value = val; 25 if (s.event === "update") { 26 $(input).trigger(s.signal_id, { 27 'id': s.signal_id, 28 'event': s.event, 29 'triggerer': input, 30 'options': options 31 }); 32 } 33 } 34 }; 35 36 /** 37 * Public interface 38 */ 39 return { 40 setSignalsForId: setSignalsForId, 41 onFieldUpdate: onFieldUpdate 42 }; 43 44})($);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.