bug #3431427: Fix for enum and set columns

This commit is contained in:
Madhura Jayaratne
2011-11-20 23:01:58 +05:30
parent f414a0ec32
commit ff0ea2f9b9

View File

@@ -26,10 +26,9 @@ function nullify(theType, urlField, md5Field, multi_edit)
rowForm.elements['funcs' + multi_edit + '[' + md5Field + ']'].selectedIndex = -1; rowForm.elements['funcs' + multi_edit + '[' + md5Field + ']'].selectedIndex = -1;
} }
// "SET" field , "ENUM" field with more than 20 characters // "ENUM" field with more than 20 characters
// or foreign key field (drop-down) if (theType == 1) {
if (theType == 1 || theType == 3 || theType == 4) { rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'][1].selectedIndex = -1;
rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'].selectedIndex = -1;
} }
// Other "ENUM" field // Other "ENUM" field
else if (theType == 2) { else if (theType == 2) {
@@ -45,6 +44,14 @@ function nullify(theType, urlField, md5Field, multi_edit)
} // end if } // end if
} }
// "SET" field
else if (theType == 3) {
rowForm.elements['fields' + multi_edit + '[' + md5Field + '][]'].selectedIndex = -1;
}
// Foreign key field (drop-down)
else if (theType == 4) {
rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'].selectedIndex = -1;
}
// foreign key field (with browsing icon for foreign values) // foreign key field (with browsing icon for foreign values)
else if (theType == 6) { else if (theType == 6) {
rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'].value = ''; rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'].value = '';