1(function(){ 2 var _c=T.Slider=function(node,config,container){ 3 this.node=node; 4 this.config=config; 5 this.container=container; 6 this.id=T.uuid(); 7 this.init(); 8 }; 9 T.extend(_c,{ 10 getId:function(){ 11 return this.id; 12 }, 13 init:function(){ 14 var ns=this.node.style; 15 ns.display="inline-block"; 16 ns.width="200px" 17 var input=this.inputNode=T.dc("input"); 18 input.type="text"; 19 var c=this.config; 20 if(c.name){ 21 input.name=c.name; 22 } 23 var from=c.from||0; 24 var to=c.to||100; 25 var value=c.value; 26 if(value==null){ 27 value=(to-from)/2; 28 } 29 input.value=value; 30 this.node.appendChild(input); 31 var self=this; 32 jQuery(input).slider({ 33 from: from, 34 to: to, 35 step: c.step||1, 36 round:c.round||1, 37 smooth: c.smooth||false, 38 dimension: c.dimension||"", 39 skin: c.skin||"plastic", 40 onstatechange:function(value){ 41 input.value=value; 42 T.Event.fire(self,"change",[value]); 43 } 44 }); 45 }, 46 getValue:function(){ 47 return this.inputNode.value; 48 }, 49 setValue:function(value){ 50 this.inputNode.value=value; 51 } 52 }); 53 _c.create=function(el,container){ 54 var jsonStr=el.innerHTML; 55 el.innerHTML=""; 56 var escaped=(el.getAttribute("escaped")||false)=="true"; 57 if(escaped){ 58 jsonStr=unescape(jsonStr); 59 } 60 var config=T.evalJson(jsonStr); 61 T.Css.removeClass(el,"hide"); //æ<span> çéèæ ·å¼å»æ 62 return new _c(el,config,container); 63 }; 64 T.Widget.registerType("slider",_c); 65})();
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.