You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@apache.org on 2010/04/30 15:43:45 UTC

svn commit: r939671 - in /geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes: navigation.jsp portlets-with-tree.jsp

Author: genspring
Date: Fri Apr 30 13:43:44 2010
New Revision: 939671

URL: http://svn.apache.org/viewvc?rev=939671&view=rev
Log:
GERONIMO-5217 History.back and History.forward is not working correctly after change the console navigation to ajax.

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-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=939671&r1=939670&r2=939671&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 Fri Apr 30 13:43:44 2010
@@ -63,7 +63,6 @@ limitations under the License.
 <%=generator.generateLinks(pageConfigList, request.getContextPath(), "/images/ico_doc_16x16.gif")%>
 </div>
 
-<script type="text/javascript" src="/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
 
 <script type="text/javascript">
 
@@ -176,6 +175,7 @@ function load() {
     
         document.getElementById("portletsFrame").src = iframeHref+"?formId="+formID;
         setTimeout('returnToTop()', 30);
+
      }
      
     function returnToTop(){

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=939671&r1=939670&r2=939671&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 Fri Apr 30 13:43:44 2010
@@ -25,6 +25,39 @@ limitations under the License.
 
 <body id="admin-console" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0">
 
+
+<script type="text/javascript" src="/dojo/dojo/dojo.js" djConfig="parseOnLoad: true">
+
+</script>
+
+
+<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.--%>
+
+dojo.require("dojo.hash");
+dojo.require("dojox.collections.Dictionary");
+
+var hash_iframeSrc_map= new dojox.collections.Dictionary;
+
+
+function onHashChange(current_hash) {
+
+    if(current_hash&&!hash_iframeSrc_map.containsKey(current_hash)){
+
+        hash_iframeSrc_map.add(current_hash,document.getElementById("portletsFrame").src);
+
+    } else {
+        document.getElementById("portletsFrame").src=""+hash_iframeSrc_map.entry(current_hash).value;
+    }
+}
+
+dojo.subscribe("/dojo/hashchange", this, this.onHashChange);
+
+
+</script>
+
+
 <script language="JavaScript">
 
 <%-- When there's hash in current page url