Commit 9ea0a244 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Make submitter filter AJAX work in Firefox



.options can't be set in Firefox.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent eb4699b9
...@@ -99,8 +99,6 @@ function submitter_complete_response() ...@@ -99,8 +99,6 @@ function submitter_complete_response()
return; return;
} }
submitter_select.options = [];
for (i = 0; i < completions.length; i++) { for (i = 0; i < completions.length; i++) {
name = completions[i]['fields']['name']; name = completions[i]['fields']['name'];
if (name) { if (name) {
...@@ -112,6 +110,12 @@ function submitter_complete_response() ...@@ -112,6 +110,12 @@ function submitter_complete_response()
o = new Option(name, completions[i]['pk']); o = new Option(name, completions[i]['pk']);
submitter_select.options[i] = o; submitter_select.options[i] = o;
} }
/* remove remaining options */
for (; i < submitter_select.length; i++) {
submitter_select.options[i] = null;
}
submitter_select.disabled = false; submitter_select.disabled = false;
req = null; req = null;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment