From 33a4bd46fd17ab28567cdeb2eb3733901f2a033e Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 7 May 2015 12:49:01 +0800 Subject: Bug 1159589: migrate autocomplete from yui to jquery r=dylan,a=glob --- template/en/default/global/header.html.tmpl | 8 +++----- template/en/default/global/userselect.html.tmpl | 25 +++++++++---------------- 2 files changed, 12 insertions(+), 21 deletions(-) (limited to 'template/en/default/global') 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 %] [% ELSE %] - [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %] -
- [% END %] + [% + IF id && feature_enabled('jsonrpc') && Param('ajax_user_autocompletion'); + IF !classes.defined; + classes = []; + END; + classes.push("bz_autocomplete_user"); + END; + %] - [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %] -
-
- - [% END %] [% END %] -- cgit v1.2.3-24-g4f1b