[Commits] r1250 - apps/opengeo/geoexplorer/trunk/src/script/app

commits at geoext.org commits at geoext.org
Tue Jul 14 19:39:00 CEST 2009


Author: tschaub
Date: 2009-07-14 19:39:00 +0200 (Tue, 14 Jul 2009)
New Revision: 1250

Modified:
   apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
Log:
Maintain all url components when creating bookmark.

Modified: apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-13 23:17:31 UTC (rev 1249)
+++ apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-14 17:39:00 UTC (rev 1250)
@@ -1234,15 +1234,17 @@
      * reload the map in its current configuration.
      */ 
     bookmark: function(){
-        var config = this.extractConfiguration();
 
-        var query = Ext.urlEncode({q: Ext.util.JSON.encode(config)});
+        var params = Ext.apply(
+            OpenLayers.Util.getParameters(),
+            {q: Ext.util.JSON.encode(this.extractConfiguration())}
+        );
+        
+        // disregard any hash in the url, but maintain all other components
+        var url =
+            document.location.href.split("?").shift() +
+            "?" + Ext.urlEncode(params);
 
-        var url = 
-            document.location.protocol + "//" +
-            document.location.hostname +
-            document.location.pathname + "?" + query;
-
         var win = new Ext.Window({
             title: "Bookmark URL",
             layout: 'form',



More information about the Commits mailing list