Author: konstantin.mishin
Date: 2007-06-28 08:30:32 -0400 (Thu, 28 Jun 2007)
New Revision: 1365
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
RF-368
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-28
10:19:27 UTC (rev 1364)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-28
12:30:32 UTC (rev 1365)
@@ -273,6 +273,28 @@
ClientUILib.log(ClientUILogger.INFO, "Utils.DOM.copyAttributes " + (d2 - d1) +
"ms");
};
*/
+Utils.execOnLoad = function(func, condition, timeout) {
+
+ if (condition()) {
+ func();
+ } else {
+ window.setTimeout(
+ function() {
+ Utils.execOnLoad(func, condition, timeout);
+ },
+ timeout
+ );
+ }
+};
+Utils.Condition = {
+ ElementPresent : function(element) {
+ return function () {
+ var el = $(element);
+ return el && el.offsetHeight > 0;
+ };
+ }
+};
+
Array.prototype.unbreakableEach = function(f) {
for (var i = 0; i < this.length; i++) {
f(this[i], i);
Show replies by date