summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
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/bug
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/bug')
-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.tmpl31
-rw-r--r--template/en/default/bug/show-header.html.tmpl4
4 files changed, 19 insertions, 22 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index c9a7c7db9..23fb276c9 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -12,7 +12,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/bug.css']
javascript_urls = [ "js/attachment.js", "js/util.js",
"js/field.js", "js/TUI.js", "js/bug.js" ]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 5402624f6..460b5b697 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -12,11 +12,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>
&nbsp;
</div>
<div id="bz_ctag_error" class="bz_default_hidden">
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index f1ddf633f..bfd385f9d 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -196,23 +196,20 @@
</script>
[% END %]
[% END %]
- [% CASE constants.FIELD_TYPE_KEYWORDS %]
- <div id="[% field.name FILTER html %]_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="[% field.name FILTER html %]_autocomplete"></div>
- </div>
- <script type="text/javascript">
- if (typeof YAHOO.bugzilla.field_array === "undefined")
- YAHOO.bugzilla.field_array = [];
- YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
- [%- FOREACH val = possible_values %]
- [%-# %]"[% 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_KEYWORDS %]
+ <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 val = possible_values %]
+ [%- %]"[% val FILTER js %]"
+ [%- "," IF NOT loop.last %][% END %]];
+ </script>
[% END %]
[% ELSE %]
[% SWITCH field.type %]
diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl
index f18afed96..473df17da 100644
--- a/template/en/default/bug/show-header.html.tmpl
+++ b/template/en/default/bug/show-header.html.tmpl
@@ -24,8 +24,8 @@
[% END %]
[% title = title _ filtered_desc %]
[% generate_api_token = 1 %]
-[% yui = ['autocomplete', 'calendar'] %]
-[% yui.push('container') IF user.can_tag_comments %]
+[% yui = [ 'calendar' ] %]
+[% yui.push('json', 'connection', 'container') IF user.can_tag_comments %]
[% javascript_urls = [ "js/util.js", "js/field.js", "js/comments.js" ] %]
[% javascript_urls.push("js/bug.js") IF user.id %]
[% javascript_urls.push('js/comment-tagging.js')