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

commits at geoext.org commits at geoext.org
Tue Jul 14 23:15:27 CEST 2009


Author: tschaub
Date: 2009-07-14 23:15:26 +0200 (Tue, 14 Jul 2009)
New Revision: 1255

Modified:
   apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer/Full.js
Log:
Use window.location instead of document.location.  The host property includes the port.

Modified: apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer/Full.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer/Full.js	2009-07-14 19:54:24 UTC (rev 1254)
+++ apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer/Full.js	2009-07-14 21:15:26 UTC (rev 1255)
@@ -113,10 +113,10 @@
             var query = Ext.urlEncode({q: Ext.util.JSON.encode(config)}); 
 
             // TODO: configurablize!!!1!!!!!111!!!!!!
-            var pathname = document.location.pathname.replace(/\/[^\/]*$/, '/embed.html'); 
+            var pathname = window.location.pathname.replace(/\/[^\/]*$/, '/embed.html'); 
             var url = 
-                document.location.protocol + "//" +
-                document.location.hostname +
+                window.location.protocol + "//" +
+                window.location.host +
                 pathname + "?" + query;
 
             snippetArea.setValue('<iframe height="' + heightField.getValue() +



More information about the Commits mailing list