ソースを参照

Make sure that the root URL ends with a slash

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1380 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 年 前
コミット
d2ca7164cc
1 ファイル変更16 行追加5 行削除
  1. 16 5
      setup/setup.js

+ 16 - 5
setup/setup.js

@@ -113,11 +113,22 @@ function DoSubmit(sMsg, iStep)
 		else
 		{
 			var bMatch = appPath.match(/^http(?:s)?\:\/\//);
-		if (!bMatch)
-		{
-			alert('"'+appPath+'" does not look like a valid URL for the application...\nPlease check your input.');
-			bResult = false;
-		}
+			if (!bMatch)
+			{
+				alert('"'+appPath+'" does not look like a valid URL for the application...\nPlease check your input.');
+				bResult = false;
+			}
+			else
+			{
+				// Make sure that the root URL ends with a slash
+				var bMatch = appPath.match(/\/$/);
+				if (!bMatch)
+				{
+					// If not, add a slash at the end
+					appPath += '/';
+					$('#application_path').val(appPath);
+				}
+			}
 		}
 
 		break;