You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2011/04/23 19:35:56 UTC

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

Author: bommel
Date: Sat Apr 23 17:35:56 2011
New Revision: 1096188

URL: http://svn.apache.org/viewvc?rev=1096188&view=rev
Log:
Dimensions fixes

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

Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1096188&r1=1096187&r2=1096188&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Sat Apr 23 17:35:56 2011
@@ -329,7 +329,7 @@ var Tobago = {
     }
     this.isSubmit = true;
     var clientDimension = this.createInput('hidden', this.form.id + '-clientDimension');
-    clientDimension.value = document.body.clientWidth + ';' + document.body.clientHeight;
+    clientDimension.value = jQuery(document).width() + ';' + jQuery(document).height();
     this.form.appendChild(clientDimension);
     Tobago.onBeforeUnload();
     return true;
@@ -565,11 +565,11 @@ var Tobago = {
   },
 
   setActionPosition: function(source) {
-    var sourceLeft = Tobago.getAbsoluteLeft(source);
-    var sourceTop = Tobago.getAbsoluteTop(source);
+    var offset = jQuery(source).offset();
     var sourceWidth = Tobago.getWidth(source);
     var sourceHeight = Tobago.getHeight(source);
-    Tobago.actionPosition.value = sourceLeft + 'px,' + sourceTop + 'px,' + sourceWidth + 'px,' + sourceHeight + 'px';
+    Tobago.actionPosition.value = (offset ? offset.left + 'px,' : '0px,') + (offset ? offset.top + 'px,' : '0px,')
+        + sourceWidth + 'px,' + sourceHeight + 'px';
 //    alert("source='" + source + "' action-position=" + Tobago.actionPosition.value);
   },