geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r953636 - in /geronimo/server/branches/2.2/plugins: console/console-portal-driver/src/main/webapp/WEB-INF/themes/ debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/ debugviews/debugviews-portlets/src/main/webapp/WE...
Date Fri, 11 Jun 2010 09:57:49 GMT
Author: genspring
Date: Fri Jun 11 09:57:49 2010
New Revision: 953636

URL: http://svn.apache.org/viewvc?rev=953636&view=rev
Log:
GERONIMO-5325   iframe causes some portlets display incorrectly

Modified:
    geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
    geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
    geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/view.jsp
    geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
    geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp

Modified: geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp?rev=953636&r1=953635&r2=953636&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
Fri Jun 11 09:57:49 2010
@@ -175,6 +175,16 @@ function load() {
         }
         
         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){
+            window.status = err.message;
+          }
+          
         setTimeout('returnToTop()', 30);      
      }
      

Modified: geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp?rev=953636&r1=953635&r2=953636&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-with-tree.jsp
Fri Jun 11 09:57:49 2010
@@ -75,8 +75,7 @@ function onHashChange(current_hash) {
 <%-- 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!='') {
+if(document.location.hash!='') {
        var href = document.location.href;
        var newHref = href.substring(0,href.lastIndexOf("#"));
        if(newHref.indexOf("&noxssPage")>0){
@@ -85,28 +84,48 @@ the server side will get the real redire
        document.location.href =  newHref + "&noxssPage=" +document.location.hash.substr(11,document.location.hash.length);
     }
 
-var iframeId;
 
-function delayResize(id){
-    iframeId=id;
-    <%--delay the resize so that the ajax content get loaded before the resizing.--%>
-    setTimeout('autoResize()',300); 
+<%-- 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 autoResize(){
+function autoResizeIframe(){
 
   try{
-    frame = document.getElementById(iframeId);
-    frame_document = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
-    objToResize = (frame.style) ? frame.style : frame;
-    objToResize.height = frame_document.body.scrollHeight + 10;
-  }
+      <%-- 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>
 
@@ -159,7 +178,7 @@ function autoResize(){
                     <td class="Gutter">&nbsp;</td> <!-- Spacer -->
                     <td valign="top">
                 
-                    <iframe  src="" id="portletsFrame" width="100%" height="100%" scrolling="no"
frameborder="0" onload="if (window.parent && window.parent.delayResize) {window.parent.delayResize('portletsFrame');}">
+                    <iframe  src="" id="portletsFrame" width="100%" height="100%" scrolling="no"
frameborder="0">
                     
                     </iframe>
                     </td>

Modified: geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/view.jsp?rev=953636&r1=953635&r2=953636&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/view.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/classloaderview/view.jsp
Fri Jun 11 09:57:49 2010
@@ -213,5 +213,5 @@
     </script>
 </button>
 <br />
-<div id = "dojotree" style="height: 800px;overflow: auto;">
+<div id = "dojotree" style="width: 100%;overflow: auto;overflow-y: hidden;">
 </div>

Modified: geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp?rev=953636&r1=953635&r2=953636&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
Fri Jun 11 09:57:49 2010
@@ -212,7 +212,7 @@
 </div>
 <br />
 <div dojoType="dijit.Tree" jsId="debugTree" class="soria" showRoot="false"
-      model="debugModel" openOnClick="true"  style="height: 800px;overflow: auto;">
+      model="debugModel" openOnClick="true"  style="width: 100%;overflow: auto;overflow-y:
hidden;">
 </div>
 
 

Modified: geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp?rev=953636&r1=953635&r2=953636&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
Fri Jun 11 09:57:49 2010
@@ -177,6 +177,6 @@
 </div>
 <br />
 <div dojoType="dijit.Tree" jsId="debugTree" class="soria" showRoot="false"
-      model="debugModel" openOnClick="true"  style="height: 800px;overflow: auto;">
+      model="debugModel" openOnClick="true"  style="width: 100%;overflow: auto;overflow-y:
hidden;">
 </div>
 



Mime
View raw message