summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
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/global
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/global')
-rw-r--r--template/en/default/global/header.html.tmpl8
-rw-r--r--template/en/default/global/userselect.html.tmpl25
2 files changed, 12 insertions, 21 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 65b96ec84..b05784ebe 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -43,7 +43,6 @@
[% IF NOT no_yui %]
[% SET yui_css = {
- autocomplete => 1,
calendar => 1,
datatable => 1,
button => 1,
@@ -54,8 +53,7 @@
# if that module is going to be specified in "yui".
#%]
[% SET yui_deps = {
- autocomplete => ['json', 'connection', 'datasource'],
- datatable => ['json', 'connection', 'datasource', 'element'],
+ datatable => ['json', 'connection', 'datasource', 'element'],
} %]
[%# When using certain YUI modules, we need to process certain
@@ -86,8 +84,8 @@
] %]
[% style_urls.import(jquery_css, jq_css_urls) FILTER null %]
-[%# Add jQuery cookie support %]
-[% jquery.push("cookie") %]
+[%# Add our required jQuery plugins %]
+[% jquery.push("cookie", "devbridgeAutocomplete") %]
[%# We should be able to set the default value of the header variable
# to the value of the title variable using the DEFAULT directive,
diff --git a/template/en/default/global/userselect.html.tmpl b/template/en/default/global/userselect.html.tmpl
index e2210c6f2..67d9f8d48 100644
--- a/template/en/default/global/userselect.html.tmpl
+++ b/template/en/default/global/userselect.html.tmpl
@@ -71,10 +71,14 @@
[% END %]
</select>
[% ELSE %]
- [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
- <div id="[% id FILTER html %]_autocomplete"
- [% IF classes %] class="[% classes.join(' ') FILTER html %]" [% END %]>
- [% END %]
+ [%
+ IF id && feature_enabled('jsonrpc') && Param('ajax_user_autocompletion');
+ IF !classes.defined;
+ classes = [];
+ END;
+ classes.push("bz_autocomplete_user");
+ END;
+ %]
<input
name="[% name FILTER html %]"
value="[% value FILTER html %]"
@@ -86,17 +90,6 @@
[% IF size %] size="[% size FILTER html %]" [% END %]
[% IF id %] id="[% id FILTER html %]" [% END %]
[% IF mandatory %] required [% END %]
+ [% IF multiple %] data-multiple="1" [% END %]
>
- [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
- <div id="[% id FILTER html %]_autocomplete_container"></div>
- </div>
- <script type="text/javascript">
- if( typeof(YAHOO.bugzilla.userAutocomplete) !== 'undefined'
- && YAHOO.bugzilla.userAutocomplete != null){
- YAHOO.bugzilla.userAutocomplete.init( "[% id FILTER js %]",
- "[% id FILTER js %]_autocomplete_container"
- [% IF multiple %], true[% END%]);
- }
- </script>
- [% END %]
[% END %]