You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by dr...@apache.org on 2007/08/24 16:37:07 UTC
svn commit: r569400 -
/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js
Author: drobinson
Date: Fri Aug 24 07:37:06 2007
New Revision: 569400
URL: http://svn.apache.org/viewvc?rev=569400&view=rev
Log:
TRINIDAD-648
Fixed height/width of dialogs when configured at launch using commandButton etc.
Modified:
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js
Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js?rev=569400&r1=569399&r2=569400&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PopupDialog.js Fri Aug 24 07:37:06 2007
@@ -42,6 +42,9 @@
this.setCentered(true);
this.setContent(div);
+ // flag to indicate if dialog should resize to content
+ this._fixedSize = false;
+
var page = TrPage.getInstance();
div.className = page.getStyleClass("af|panelPopup::container");
iframe.className = page.getStyleClass("af|panelPopup::content");
@@ -80,6 +83,7 @@
if (width && height)
{
this._resizeIFrame(width, height);
+ this._fixedSize = true;
}
}
@@ -121,19 +125,21 @@
dialog.setTitle(document.title);
// Resize the dialog to the page content
- if (_agent.isIE)
+ if (!dialog._fixedSize)
{
- dialog._resizeIFrame(
- dialog._iframe.Document.body.scrollWidth+40,
- dialog._iframe.Document.body.scrollHeight+40);
+ if (_agent.isIE)
+ {
+ dialog._resizeIFrame(
+ dialog._iframe.Document.body.scrollWidth+40,
+ dialog._iframe.Document.body.scrollHeight+40);
+ }
+ else
+ {
+ dialog._resizeIFrame(
+ dialog._iframe.contentDocument.body.offsetWidth+40,
+ dialog._iframe.contentDocument.body.offsetHeight+40);
+ }
}
- else
- {
- dialog._resizeIFrame(
- dialog._iframe.contentDocument.body.offsetWidth+40,
- dialog._iframe.contentDocument.body.offsetHeight+40);
- }
-
dialog.show();
}