[mapguide-commits] r5352 - branches/2.2/MgDev/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Oct 28 07:41:53 EDT 2010
Author: jng
Date: 2010-10-28 04:41:53 -0700 (Thu, 28 Oct 2010)
New Revision: 5352
Modified:
branches/2.2/MgDev/Web/src/viewerfiles/mainframe.templ
Log:
Fix #1510: Update GettingStartedURL() to handle initial urls with querystring parameters
Modified: branches/2.2/MgDev/Web/src/viewerfiles/mainframe.templ
===================================================================
--- branches/2.2/MgDev/Web/src/viewerfiles/mainframe.templ 2010-10-28 11:41:01 UTC (rev 5351)
+++ branches/2.2/MgDev/Web/src/viewerfiles/mainframe.templ 2010-10-28 11:41:53 UTC (rev 5352)
@@ -258,11 +258,21 @@
}
function GettingStartedURL ()
-{
+{
if(defHome)
return homePage + "?WEBLAYOUT=" + encodeURIComponent(webLayout) + "&SESSION=" + GetMapFrame().GetSessionId() + "&LOCALE=" + locale + "&DWF=" + dwf;
else
- return homePage + "?SESSION=" + GetMapFrame().GetSessionId() + "&LOCALE=" + locale + "&MAPNAME=" + encodeURIComponent(GetMapFrame().GetMapName());
+ {
+ var baseUrl = homePage;
+ var query = "";
+ var index = homePage.indexOf("?");
+ if (index > 0)
+ {
+ baseUrl = homePage.substring(0, index);
+ query = "&" + homePage.substring(index+1);
+ }
+ return baseUrl + "?SESSION=" + GetMapFrame().GetSessionId() + "&LOCALE=" + locale + "&MAPNAME=" + encodeURIComponent(GetMapFrame().GetMapName()) + query;
+ }
}
function SetSelectionXML(xmlSet)
More information about the mapguide-commits
mailing list