geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1148633 - in /geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp: WEB-INF/themes/portlet-skin.jsp WEB-INF/themes/portlets-with-tree.jsp js/navigation.js
Date Wed, 20 Jul 2011 07:15:01 GMT
Author: rwonly
Date: Wed Jul 20 07:15:00 2011
New Revision: 1148633

URL: http://svn.apache.org/viewvc?rev=1148633&view=rev
Log:
GERONIMO-6088 Cross browser incompatibility of admin console

Modified:
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/js/navigation.js

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlet-skin.jsp?rev=1148633&r1=1148632&r2=1148633&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
Wed Jul 20 07:15:00 2011
@@ -26,8 +26,9 @@ limitations under the License.
 <pluto:portlet portletId="${portlet}">
 
   <!-- Assemble the rendering result -->
-  <div class="portlet" id='<c:out value="${portlet}"/>'>
-    <div class="header">
+  <table cellspacing="0" cellpadding="0" width="100%" class="portlet" id='<c:out value="${portlet}"/>'>
+    <tr>
+      <td class="header">
       <!-- Portlet Mode Controls -->
       <pluto:modeAnchor portletMode="view"/>
       <pluto:modeAnchor portletMode="edit"/>
@@ -38,13 +39,16 @@ limitations under the License.
       <a href="<pluto:url windowState="normal"/>"><span class="normal"></span></a>
       <!-- Portlet Title -->
       <h2><fmt:message key="<%=(String)request.getAttribute( org.apache.pluto.driver.AttributeKeys.PORTLET_TITLE
)%>"/></h2>
-    </div>
-    <div class="body">
+      </td>
+    </tr>
+    <tr>
+      <td class="body">
       <script language="Javascript" src="/console/dojo/dojo/dojo.js" type="text/javascript"></script>
       <script language="Javascript" src="/console/dojo/dijit/dijit.js" type="text/javascript"></script>
       <pluto:render/>
-    </div>
-  </div>
+      </td>
+    </tr>
+  </table>
 
 </pluto:portlet>
 

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp?rev=1148633&r1=1148632&r2=1148633&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
Wed Jul 20 07:15:00 2011
@@ -32,8 +32,8 @@ limitations under the License.
 
 
 <script>
-<%-- we have to use dojo.hash to maintain the hash change history because browser does
not 
-recogonize a hash change when users click back/forward button.--%>
+//we have to use dojo.hash to maintain the hash change history because browser does not 
+//recogonize a hash change when users click back/forward button.
 
 dojo.require("dojo.hash");
 dojo.require("dojox.collections.Dictionary");
@@ -64,17 +64,8 @@ function onHashChange(current_hash) {
     }
 }
 
-
-
-
-</script>
-
-
-<script language="JavaScript">
-
-<%-- When there's hash in current page url
-redirect the page with noxxsPage hash as the query string,
-the server side will get the real redirect target page based on the value of noxxsPage--%>
+//When there's hash in current page url, redirect the page with noxxsPage hash as the query
string,
+//the server side will get the real redirect target page based on the value of noxxsPage
 if(document.location.hash!='') {
        var href = document.location.href;
        var newHref = href.substring(0,href.lastIndexOf("#"));
@@ -82,51 +73,8 @@ if(document.location.hash!='') {
             newHref = newHref.substring(0,href.indexOf("&noxssPage"));
        }
        document.location.href =  newHref + "&noxssPage=" +document.location.hash.substr(11,document.location.hash.length);
-    }
-
-
-<%-- get the real iframe object to resize--%>    
-function getIframeObjectToResize(){
-
-        frame = document.getElementById("portletsFrame");
-        frame_document = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
-        objToResize = (frame.style) ? frame.style : frame;     
-        return objToResize;  
-}
-    
-
-function autoResizeIframe(){
-
-  try{
-      <%-- reset the height of index page each time the new portlet is loaded--%>
-      document.body.height = 400; 
-      iframeObjectToResize=getIframeObjectToResize();
-      iframeObjectToResize.height = frame_document.body.scrollHeight;
-      }
-  catch(err){
-    window.status = err.message;
-  }
-
 }
 
-function autoCheckIframe(){
-
-    var iFrameDocument=document.getElementById("portletsFrame").contentWindow.document;
-    var LoginForm=iFrameDocument.getElementsByName('login');
-
-    if(LoginForm.length!=0){
-        window.location.reload();
-    }
-
-}
-
-<%-- ensure the iframe height could be adjusted according to the content--%>
-setInterval('autoResizeIframe()',500); 
-
-<%-- ensure login page is not displayed in the iframe after the timeout--%>
-setInterval('autoCheckIframe()',500); 
-
-
 </script>
 
 <!-- start accessibility prolog -->
@@ -153,7 +101,7 @@ setInterval('autoCheckIframe()',500); 
     </tr>
 </table>
 
-<p style="margin-top:5px;margin-bottom:5px" />
+<p style="margin-top:5px;margin-bottom:5px"></p>
 
 <!-- Body -->
 <table width="100%"  border="0" cellpadding="0" cellspacing="0">
@@ -193,3 +141,42 @@ setInterval('autoCheckIframe()',500); 
     var pageName = "<fmt:message key="<%=pageName%>"/>";
     quickLaunchPortlets(pageName);
 </script>
+<script language="JavaScript">
+
+function autoResizeIframe(){
+    // reset the height of index page each time the new portlet is loaded
+    document.body.height = 400; 
+  
+    try{
+        var iframe = document.getElementById("portletsFrame");
+        var iframeDocument = iframe.contentWindow.document;
+        
+        var toHeight; 
+        toHeight = (iframeDocument.height) ? iframeDocument.height : iframeDocument.body.scrollHeight;
+        
+        (iframe.style) ? iframe.style.height = toHeight : iframe.height = toHeight; 
+        
+    }catch (ex){
+        window.status = ex.message;
+    }
+
+
+}
+
+function autoCheckIframe(){
+    var iFrameDocument=document.getElementById("portletsFrame").contentWindow.document;
+    var LoginForm=iFrameDocument.getElementsByName('login');
+
+    if(LoginForm.length!=0){
+        window.location.reload();
+    }
+}
+
+//Ensure the iframe height could be adjusted according to the content
+setInterval('autoResizeIframe()',500); 
+
+//Ensure login page is not displayed in the iframe after the timeout
+setInterval('autoCheckIframe()',500); 
+
+
+</script>

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/js/navigation.js
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/js/navigation.js?rev=1148633&r1=1148632&r2=1148633&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/js/navigation.js
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/js/navigation.js
Wed Jul 20 07:15:00 2011
@@ -124,14 +124,13 @@
         
         dojo.io.iframe.setSrc(document.getElementById("portletsFrame"), iframeHref+"?formId="+formID,
true);
                
-         try {
-            objToResize=getIframeObjectToResize();
-             //reset the height of iframe page each time the new portlet is loaded
-            objToResize.height = 400;
-              }
-          catch(err){
+        try {
+            //reset the height of iframe page each time the new portlet is loaded
+            var iframe = document.getElementById("portletsFrame");
+            (iframe.style) ? iframe.style.height = 400 : iframe.height = 400; 
+        }catch(err){
             window.status = err.message;
-          }
+        }
           
         setTimeout('returnToTop()', 30);      
      }



Mime
View raw message