myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcoo...@apache.org
Subject svn commit: r581118 - in /myfaces/trinidad/trunk/trinidad: ./ trinidad-api/ trinidad-build/ trinidad-examples/ trinidad-examples/trinidad-blank/ trinidad-examples/trinidad-demo/ trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/ trinidad-impl/ tr...
Date Tue, 02 Oct 2007 00:40:20 GMT
Author: mcooper
Date: Mon Oct  1 17:40:18 2007
New Revision: 581118

URL: http://svn.apache.org/viewvc?rev=581118&view=rev
Log:
TRINIDAD-749 Launching modal dialog when the launcher window body has position:absolute in
IE makes launcher page look corrupt

Removed the code where in IE and launching a modal dialog, the opacity of the body element
was being changed.  Instead, created a new DIV that appears on top of the page content that
is white and 50% opaque to achieve the same visual result.

Now, whenever there are other semi-opaque elements on the page and if the body uses absolute
positioning, those semi-opaque elements will be drawn correctly--no incorrectly masked areas
and thus a non-corrupt appearance.

Also added some svn:ignore property changes for JDeveloper project files so they won't accidentally
get committed.

Modified:
    myfaces/trinidad/trunk/trinidad/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-api/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-build/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-examples/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-blank/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/
  (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-impl/   (props changed)
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js

Propchange: myfaces/trinidad/trunk/trinidad/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -2,3 +2,4 @@
 *.ipr
 *.iws
 *.iml
+trinidad.jws

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1,2 +1,4 @@
 target
 *.iml
+trinidad-api-test.jpr
+trinidad-api.jpr

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-build/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1,2 +1,4 @@
 target
 *.iml
+trinidad-build-test.jpr
+trinidad-build.jpr

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1 +1,2 @@
 target
+trinidad-example.jws

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-blank/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1 +1,3 @@
 target
+trinidad-blank-test.jpr
+trinidad-blank.jpr

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1 +1,3 @@
 target
+trinidad-demo.jpr
+trinidad-demo-test.jpr

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -0,0 +1 @@
+temp

Propchange: myfaces/trinidad/trunk/trinidad/trinidad-impl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct  1 17:40:18 2007
@@ -1,2 +1,4 @@
 target
 *.iml
+trinidad-impl-test.jpr
+trinidad-impl.jpr

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js?rev=581118&r1=581117&r2=581118&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js
(original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js
Mon Oct  1 17:40:18 2007
@@ -260,15 +260,43 @@
     var atMostIE4 = _agent.atMost("ie", 4.99);
     var alphaFilter = false;
 
-    // body of the aprent window
-    var parentBody = parentWindow.document.body;
+    // document of the parent window
+    var parentDoc = parentWindow.document;
+
+    // body of the parent window
+    var parentBody = parentDoc.body;
 
     if (isModal && !atMostIE4)
     {
       if (_agent.atLeast("ie", 4))
       {
-        parentBody.style.filter = "alpha(opacity=50)";
-        alphaFilter = true;
+        var dimmer = parentDoc.getElementById("_trDialogDimmer");
+        if (dimmer == null)
+        {
+          // Display a div over the browser viewport that will give the entire page the appearance
+          // of being disabled:
+          dimmer = parentDoc.createElement("div");
+          dimmer.id = "_trDialogDimmer";
+          var dimmerStyle = dimmer.style;
+          dimmerStyle.position = "absolute";
+          dimmerStyle.zIndex = "32000";
+          dimmerStyle.backgroundColor = "#FFFFFF";
+          dimmerStyle.filter = "alpha(opacity=50)";
+
+          // Position the dimmer element, account for scrolling:
+          var docElement = parentDoc.documentElement;
+          var width = Math.max(docElement.offsetWidth, docElement.scrollWidth);
+          var height = Math.max(docElement.offsetHeight, docElement.scrollHeight);
+          dimmerStyle.width = width + "px";
+          dimmerStyle.height = height + "px";
+          dimmerStyle.top = "0px";
+          dimmerStyle.left = "0px";
+
+          // Add the dimmer element to the body:
+          parentBody.appendChild(dimmer);
+
+          alphaFilter = true;
+        }
       }
 
       // Capture mouse events.  Note: we special-case IE/Windows,
@@ -488,9 +516,16 @@
   {
     if (effect == 'alpha')
     {
-      // No modal dependent - clear out the alpha filter and
-      // don't bother rescheduling.
-      self.document.body.style.filter = null;
+      // No modal dependent - clear out the alpha filter and don't bother rescheduling.
+
+      // Locate the dialog dimmer element:
+      var dimmerDoc = self.document;
+      var dimmer = dimmerDoc.getElementById("_trDialogDimmer");
+      if (dimmer != null)
+      {
+        // Remove the dimmer div that covers the browser viewport:
+        dimmerDoc.body.removeChild(dimmer);
+      }
     }
   }
 }



Mime
View raw message