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/01/10 15:38:24 UTC

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

Author: weber
Date: Tue Jan 10 06:38:19 2006
New Revision: 367615

URL: http://svn.apache.org/viewcvs?rev=367615&view=rev
Log:
working on ajax tabgroup

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

Modified: incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js?rev=367615&r1=367614&r2=367615&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js (original)
+++ incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js Tue Jan 10 06:38:19 2006
@@ -74,6 +74,7 @@
         LOG.error("aId = " + aId);
         return;
       }
+      this.createOverlay(this.parent);
       new Ajax.Updater(this.parent, this.url+ '&' + Form.serialize(this.form), this.options);
     } else {
       LOG.info("No reload Event");
@@ -85,6 +86,20 @@
     LOG.debug("tabgroup loaded : ");
     this.element = this.parent.firstChild;
     this.setUp();
+  },
+
+  // TODO: remove dublicated code : this is also in tobago-sheet.js  
+  createOverlay: function(element) {
+    var overlay = document.createElement('div');
+    overlay.style.position = "absolute";
+    overlay.style.top = "0px";
+    overlay.style.left = "0px";
+    overlay.style.width = element.offsetWidth + 'px';
+    overlay.style.height = element.offsetHeight + 'px';
+    overlay.style.cursor = "wait";
+    // TODO: better z-index strategie
+    overlay.style.zIndex = 10000;
+    element.appendChild(overlay);
   }
 
 }

Modified: incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=367615&r1=367614&r2=367615&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ incubator/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Tue Jan 10 06:38:19 2006
@@ -137,7 +137,6 @@
 
   reloadWithAction: function(action) {
     LOG.debug("reload sheet with action \"" + action + "\"");
-    this.createOverlay(this.element);
     var hidden = $(this.form.id + "-action");
     if (hidden) {
       hidden.value = action;
@@ -145,6 +144,7 @@
       LOG.error("No hidden field for form action Id='" + this.form.id + "-action" + "'");
       return;
     }
+    this.createOverlay(this.element);
     new Ajax.Updater(this.element, this.url+ '&' + Form.serialize(this.form), this.options);
   },
 
@@ -209,7 +209,7 @@
     if (input) {
 
       var keyCode;
-      if (event.which) {
+      if (event.which) {                  
         keyCode = event.which;
       } else {
         keyCode = event.keyCode;
@@ -231,6 +231,7 @@
     this.setup();
   },
 
+  // TODO: remove dublicated code : this is also in tabgroup.js
   createOverlay: function(element) {
     var overlay = document.createElement('div');
     overlay.style.position = "absolute";