Use jQuery.inArray() instead of array.indexOf() to be compatible with IE8

SVN:trunk[3019]
This commit is contained in:
Denis Flaven
2013-12-03 10:50:38 +00:00
parent 9b1d383848
commit 2b58bca313
2 changed files with 3 additions and 3 deletions

View File

@@ -301,11 +301,11 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
if (aMatches = this.name.match(re))
{
var idx = aMatches[1];
var index = aIndexes.indexOf(idx);
var index = jQuery.inArray(idx, aIndexes);
if (index == -1)
{
aIndexes.push(idx);
index = aIndexes.indexOf(idx);
index = jQuery.inArray(idx, aIndexes);
aValues[index] = {};
}
var value = $(this).val();

View File

@@ -264,7 +264,7 @@ function ValidateWithPattern(sFieldId, bMandatory, sPattern, sFormId, aForbidden
}
$('#'+sFieldId).removeAttr('title');
// Remove the element from the array
iFieldIdPos = oFormValidation[sFormId].indexOf(sFieldId);
iFieldIdPos = jQuery.inArray(sFieldId, oFormValidation[sFormId]);
if (iFieldIdPos > -1)
{
oFormValidation[sFormId].splice(iFieldIdPos, 1);