]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 471518: "Field only appears when:" produces a JavaScript error in Internet Explorer
authorguy.pyrzak%gmail.com <>
Fri, 23 Jan 2009 21:08:13 +0000 (21:08 +0000)
committerguy.pyrzak%gmail.com <>
Fri, 23 Jan 2009 21:08:13 +0000 (21:08 +0000)
Patch By Jill Foley <jillpf55@sbcglobal.net> r=mkanat, a=mkanat

js/util.js
template/en/default/admin/custom_fields/cf-js.js.tmpl

index 86924210ca889c189576750160092c5fb1d1c78a..8e787847a4de21d2ff3ff6e7f7d926cb2cca260e 100644 (file)
@@ -166,7 +166,7 @@ function bz_isValueInArray(aArray, aValue)
  */
 function bz_createOptionInSelect(aSelect, aTextValue, aValue) {
   var myOption = new Option(aTextValue, aValue);
-  aSelect.appendChild(myOption);
+  aSelect.options[aSelect.length] = myOption;
   return myOption;
 }
 
index 6c5bbf626240c130eeeda23788c6ddd36fa2f707..891f5da7641782cab6e7f012af181b6435254dc4 100644 (file)
@@ -27,7 +27,7 @@ var select_values = new Array();
 [% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %]
   select_values[[% sel_field.id FILTER js %]] = [
   [% FOREACH legal_value = sel_field.legal_values %]
-    [[% legal_value.id FILTER js %], '[% legal_value.name FILTER html %]'],
+    [[% legal_value.id FILTER js %], '[% legal_value.name FILTER html %]'][% ',' UNLESS loop.last %]
   [% END %]
   ];
 [% END %]