Author: Alex.Kolonitsky
Date: 2009-09-03 02:45:41 -0400 (Thu, 03 Sep 2009)
New Revision: 15444
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
ExtendedDataTable in modal panel - undefined this.selectionManger
https://jira.jboss.org/jira/browse/RF-6439
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-02
15:42:08 UTC (rev 15443)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-03
06:45:41 UTC (rev 15444)
@@ -32,10 +32,7 @@
var grid = this;
- Utils.execOnLoad(
- function(){
- grid.update(true);
- },
+ this.updateTimerId = Utils.execOnLoad( function(){ grid.update(true); },
Utils.Condition.ElementPresent(id+':od'), 100);
},
@@ -52,6 +49,11 @@
Utils.DOM.Event.removeListeners(this.groupRows[i]);
}
}
+
+ if (this.updateTimerId) {
+ clearInterval(this.updateTimerId)
+ }
+
//null all references to DOM elements
delete this.selectionManager;
delete this.header;
Modified:
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
---
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2009-09-02
15:42:08 UTC (rev 15443)
+++
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2009-09-03
06:45:41 UTC (rev 15444)
@@ -72,7 +72,7 @@
getHeight: function() {
var el = this.getElement();
if(el.tagName.toLowerCase() != "body") {
- var h = el.getHeight(); // offsetHeight;
+ var h = el.offsetHeight;
return h>0 ? h : (this.element.boxHeight ? parseInt(this.element.boxHeight) : 0);
}
Modified:
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2009-09-02
15:42:08 UTC (rev 15443)
+++
branches/community/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2009-09-03
06:45:41 UTC (rev 15444)
@@ -286,17 +286,21 @@
};
*/
Utils.execOnLoad = function(func, condition, timeout) {
-
if (condition()) {
func();
} else {
- window.setTimeout(
+ var intervalId = setInterval(
function() {
- Utils.execOnLoad(func, condition, timeout);
+ if (condition()) {
+ func();
+ clearInterval(intervalId);
+ }
},
timeout
);
}
+
+ return intervalId;
};
Utils.Condition = {
ElementPresent : function(element) {