summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorGuy Pyrzak <guy.pyrzak@gmail.com>2010-02-22 01:00:53 +0100
committerGuy Pyrzak <guy.pyrzak@gmail.com>2010-02-22 01:00:53 +0100
commit59ed17e8610c3d1b40e4f47a936a34e9c3f2cde8 (patch)
tree120239facf0172cb7ab89ef4bd39b9b17e4c8224 /template
parentea17a5ebc0448e912fb59e03a6d3052a6159edfc (diff)
downloadbugzilla-59ed17e8610c3d1b40e4f47a936a34e9c3f2cde8.tar.gz
bugzilla-59ed17e8610c3d1b40e4f47a936a34e9c3f2cde8.tar.xz
Bug 490923: Autocomplete assignee, qa contact, and cc on the client side
r=LpSolit, a=mkanat
Diffstat (limited to 'template')
-rw-r--r--template/en/default/admin/components/create.html.tmpl2
-rw-r--r--template/en/default/admin/components/edit.html.tmpl2
-rw-r--r--template/en/default/bug/create/create.html.tmpl9
-rw-r--r--template/en/default/bug/field.html.tmpl3
-rw-r--r--template/en/default/bug/show-header.html.tmpl7
-rw-r--r--template/en/default/global/header.html.tmpl2
-rw-r--r--template/en/default/global/userselect.html.tmpl34
-rw-r--r--template/en/default/list/list.html.tmpl6
8 files changed, 46 insertions, 19 deletions
diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl
index 86411adad..0b1fd6f57 100644
--- a/template/en/default/admin/components/create.html.tmpl
+++ b/template/en/default/admin/components/create.html.tmpl
@@ -26,6 +26,8 @@
[% title = BLOCK %]Add component to the [% product.name FILTER html %] product[% END %]
[% PROCESS global/header.html.tmpl
+ style_urls = [ 'skins/standard/yui/autocomplete.css']
+ javascript_urls = [ "js/yui/bz_autocomplete_bundle.js", "js/field.js"]
title = title
%]
diff --git a/template/en/default/admin/components/edit.html.tmpl b/template/en/default/admin/components/edit.html.tmpl
index 9ddb8ca3e..267bfc5c3 100644
--- a/template/en/default/admin/components/edit.html.tmpl
+++ b/template/en/default/admin/components/edit.html.tmpl
@@ -33,6 +33,8 @@
[% END %]
[% PROCESS global/header.html.tmpl
title = title
+ style_urls = [ 'skins/standard/yui/autocomplete.css']
+ javascript_urls = [ "js/yui/bz_autocomplete_bundle.js", "js/field.js"]
%]
<form method="post" action="editcomponents.cgi">
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index dce1da762..d82587672 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -30,9 +30,11 @@
[% PROCESS global/header.html.tmpl
title = title
- style_urls = [ 'skins/standard/create_attachment.css',
+ style_urls = [ 'skins/standard/yui/autocomplete.css',
+ 'skins/standard/create_attachment.css',
'skins/standard/yui/calendar.css' ]
- javascript_urls = [ "js/attachment.js", "js/util.js", "js/yui/calendar.js",
+ javascript_urls = [ "js/yui/bz_autocomplete_bundle.js",
+ "js/attachment.js", "js/util.js", "js/yui/calendar.js",
"js/field.js", "js/TUI.js" ]
onload = 'set_assign_to();'
%]
@@ -384,6 +386,7 @@ TUI_hide_default('expert_fields');
<th><a href="page.cgi?id=fields.html#assigned_to">Assign To</a>:</th>
<td colspan="2">
[% INCLUDE global/userselect.html.tmpl
+ id => "assigned_to"
name => "assigned_to"
value => assigned_to
disabled => assigned_to_disabled
@@ -400,6 +403,7 @@ TUI_hide_default('expert_fields');
<th>QA Contact:</th>
<td colspan="2">
[% INCLUDE global/userselect.html.tmpl
+ id => "qa_contact"
name => "qa_contact"
value => qa_contact
disabled => qa_contact_disabled
@@ -416,6 +420,7 @@ TUI_hide_default('expert_fields');
<th>CC:</th>
<td colspan="2">
[% INCLUDE global/userselect.html.tmpl
+ id => "cc"
name => "cc"
value => cc
disabled => cc_disabled
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 482f88219..2f1ad35ca 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -87,8 +87,7 @@
<span>Calendar</span>
</button>
- <div id="con_calendar_[% field.name FILTER html %]"
- class="yui-skin-sam"></div>
+ <div id="con_calendar_[% field.name FILTER html %]"></div>
<script type="text/javascript">
createCalendar('[% field.name FILTER js %]')
diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl
index 3f81e5738..c260f6902 100644
--- a/template/en/default/bug/show-header.html.tmpl
+++ b/template/en/default/bug/show-header.html.tmpl
@@ -34,11 +34,12 @@
[% title = "$terms.Bug $bug.bug_id &ndash; $filtered_desc" %]
[% header = "$terms.Bug&nbsp;$bug.bug_id" %]
[% header_addl_info = "Last modified: $filtered_timestamp" %]
-[% javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ] %]
-[% style_urls = [ "skins/standard/yui/calendar.css",
+[% javascript_urls = [ "js/yui/bz_autocomplete_bundle.js",
+ "js/util.js", "js/field.js", "js/yui/calendar.js" ] %]
+[% style_urls = [ "skins/standard/yui/autocomplete.css",
+ "skins/standard/yui/calendar.css",
"skins/standard/show_bug.css" ] %]
[% doc_section = "bug_page.html" %]
-
[% bodyclasses = ['bz_bug',
"bz_status_$bug.bug_status",
"bz_product_$bug.product",
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 904a89d45..8e94e86f4 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -260,7 +260,7 @@
class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') %]
[% FOREACH class = bodyclasses %]
[% ' ' %][% class FILTER css_class_quote %]
- [% END %]">
+ [% END %] yui-skin-sam">
[%# Migration note: the following file corresponds to the old Param
# 'bannerhtml'
diff --git a/template/en/default/global/userselect.html.tmpl b/template/en/default/global/userselect.html.tmpl
index 35075ef9d..2a2d2cd52 100644
--- a/template/en/default/global/userselect.html.tmpl
+++ b/template/en/default/global/userselect.html.tmpl
@@ -12,6 +12,7 @@
#
# Contributor(s): Byron Jones <bugzilla@glob.com.au>
# Frédéric Buclin <LpSolit@gmail.com>
+ # Guy Pyrzak <guy.pyrzak@gmail.com>
#%]
[%# INTERFACE:
@@ -69,15 +70,30 @@
[% END %]
</select>
[% ELSE %]
-<input
- name="[% name FILTER html %]"
- value="[% value FILTER html %]"
- [% IF onchange %] onchange="[% onchange FILTER html %]" [% END %]
- [% IF disabled %] disabled="[% disabled FILTER html %]" [% END %]
- [% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
- [% IF size %] size="[% size FILTER html %]" [% END %]
- [% IF id %] id="[% id FILTER html %]" [% END %]
->
+ [% IF id && feature_enabled('jsonrpc') %]
+ <div id="[% id FILTER html %]_autocomplete">
+ [% END %]
+ <input
+ name="[% name FILTER html %]"
+ value="[% value FILTER html %]"
+ [% IF onchange %] onchange="[% onchange FILTER html %]" [% END %]
+ [% IF disabled %] disabled="[% disabled FILTER html %]" [% END %]
+ [% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
+ [% IF size %] size="[% size FILTER html %]" [% END %]
+ [% IF id %] id="[% id FILTER html %]" [% END %]
+ >
+ [% IF id && feature_enabled('jsonrpc') %]
+ <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 1e9a9e998..15fc44949 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -46,8 +46,10 @@
title = title
style = style
atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom"
- javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
- style_urls = [ "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
+ javascript_urls = [ "js/yui/bz_autocomplete_bundle.js", "js/util.js",
+ "js/field.js", "js/yui/calendar.js" ]
+ style_urls = [ "skins/standard/yui/autocomplete.css",
+ "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
doc_section = "query.html#list"
%]