diff options
author | ctrlaltca@gmail.com <> | 2012-03-24 21:28:08 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2012-03-24 21:28:08 +0000 |
commit | fd1a685c494bc183adae9b1748ee79e66c4ff7c2 (patch) | |
tree | a5f4179b4eb7efc57edcd9ce9c926077c5f3ea24 /framework/Web/Javascripts/source/prado/controls/slider.js | |
parent | e0de4ef01a644bccae872f60b3584a1755dcbc1f (diff) |
committed alternative patch for #181
Diffstat (limited to 'framework/Web/Javascripts/source/prado/controls/slider.js')
-rw-r--r-- | framework/Web/Javascripts/source/prado/controls/slider.js | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/framework/Web/Javascripts/source/prado/controls/slider.js b/framework/Web/Javascripts/source/prado/controls/slider.js index f4c9b2f3..2e26ee51 100644 --- a/framework/Web/Javascripts/source/prado/controls/slider.js +++ b/framework/Web/Javascripts/source/prado/controls/slider.js @@ -19,13 +19,6 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, this.minimum = this.options.minimum || this.range.start; this.hiddenField=$(this.options.ID+'_1'); - // Issue 181 - this.element.stopObserving(); - this.track.stopObserving(); - this.handle.stopObserving(); - if (this.progress) this.progress.stopObserving(); - this.hiddenField.stopObserving(); - // Will be used to align the handle onto the track, if necessary this.alignX = parseInt(this.options.alignX || - this.track.offsetLeft); this.alignY = parseInt(this.options.alignY || - this.track.offsetTop); @@ -57,34 +50,22 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, // Initialize handle this.setValue(parseFloat(slider.options.sliderValue)); Element.makePositioned(this.handle); // fix IE - Event.observe (this.handle, "mousedown", this.eventMouseDown); + this.observe (this.handle, "mousedown", this.eventMouseDown); - Event.observe (this.track, "mousedown", this.eventMouseDown); - if (this.progress) Event.observe (this.progress, "mousedown", this.eventMouseDown); + this.observe (this.track, "mousedown", this.eventMouseDown); + if (this.progress) this.observe (this.progress, "mousedown", this.eventMouseDown); - // Issue 181 - document.stopObserving("mouseup", this.eventMouseUp); - document.stopObserving("mousemove", this.eventMouseMove); - Event.observe (document, "mouseup", this.eventMouseUp); - Event.observe (document, "mousemove", this.eventMouseMove); + this.observe (document, "mouseup", this.eventMouseUp); + this.observe (document, "mousemove", this.eventMouseMove); this.initialized=true; if(this.options['AutoPostBack']==true) - Event.observe(this.hiddenField, "change", Prado.PostBack.bindEvent(this,options)); + this.observe(this.hiddenField, "change", Prado.PostBack.bindEvent(this,options)); }, - dispose: function() { - var slider = this; - Event.stopObserving(this.track, "mousedown", this.eventMouseDown); - Event.stopObserving(document, "mouseup", this.eventMouseUp); - Event.stopObserving(document, "mousemove", this.eventMouseMove); - - Event.stopObserving(this.handle, "mousedown", slider.eventMouseDown); - }, - setDisabled: function(){ this.disabled = true; }, |