summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-05-07 06:49:01 +0200
committerByron Jones <glob@mozilla.com>2015-05-07 06:49:01 +0200
commit33a4bd46fd17ab28567cdeb2eb3733901f2a033e (patch)
tree2639f65e1e408482b8e1b65f73c2245ae58617ba /template/en/default/search
parent7a75256f5daa3b81bea0c6d47b53d2409568d7fa (diff)
downloadbugzilla-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/search')
-rw-r--r--template/en/default/search/field.html.tmpl23
-rw-r--r--template/en/default/search/form.html.tmpl18
-rw-r--r--template/en/default/search/search-advanced.html.tmpl3
-rw-r--r--template/en/default/search/search-create-series.html.tmpl2
-rw-r--r--template/en/default/search/search-report-graph.html.tmpl2
-rw-r--r--template/en/default/search/search-report-table.html.tmpl2
6 files changed, 20 insertions, 30 deletions
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl
index 5a95d67c1..b2013eff6 100644
--- a/template/en/default/search/field.html.tmpl
+++ b/template/en/default/search/field.html.tmpl
@@ -35,22 +35,19 @@
types = types,
selected = type_selected
%]
- <div id="[% field.name FILTER html %]_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 %]" [% 'autofocus' IF focus %]>
- <div id="[% field.name FILTER html %]_autocomplete"></div>
- </div>
+ <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 %]" [% 'autofocus' IF focus %]
+ data-values="[% field.name FILTER html %]">
<script type="text/javascript">
- if (typeof YAHOO.bugzilla.field_array === "undefined")
- YAHOO.bugzilla.field_array = [];
- YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
+ if (typeof BUGZILLA.autocomplete_values === 'undefined')
+ BUGZILLA.autocomplete_values = [];
+ BUGZILLA.autocomplete_values['[% field.name FILTER js %]'] = [
[%- FOREACH val = possible_values %]
- [%-# %]"[% val FILTER js %]"
+ [%- %]"[% 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_DATETIME, constants.FIELD_TYPE_DATE] %]
[% INCLUDE "bug/field-label.html.tmpl"
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index c9265f076..410bd2d20 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -268,19 +268,11 @@ TUI_hide_default('information_query');
[% " selected" IF default.emailtype.$n == qv.name %]>[% qv.description %]</option>
[% END %]
</select>
- [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]
- <div id="email[% n %]_autocomplete">
- [% END %]
- <input name="email[% n %]" class="email" id="email[% n %]"
- value="[% default.email.$n FILTER html %]">
- [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]
- <div id="email[% n %]_autocomplete_container"></div>
- </div>
- <script type="text/javascript">
- YAHOO.bugzilla.userAutocomplete.init( "email[% n %]",
- "email[% n %]_autocomplete_container");
- </script>
- [% END %]
+ <input
+ name="email[% n %]"
+ class="email [% "bz_autocomplete_user" IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') %]"
+ id="email[% n %]"
+ value="[% default.email.$n FILTER html %]">
</div>
[% END %]
[% Hook.process('email_numbering_end') %]
diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl
index 07c5fc528..af07aa475 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -26,7 +26,8 @@ function remove_token() {
[% PROCESS global/header.html.tmpl
title = "Search for $terms.bugs"
- yui = [ 'autocomplete', 'calendar' ]
+ generate_api_token = 1
+ yui = [ 'calendar' ]
javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-create-series.html.tmpl b/template/en/default/search/search-create-series.html.tmpl
index 95750ebc0..6df1a79d3 100644
--- a/template/en/default/search/search-create-series.html.tmpl
+++ b/template/en/default/search/search-create-series.html.tmpl
@@ -19,7 +19,7 @@
[% PROCESS global/header.html.tmpl
title = "Create New Data Set"
onload = "doOnSelectProduct(0);"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-report-graph.html.tmpl b/template/en/default/search/search-report-graph.html.tmpl
index b382edf95..6cbafd11c 100644
--- a/template/en/default/search/search-report-graph.html.tmpl
+++ b/template/en/default/search/search-report-graph.html.tmpl
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Graphical Report"
onload = "doOnSelectProduct(0); chartTypeChanged()"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']
diff --git a/template/en/default/search/search-report-table.html.tmpl b/template/en/default/search/search-report-table.html.tmpl
index 483fd5b07..18c871313 100644
--- a/template/en/default/search/search-report-table.html.tmpl
+++ b/template/en/default/search/search-report-table.html.tmpl
@@ -18,7 +18,7 @@ var queryform = "reportform"
[% PROCESS global/header.html.tmpl
title = "Generate Tabular Report"
onload = "doOnSelectProduct(0)"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
style_urls = ['skins/standard/buglist.css']