summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/en/default/account/prefs/prefs.html.tmpl1
-rw-r--r--template/en/default/admin/components/create.html.tmpl1
-rw-r--r--template/en/default/admin/components/edit.html.tmpl1
-rw-r--r--template/en/default/attachment/create.html.tmpl1
-rw-r--r--template/en/default/attachment/edit.html.tmpl1
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
-rw-r--r--template/en/default/bug/edit.html.tmpl4
-rw-r--r--template/en/default/bug/field.html.tmpl25
-rw-r--r--template/en/default/bug/show-header.html.tmpl2
-rw-r--r--template/en/default/global/header.html.tmpl6
-rw-r--r--template/en/default/global/userselect.html.tmpl62
-rw-r--r--template/en/default/list/list.html.tmpl2
-rw-r--r--template/en/default/request/queue.html.tmpl1
-rw-r--r--template/en/default/search/field.html.tmpl21
-rw-r--r--template/en/default/search/form.html.tmpl18
-rw-r--r--template/en/default/search/search-advanced.html.tmpl2
-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
19 files changed, 63 insertions, 93 deletions
diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl
index 289a155ea..1fcb3e25a 100644
--- a/template/en/default/account/prefs/prefs.html.tmpl
+++ b/template/en/default/account/prefs/prefs.html.tmpl
@@ -43,7 +43,6 @@
style_urls = ['skins/standard/admin.css']
javascript_urls = ['js/util.js', 'js/field.js', 'js/TUI.js']
doc_section = "userpreferences.html"
- yui = ['autocomplete']
%]
[% tabs = [{ name => "settings", label => "General Preferences",
diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl
index a95d45399..b6b79f8b6 100644
--- a/template/en/default/admin/components/create.html.tmpl
+++ b/template/en/default/admin/components/create.html.tmpl
@@ -26,7 +26,6 @@
[% title = BLOCK %]Add component to the [% product.name FILTER html %] product[% END %]
[% PROCESS global/header.html.tmpl
- yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
title = title
generate_api_token = 1
diff --git a/template/en/default/admin/components/edit.html.tmpl b/template/en/default/admin/components/edit.html.tmpl
index 874310ac8..e1083e7e8 100644
--- a/template/en/default/admin/components/edit.html.tmpl
+++ b/template/en/default/admin/components/edit.html.tmpl
@@ -34,7 +34,6 @@
[% PROCESS global/header.html.tmpl
title = title
generate_api_token = 1
- yui = [ 'autocomplete' ]
javascript_urls = [ "js/field.js" ]
%]
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index 0380f7ddd..ff359338a 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -35,7 +35,6 @@
subheader = subheader
generate_api_token = 1
style_urls = [ 'skins/standard/attachment.css' ]
- yui = [ 'autocomplete' ]
javascript_urls = [ "js/attachment.js", 'js/field.js', "js/util.js", "js/TUI.js" ]
doc_section = "attachments.html"
%]
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 9a1763642..6bd75f448 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -41,7 +41,6 @@
doc_section = "attachments.html"
javascript_urls = ['js/attachment.js', 'js/field.js']
style_urls = ['skins/standard/attachment.css']
- yui = [ 'autocomplete' ]
bodyclasses = "no_javascript"
%]
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index fc1bc5420..b3619f993 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -31,7 +31,7 @@
[% PROCESS global/header.html.tmpl
title = title
generate_api_token = 1
- yui = [ 'autocomplete', 'calendar', 'datatable', 'button' ]
+ yui = [ 'calendar', 'datatable', 'button' ]
style_urls = [ 'skins/standard/attachment.css',
'skins/standard/enter_bug.css',
'skins/custom/create_bug.css' ]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 0fc8762a4..eba5702e3 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -34,11 +34,11 @@
[% IF user.can_tag_comments %]
<div id="bz_ctag_div" class="bz_default_hidden">
<a href="javascript:void(0)" onclick="YAHOO.bugzilla.commentTagging.hideInput()">x</a>
- <div>
+ <span>
<input id="bz_ctag_add" size="10" placeholder="add tag"
maxlength="[% constants.MAX_COMMENT_TAG_LENGTH FILTER html %]">
<span id="bz_ctag_autocomp"></span>
- </div>
+ </span>
[<a href="https://wiki.mozilla.org/BMO/comment_tagging"
target="_blank" title="About Comment Tagging">help</a>]
&nbsp;
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 366fe1144..ba1237dc0 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -235,19 +235,18 @@
[% END %]
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
- <div id="keyword_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="keyword_autocomplete"></div>
- </div>
- <script type="text/javascript" defer="defer">
- YAHOO.bugzilla.keyword_array = [
- [%- FOREACH keyword = active_keywords %]
- [%-# %]"[% keyword.name FILTER js %]"
- [%- "," IF NOT loop.last %][% END %]];
- YAHOO.bugzilla.keywordAutocomplete.init('[% field.name FILTER js %]',
- 'keyword_autocomplete');
+ <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 keyword = active_keywords %]
+ [%- %]"[% keyword.name FILTER js %]"
+ [%- "," IF NOT loop.last %][% END %]];
</script>
[% CASE constants.FIELD_TYPE_EXTENSION %]
[% Hook.process('editable') %]
diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl
index 6170d7a45..e7d0a07fb 100644
--- a/template/en/default/bug/show-header.html.tmpl
+++ b/template/en/default/bug/show-header.html.tmpl
@@ -39,7 +39,7 @@
[% generate_api_token = 1 %]
[% header = "$terms.Bug&nbsp;$bug.bug_id" %]
[% header_addl_info = "Last modified: $filtered_timestamp" %]
-[% yui = ['autocomplete', 'calendar'] %]
+[% yui = ['calendar', 'connection', 'json'] %]
[% yui.push('container') IF user.can_tag_comments %]
[% javascript_urls = [ "js/util.js", "js/field.js" ] %]
[% javascript_urls.push("js/bug.js") IF user.id %]
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 5528a96c2..086191a39 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -58,7 +58,6 @@
[% IF NOT no_yui %]
[% SET yui_css = {
- autocomplete => 1,
calendar => 1,
datatable => 1,
button => 1,
@@ -69,7 +68,6 @@
# if that module is going to be specified in "yui".
#%]
[% SET yui_deps = {
- autocomplete => ['json', 'connection', 'datasource'],
datatable => ['json', 'connection', 'datasource', 'element'],
} %]
@@ -101,8 +99,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 d7b4786f9..f7dc03d89 100644
--- a/template/en/default/global/userselect.html.tmpl
+++ b/template/en/default/global/userselect.html.tmpl
@@ -1,19 +1,9 @@
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Bug Tracking System.
- #
- # Contributor(s): Byron Jones <bugzilla@glob.com.au>
- # Frédéric Buclin <LpSolit@gmail.com>
- # Guy Pyrzak <guy.pyrzak@gmail.com>
- # Reed Loden <reed@reedloden.com>
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
#%]
[%# INTERFACE:
@@ -31,6 +21,7 @@
# custom_userlist: optional, specify a limited list of users to use
# field_title: optional, extra information to display as a tooltip
# placeholder: optional, input only; placeholder attribute value
+ # mandatory: optional; if true, the field cannot be empty.
#%]
[% IF Param("usemenuforusers") %]
@@ -42,6 +33,7 @@
[% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
[% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %]
[% IF field_title %] title="[% field_title FILTER html %]" [% END %]
+ [% IF mandatory %] required [% END %]
>
[% IF emptyok %]
<option value=""></option>
@@ -54,12 +46,14 @@
[% custom_userlist = user.get_userlist %]
[% END %]
- [% SET selected = {} %]
- [% IF value.defined %]
- [% FOREACH selected_value IN value.split(', ') %]
- [% SET selected.$selected_value = 1 %]
- [% END %]
- [% END %]
+ [%
+ SET selected = {};
+ IF value.defined;
+ FOREACH selected_value IN value.split(', ');
+ SET selected.$selected_value = 1;
+ END;
+ END;
+ %]
[% FOREACH tmpuser = custom_userlist %]
[% IF tmpuser.visible OR selected.${tmpuser.login} == 1 %]
@@ -80,10 +74,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 %]"
@@ -95,17 +93,7 @@
[% IF size %] size="[% size FILTER html %]" [% END %]
[% IF placeholder %] placeholder="[% placeholder 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 %]
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index 73e58c30f..0920a0669 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -48,7 +48,7 @@
generate_api_token = dotweak
style = style
atomlink = "buglist.cgi?$urlquerypart&title=$url_filtered_title&ctype=atom"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript_urls = [ "js/util.js", "js/field.js" ]
style_urls = [ "skins/standard/buglist.css" ]
doc_section = "query.html#list"
diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl
index d1920a132..64353b4dc 100644
--- a/template/en/default/request/queue.html.tmpl
+++ b/template/en/default/request/queue.html.tmpl
@@ -29,7 +29,6 @@
onload="var f = document.request_form; selectProduct(f.product, f.component, null, null, 'Any');"
javascript_urls=["js/productform.js", "js/field.js"]
style_urls = ['skins/standard/buglist.css']
- yui = ['autocomplete']
%]
<script type="text/javascript">
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"
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index 1b9b8310f..2e36eb9e3 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -344,19 +344,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 f42a9cb00..04ab3d06f 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -45,7 +45,7 @@ function remove_token() {
generate_api_token = 1
onload = "doOnSelectProduct(0);"
javascript = js_data
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript_urls = [ "js/productform.js", "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = [ "skins/standard/search_form.css" ]
doc_section = "query.html"
diff --git a/template/en/default/search/search-create-series.html.tmpl b/template/en/default/search/search-create-series.html.tmpl
index 85d54e51c..6b7678b23 100644
--- a/template/en/default/search/search-create-series.html.tmpl
+++ b/template/en/default/search/search-create-series.html.tmpl
@@ -34,7 +34,7 @@
title = "Create New Data Set"
generate_api_token = 1
onload = "doOnSelectProduct(0);"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/search_form.css" ]
diff --git a/template/en/default/search/search-report-graph.html.tmpl b/template/en/default/search/search-report-graph.html.tmpl
index 383e10220..20e8e184d 100644
--- a/template/en/default/search/search-report-graph.html.tmpl
+++ b/template/en/default/search/search-report-graph.html.tmpl
@@ -33,7 +33,7 @@ var queryform = "reportform"
title = "Generate Graphical Report"
generate_api_token = 1
onload = "doOnSelectProduct(0); chartTypeChanged()"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/search_form.css" ]
diff --git a/template/en/default/search/search-report-table.html.tmpl b/template/en/default/search/search-report-table.html.tmpl
index 872773b07..7ff54b8da 100644
--- a/template/en/default/search/search-report-table.html.tmpl
+++ b/template/en/default/search/search-report-table.html.tmpl
@@ -33,7 +33,7 @@ var queryform = "reportform"
title = "Generate Tabular Report"
generate_api_token = 1
onload = "doOnSelectProduct(0)"
- yui = [ 'autocomplete', 'calendar' ]
+ yui = [ 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/productform.js", "js/TUI.js", "js/field.js" ]
style_urls = [ "skins/standard/search_form.css" ]