summaryrefslogtreecommitdiffstats
path: root/template/en/default/search/field.html.tmpl
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-05-26 17:59:57 +0200
committerByron Jones <glob@mozilla.com>2015-05-26 17:59:57 +0200
commitf8b984852ae27f14a5f44e651193f00977737ab1 (patch)
tree7b7d631f17fa9b82844f0db79b605f157fa48e2c /template/en/default/search/field.html.tmpl
parent95e71eea95c977eb7512156be813ede7eb161600 (diff)
downloadbugzilla-f8b984852ae27f14a5f44e651193f00977737ab1.tar.gz
bugzilla-f8b984852ae27f14a5f44e651193f00977737ab1.tar.xz
Bug 1146782: backport bug 1159589 to bmo (migrate autocomplete from yui to jquery)
Diffstat (limited to 'template/en/default/search/field.html.tmpl')
-rw-r--r--template/en/default/search/field.html.tmpl21
1 files changed, 10 insertions, 11 deletions
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl
index ae7ca1ad4..d7cdfe886 100644
--- a/template/en/default/search/field.html.tmpl
+++ b/template/en/default/search/field.html.tmpl
@@ -56,20 +56,19 @@
types = types,
selected = type_selected
%]
- <div id="keyword_container">
- <input name="[% field.name FILTER html %]"
- id="[% field.name FILTER html %]" size="40"
- [% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
- value="[% value FILTER html %]">
- <div id="keyword_autocomplete"></div>
- </div>
- <script type="text/javascript" defer="defer">
- YAHOO.bugzilla.keyword_array = [
+ <input name="[% field.name FILTER html %]"
+ id="[% field.name FILTER html %]" size="40"
+ class="bz_autocomplete_values"
+ [% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
+ value="[% value FILTER html %]"
+ data-values="[% field.name FILTER html %]">
+ <script type="text/javascript">
+ if (typeof BUGZILLA.autocomplete_values === 'undefined')
+ BUGZILLA.autocomplete_values = [];
+ BUGZILLA.autocomplete_values['[% field.name FILTER js %]'] = [
[%- FOREACH keyword = all_keywords %]
[%-# %]"[% keyword.name FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
- YAHOO.bugzilla.keywordAutocomplete.init('[% field.name FILTER js %]',
- 'keyword_autocomplete');
</script>
[% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
[% INCLUDE "bug/field-label.html.tmpl"