[Commits] r1251 - apps/opengeo/geoexplorer/branches/0.1.x/lib

commits at geoext.org commits at geoext.org
Tue Jul 14 19:41:18 CEST 2009


Author: tschaub
Date: 2009-07-14 19:41:17 +0200 (Tue, 14 Jul 2009)
New Revision: 1251

Modified:
   apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js
Log:
r1250 for the branch

Modified: apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js	2009-07-14 17:39:00 UTC (rev 1250)
+++ apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js	2009-07-14 17:41:17 UTC (rev 1251)
@@ -998,15 +998,17 @@
      *{String} The URL displayed to the user.
      */ 
     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