Merged V3.2 to HEAD

17251: Merged DEV-TEMPORARY to V3.2
      17225: ETHREEOH-1938: Empty 'Output path pattern' can be saved -Create Web Project wizard -step 4
   17252: Removed old stuff; added proprietary db config
          - (Merge: Only put PostgreSQL in)
   17260: Merged V3.1 to V3.2
      17028: Merged V2.2 to V3.1
         17027: *RECORD ONLY* Fix for ETWOTWO-1158 - login.jsp does no longer redirects authenticated users.
      17220: Fix for ETHREEOH-3077 Empty 'Title' can be saved -Create Web Project wizard -step 4
      17221: Fix for ETHREEOH-1363 Next button is enabled when mandatory fields ...


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18031 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-01-14 14:32:27 +00:00
parent f56da7800c
commit f52a94eb01
6 changed files with 136 additions and 76 deletions

View File

@@ -295,5 +295,32 @@ function decode(str)
}
return s0;
}
/**
* This function validates Output Path Pattern parameter for Create Web Site and
* Create Form Wizards
*
* @param disablingElement -
* some input control for disabling if Pattern parameter is not valid
* @param outputPathInput -
* input that contains Pattern parameter
* @param additionalConditionInput -
* input that contains additional parameter for enabling
* disablingElement. If this parameter is 'null' then
* disablingElement will be enabled
*/
function validateOutputPathPattern(disabledElement, outputPathInput, additionalConditionInput)
{
var path = (null != outputPathInput) ? (outputPathInput.value) : (null);
var pattern = new RegExp("^([\\s\u0020]*)([^\\s\\u0020]+)([^\\0]*)$", "");
if ((null == path) || ("" == path) || !pattern.test(path))
{
disabledElement.disabled = true;
}
else
{
value = (null != additionalConditionInput) ? (additionalConditionInput.value) : (null);
disabledElement.disabled = (null != value) ? (("" == value.trim()) || !pattern.test(value)) : (false);
}
}