[mapguide-commits] r6869 - branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jul 6 08:31:56 PDT 2012


Author: jng
Date: 2012-07-06 08:31:55 -0700 (Fri, 06 Jul 2012)
New Revision: 6869

Modified:
   branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setactiontarget.js
   branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setajaxactiontarget.js
   branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setdwfactiontarget.js
Log:
#1299: Do not hardcode "/mapguide". Instead follow on from that the split url gives us. This allows for virtual directory names other than "mapguide" to work.

Modified: branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setactiontarget.js
===================================================================
--- branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setactiontarget.js	2012-07-06 15:25:20 UTC (rev 6868)
+++ branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setactiontarget.js	2012-07-06 15:31:55 UTC (rev 6869)
@@ -1,5 +1,5 @@
 function SetActionTarget()
 {
     var splitUrl = document.URL.split('/');
-    document.input.action = splitUrl[0]+"//"+splitUrl[2]+"/mapguide/mapagent/mapagent.fcgi";
+    document.input.action = splitUrl[0]+"//"+splitUrl[2]+"/"+splitUrl[3]+"/mapagent/mapagent.fcgi";
 }

Modified: branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setajaxactiontarget.js
===================================================================
--- branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setajaxactiontarget.js	2012-07-06 15:25:20 UTC (rev 6868)
+++ branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setajaxactiontarget.js	2012-07-06 15:31:55 UTC (rev 6869)
@@ -1,18 +1,18 @@
 function SetAjaxActionTarget()
 {
     var splitUrl = document.URL.split('/');
-    var url = splitUrl[0]+"//"+splitUrl[2];
+    var url = splitUrl[0]+"//"+splitUrl[2]+"/"+splitUrl[3];
 
     if (document.input.agent[0].checked)
     {
-        document.input.action = url+"/mapguide/mapviewerphp/ajaxviewer.php";
+        document.input.action = url+"/mapviewerphp/ajaxviewer.php";
     }
     else if (document.input.agent[1].checked)
     {
-        document.input.action = url+"/mapguide/mapviewernet/ajaxviewer.aspx";
+        document.input.action = url+"/mapviewernet/ajaxviewer.aspx";
     }
     else if (document.input.agent[2].checked)
     {
-        document.input.action = url+"/mapguide/mapviewerjava/ajaxviewer.jsp";
+        document.input.action = url+"/mapviewerjava/ajaxviewer.jsp";
     }
 }

Modified: branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setdwfactiontarget.js
===================================================================
--- branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setdwfactiontarget.js	2012-07-06 15:25:20 UTC (rev 6868)
+++ branches/2.4/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/setdwfactiontarget.js	2012-07-06 15:31:55 UTC (rev 6869)
@@ -1,18 +1,18 @@
 function SetDwfActionTarget()
 {
     var splitUrl = document.URL.split('/');
-    var url = splitUrl[0]+"//"+splitUrl[2];
+    var url = splitUrl[0]+"//"+splitUrl[2]+"/"+splitUrl[3];
 
     if (document.input.agent[0].checked)
     {
-        document.input.action = url+"/mapguide/mapviewerphp/dwfviewer.php";
+        document.input.action = url+"/mapviewerphp/dwfviewer.php";
     }
     else if (document.input.agent[1].checked)
     {
-        document.input.action = url+"/mapguide/mapviewernet/dwfviewer.aspx";
+        document.input.action = url+"/mapviewernet/dwfviewer.aspx";
     }
     else if (document.input.agent[2].checked)
     {
-        document.input.action = url+"/mapguide/mapviewerjava/dwfviewer.jsp";
+        document.input.action = url+"/mapviewerjava/dwfviewer.jsp";
     }
 }



More information about the mapguide-commits mailing list