geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r944986 - in /geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes: navigation.jsp portlets-only.jsp portlets-with-tree.jsp
Date Mon, 17 May 2010 06:47:20 GMT
Author: genspring
Date: Mon May 17 06:47:20 2010
New Revision: 944986

URL: http://svn.apache.org/viewvc?rev=944986&view=rev
Log:
fix ajax history problem for web console

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

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp?rev=944986&r1=944985&r2=944986&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp
Mon May 17 06:47:20 2010
@@ -64,6 +64,7 @@ limitations under the License.
 </div>
 
 
+
 <script type="text/javascript">
 
 <%-- scripts to create the navigation tree--%>
@@ -172,10 +173,9 @@ function load() {
         if(document.location.href.indexOf(iframeHref)==0){      
             iframeHref=document.location.href.substring(0,document.location.href.indexOf("?"));
         }
-    
-        document.getElementById("portletsFrame").src = iframeHref+"?formId="+formID;
-        setTimeout('returnToTop()', 30);
-
+        
+        dojo.io.iframe.setSrc(document.getElementById("portletsFrame"), iframeHref+"?formId="+formID,
true);
+        setTimeout('returnToTop()', 30);      
      }
      
     function returnToTop(){

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-only.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-only.jsp?rev=944986&r1=944985&r2=944986&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-only.jsp
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/portlets-only.jsp
Mon May 17 06:47:20 2010
@@ -31,7 +31,11 @@ limitations under the License.
 
 <script type="text/javascript">
     if(parent){
+       
+        if(!(parent.location.hash=="#noxssPage=<c:out value="${hashOfCurrentPortalPage}"/>"))
         parent.location.hash="#noxssPage=<c:out value="${hashOfCurrentPortalPage}"/>";
+        <!--window.parent.dojo.hash("#noxssPage=<c:out value='${hashOfCurrentPortalPage}'/>",true);-->
+        
     }
 </script>
 </body>

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=944986&r1=944985&r2=944986&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
Mon May 17 06:47:20 2010
@@ -37,22 +37,34 @@ recogonize a hash change when users clic
 
 dojo.require("dojo.hash");
 dojo.require("dojox.collections.Dictionary");
+dojo.require("dojo.io.iframe");
 
 var hash_iframeSrc_map= new dojox.collections.Dictionary;
 
+dojo.subscribe("/dojo/hashchange", this, this.onHashChange);
 
 function onHashChange(current_hash) {
 
-    if(current_hash&&!hash_iframeSrc_map.containsKey(current_hash)){
-
-        hash_iframeSrc_map.add(current_hash,document.getElementById("portletsFrame").src);
+    if(!current_hash||current_hash.length==0) return;
+    
+    var currentIframeHref=document.getElementById("portletsFrame").contentWindow.location.href;
+    
+    if(hash_iframeSrc_map.containsKey(current_hash)){
+    
+        var HrefForCurrentHash=hash_iframeSrc_map.entry(current_hash).value;
+    
+        if(HrefForCurrentHash==currentIframeHref) return;
 
+        dojo.io.iframe.setSrc(document.getElementById("portletsFrame"), hash_iframeSrc_map.entry(current_hash).value,
true);
+    
     } else {
-        document.getElementById("portletsFrame").src=""+hash_iframeSrc_map.entry(current_hash).value;
+    
+        hash_iframeSrc_map.add(current_hash,currentIframeHref);
+       
     }
 }
 
-dojo.subscribe("/dojo/hashchange", this, this.onHashChange);
+
 
 
 </script>



Mime
View raw message