You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by an...@apache.org on 2013/02/28 16:30:04 UTC

svn commit: r1451235 - /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js

Author: andys
Date: Thu Feb 28 15:30:04 2013
New Revision: 1451235

URL: http://svn.apache.org/r1451235
Log:
TRINIDAD-2360 Size of the pop-up window does not honor the width and height parameters provided in IE

If both width and height are specified, honor them (and avoid any auto-sizing).

Thanks Anshu for the patch!

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js?rev=1451235&r1=1451234&r2=1451235&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js Thu Feb 28 15:30:04 2013
@@ -563,7 +563,15 @@ function _sizeWin(
                      : _getBodyWidth(body, body.offsetWidth, body.offsetLeft);
     var newHeight = 0;
 
-    var hasParams = params && ((params['H'] && params['H'] > 0)  || (params['W'] && params['W'] > 0));
+    var hasWidthParam = params && (params['W'] && params['W'] > 0);
+    var hasHeightParam = params && (params['H'] && params['H'] > 0);
+    
+    //if the width and height of the window is provided as parameter, use it directly.
+    if (hasWidthParam && hasHeightParam)
+      return;
+    
+    var hasParams = (hasHeightParam  || hasWidthParam);
+    
     // if the height was not explicitly set, change to auto forcing
     // recalculation of  the offsetHeight.  FireFox doesn't always detect
     // that a PPR has changed the content size.