瀏覽代碼

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3019 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 年之前
父節點
當前提交
7191078b82
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      js/linkswidget.js
  2. 1 1
      js/property_field.js

+ 2 - 2
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();

+ 1 - 1
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);