diff options
author | Byron Jones <glob@mozilla.com> | 2015-05-07 06:49:01 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-05-07 06:49:01 +0200 |
commit | 33a4bd46fd17ab28567cdeb2eb3733901f2a033e (patch) | |
tree | 2639f65e1e408482b8e1b65f73c2245ae58617ba /template/en/default/bug/field.html.tmpl | |
parent | 7a75256f5daa3b81bea0c6d47b53d2409568d7fa (diff) | |
download | bugzilla-33a4bd46fd17ab28567cdeb2eb3733901f2a033e.tar.gz bugzilla-33a4bd46fd17ab28567cdeb2eb3733901f2a033e.tar.xz |
Bug 1159589: migrate autocomplete from yui to jquery
r=dylan,a=glob
Diffstat (limited to 'template/en/default/bug/field.html.tmpl')
-rw-r--r-- | template/en/default/bug/field.html.tmpl | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index f1ddf633f..bfd385f9d 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -196,23 +196,20 @@ </script> [% END %] [% END %] - [% CASE constants.FIELD_TYPE_KEYWORDS %] - <div id="[% field.name FILTER html %]_container"> - <input type="text" id="[% field.name FILTER html %]" size="40" - class="text_input" name="[% field.name FILTER html %]" - value="[% value FILTER html %]"> - <div id="[% field.name FILTER html %]_autocomplete"></div> - </div> - <script type="text/javascript"> - if (typeof YAHOO.bugzilla.field_array === "undefined") - YAHOO.bugzilla.field_array = []; - YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [ - [%- FOREACH val = possible_values %] - [%-# %]"[% val FILTER js %]" - [%- "," IF NOT loop.last %][% END %]]; - YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]', - '[% field.name FILTER js %]_autocomplete'); - </script> + [% CASE constants.FIELD_TYPE_KEYWORDS %] + <input type="text" id="[% field.name FILTER html %]" size="40" + class="text_input bz_autocomplete_values" + name="[% field.name FILTER html %]" + data-values="[% field.name FILTER html %]" + value="[% value FILTER html %]"> + <script type="text/javascript"> + if (typeof BUGZILLA.autocomplete_values === 'undefined') + BUGZILLA.autocomplete_values = []; + BUGZILLA.autocomplete_values['[% field.name FILTER js %]'] = [ + [%- FOREACH val = possible_values %] + [%- %]"[% val FILTER js %]" + [%- "," IF NOT loop.last %][% END %]]; + </script> [% END %] [% ELSE %] [% SWITCH field.type %] |