| 291 | | |
| 292 | | Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, |
| 293 | | { |
| 294 | | onInit : function (options) |
| 295 | | { |
| 296 | | this.options=options; |
| 297 | | this.onChange=options.onChange; |
| 298 | | options.onChange=this.change.bind(this); |
| 299 | | |
| 300 | | this.hiddenField=$(this.options.ID+'_1'); |
| 301 | | new Control.Slider(options.ID+'_handle',options.ID, options); |
| 302 | | |
| 303 | | if(this.options['AutoPostBack']==true) |
| 304 | | Event.observe(this.hiddenField, "change", Prado.PostBack.bindEvent(this,options)); |
| 305 | | }, |
| 306 | | |
| 307 | | change : function (value) |
| 308 | | { |
| 309 | | this.hiddenField.value=value; |
| 310 | | if (this.onChange) |
| 311 | | { |
| 312 | | this.onChange(value); |
| 313 | | } |
| 314 | | if(this.options['AutoPostBack']==true) |
| 315 | | { |
| 316 | | Event.fireEvent(this.hiddenField, "change"); |
| 317 | | } |
| 318 | | } |
| 319 | | }); |