You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/12/08 21:27:16 UTC

svn commit: r484747 - in /myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script: tobago-sheet.js tobago.js

Author: weber
Date: Fri Dec  8 12:27:15 2006
New Revision: 484747

URL: http://svn.apache.org/viewvc?view=rev&rev=484747
Log:
TOBAGO-211 (Probem with tc:reload and tc:tabGroup)

Modified:
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?view=diff&rev=484747&r1=484746&r2=484747
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Fri Dec  8 12:27:15 2006
@@ -386,8 +386,7 @@
 
 Tobago.Sheet.prototype.initReload = function() {
   if (typeof this.autoReload == "number" && Tobago.element(this.contentDivId)) {
-    clearTimeout(this.reloadTimer);
-    this.reloadTimer = setTimeout(Tobago.bind2(this, "reloadWithAction", this.id), this.autoReload);
+    Tobago.addReloadTimeout(this.id, Tobago.bind2(this, "reloadWithAction", this.id), this.autoReload);
   }
 };
 

Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?view=diff&rev=484747&r1=484746&r2=484747
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Dec  8 12:27:15 2006
@@ -107,6 +107,8 @@
 
   treeNodes: {},
 
+  reloadTimer: {},
+
   jsObjects: new Array(),
 
   eventListeners: new Array(),
@@ -379,6 +381,18 @@
     }
   },
 
+  clearReloadTimer: function(id) {
+    var timer = Tobago.reloadTimer[id];
+    if (timer) {
+      clearTimeout(timer);
+    }
+  },
+
+  addReloadTimeout: function(id, func, time) {
+    Tobago.clearReloadTimer(id);
+    Tobago.reloadTimer[id] = setTimeout(func, time);
+  },
+
    /**
     * Submit the page with specified actionId and position data for popup.
     */
@@ -1370,8 +1384,7 @@
 
 Tobago.Panel.prototype.initReload = function() {
   if (typeof this.autoReload == "number") {
-    clearTimeout(this.reloadTimer);
-    this.reloadTimer = setTimeout(Tobago.bind2(this, "reload", this.id), this.autoReload);
+    Tobago.addReloadTimeout(this.id, Tobago.bind2(this, "reload", this.id), this.autoReload);
   }
 };