From 2b58bca3136667957145f5394a934cea83818eba Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 3 Dec 2013 10:50:38 +0000 Subject: [PATCH] Use jQuery.inArray() instead of array.indexOf() to be compatible with IE8 SVN:trunk[3019] --- js/linkswidget.js | 4 ++-- js/property_field.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/linkswidget.js b/js/linkswidget.js index 1b8d61f00..8f1df0f11 100644 --- a/js/linkswidget.js +++ b/js/linkswidget.js @@ -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(); diff --git a/js/property_field.js b/js/property_field.js index 843342a5b..1a6e33e0b 100644 --- a/js/property_field.js +++ b/js/property_field.js @@ -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);