Author: pyaschenko
Date: 2008-05-02 11:31:47 -0400 (Fri, 02 May 2008)
New Revision: 8411
Modified:
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
http://jira.jboss.com/jira/browse/RF-2022
Modified:
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
---
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-05-02
15:29:01 UTC (rev 8410)
+++
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2008-05-02
15:31:47 UTC (rev 8411)
@@ -100,7 +100,28 @@
//Event.observe($(input), "propertychange",
this.setInitialValue.bindAsEventListener(this));
this.required = options.required;
+
+ this.mainTable.component = this;
+ this["rich:destructor"] = "destroy";
+
},
+
+ destroy: function ()
+ {
+ this.handle = null;
+ this.tip = null;
+ this.track = null;
+ this.mainTable.component = null;
+ this.mainTable = null;
+ this.input = null;
+ this.table = null;
+ window.document.onmouseup = this.prevMouseUp;
+ window.document.onmousemove = this.prevMouseMove;
+ this.prevMouseUp = null;
+ this.prevMouseMove = null;
+ Event.stopObserving(window, "load", this.documentBodyOload);
+ Event.stopObserving(window, "resize", this.eventWindowResized);
+ },
setInitialValue: function(){
this.setValue(parseFloat(this.options.sliderValue || this.range.start));
Modified:
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
---
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-05-02
15:29:01 UTC (rev 8410)
+++
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-05-02
15:31:47 UTC (rev 8411)
@@ -54,6 +54,7 @@
},
handleOnLoad: function() {
+ Event.stopObserving(window,'load',this.handleOnLoad.bindAsEventListener(this));
if ( this.timer ){
clearTimeout(this.timer);
}