summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/en/default/bug/edit.html.tmpl17
-rw-r--r--template/en/default/global/header.html.tmpl128
-rw-r--r--template/en/default/global/user.html.tmpl4
3 files changed, 88 insertions, 61 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 8057e4d02..92e7bea70 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -275,7 +275,7 @@
[% ELSE %]
<td colspan="2">
[% END %]
- [% PROCESS input inputname => "alias"
+ [% INCLUDE input inputname => "alias"
size => "40"
maxlength => "40"
no_td => 1
@@ -290,7 +290,7 @@
<label accesskey="s" for="short_desc"><u>S</u>ummary</label>:
</td>
<td>
- [% PROCESS input inputname => "short_desc" size => "80" colspan => 2
+ [% INCLUDE input inputname => "short_desc" size => "80" colspan => 2
maxlength => 255 spellcheck => "true" no_td => 1 %]
</td>
</tr>
@@ -405,7 +405,7 @@
accesskey = "w"
desc_url = "https://wiki.mozilla.org/BMO/Whiteboard"
%]
- [% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %]
+ [% INCLUDE input inputname => "status_whiteboard" size => "40" colspan => 2 %]
</tr>
[% END %]
@@ -607,7 +607,7 @@
</span>
[% END %]
<span id="bz_url_input_area">
- [% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
+ [% url_output = INCLUDE input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
[% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1)
AND is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]"
@@ -1271,7 +1271,7 @@
[% IF no_td != 1 %]
<td[% " colspan=\"$colspan\"" IF colspan %]>
[% END %]
- [% val = value ? value : bug.$inputname %]
+ [% val = bug.$inputname %]
[% IF bug.check_can_change_field(inputname, 0, 1) %]
<input id="[% inputname %]" name="[% inputname %]" class="text_input"
value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
@@ -1289,13 +1289,8 @@
[% IF no_td != 1 %]
</td>
[% END %]
- [% no_td = 0 %]
- [% maxlength = 0 %]
- [% colspan = 0 %]
- [% size = 0 %]
- [% value = undef %]
- [% spellcheck = undef %]
[% END %]
+
[% BLOCK commit_button %]
[% IF user.id %]
<div class="knob-buttons">
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 04b0ee179..4ea41ebbd 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -47,39 +47,60 @@
onload = ""
style_urls = []
yui = []
+ yui_css = {}
+ yui_deps = {}
+ no_yui = 0
+ jquery = []
+ jquery_css = []
%]
-[% SET yui_css = {
- autocomplete => 1,
- calendar => 1,
- datatable => 1,
- button => 1,
-} %]
-
-[%# Note: This is simple dependency resolution--you can't have dependencies
- # that depend on each other. You have to specify all of a module's deps,
- # if that module is going to be specified in "yui".
- #%]
-[% SET yui_deps = {
- autocomplete => ['json', 'connection', 'datasource'],
- datatable => ['json', 'connection', 'datasource', 'element'],
-} %]
-
-[%# When using certain YUI modules, we need to process certain
- # extra JS templates.
- #%]
-[% SET yui_templates = {
- datatable => ['global/value-descs.js.tmpl'],
-} %]
+[% IF NOT no_yui %]
+ [% SET yui_css = {
+ autocomplete => 1,
+ calendar => 1,
+ datatable => 1,
+ button => 1,
+ } %]
+
+ [%# Note: This is simple dependency resolution--you can't have dependencies
+ # that depend on each other. You have to specify all of a module's deps,
+ # if that module is going to be specified in "yui".
+ #%]
+ [% SET yui_deps = {
+ autocomplete => ['json', 'connection', 'datasource'],
+ datatable => ['json', 'connection', 'datasource', 'element'],
+ } %]
+
+ [%# When using certain YUI modules, we need to process certain
+ # extra JS templates.
+ #%]
+ [% SET yui_templates = {
+ datatable => ['global/value-descs.js.tmpl'],
+ } %]
+[% END %]
[%# These are JS URLs that are *always* on the page and come before
# every other JS URL.
#%]
[% SET starting_js_urls = [
- "js/yui/yahoo-dom-event/yahoo-dom-event.js",
- "js/yui/cookie/cookie-min.js",
+ "js/jquery/jquery-min.js",
+ "js/jquery/ui/jquery-ui-min.js"
+] %]
+
+[% IF NOT no_yui %]
+ [% starting_js_urls.push("js/yui/yahoo-dom-event/yahoo-dom-event.js",
+ "js/yui/cookie/cookie-min.js") %]
+[% END %]
+
+[% SET jq_css_urls = [
+ "js/jquery/ui/jquery-ui-min.css",
+ "js/jquery/ui/jquery-ui-structure-min.css",
+ "js/jquery/ui/jquery-ui-theme-min.css",
] %]
+[% style_urls.import(jquery_css, jq_css_urls) FILTER null %]
+[%# Add jQuery cookie support %]
+[% jquery.push("cookie") %]
[%# We should be able to set the default value of the header variable
# to the value of the title variable using the DEFAULT directive,
@@ -101,13 +122,13 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
[% END %]
-[%# Migration note: contents of the old Param 'headerhtml' would go here %]
-
[% PROCESS "global/site-navigation.html.tmpl" %]
[% PROCESS 'global/setting-descs.none.tmpl' %]
- [% SET yui = yui_resolve_deps(yui, yui_deps) %]
+ [% IF NOT no_yui %]
+ [% SET yui = yui_resolve_deps(yui, yui_deps) %]
+ [% END %]
[% SET css_sets = css_files(style_urls, yui, yui_css) %]
[% IF constants.CONCATENATE_ASSETS %]
@@ -137,9 +158,16 @@
[% END %]
[% END %]
- [%# YUI Scripts %]
- [% FOREACH yui_name = yui %]
- [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %]
+ [% IF NOT no_yui %]
+ [%# YUI Scripts %]
+ [% FOREACH yui_name = yui %]
+ [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %]
+ [% END %]
+ [% END %]
+
+ [%# jQuery Plugins %]
+ [% FOREACH jq_name = jquery %]
+ [% starting_js_urls.push("js/jquery/plugins/$jq_name/${jq_name}-min.js") %]
[% END %]
[% starting_js_urls.push('js/global.js') %]
@@ -149,27 +177,28 @@
<script type="text/javascript">
<!--
- YAHOO.namespace('bugzilla');
- YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) {
- if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; };
- var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false;
- return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
- };
- if ( "onpagehide" in window || YAHOO.env.ua.gecko) {
- YAHOO.util.Event._simpleRemove(window, "unload",
- YAHOO.util.Event._unload);
- }
+ [% IF NOT no_yui %]
+ YAHOO.namespace('bugzilla');
+ YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) {
+ if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; };
+ var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false;
+ return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
+ };
+ if ( "onpagehide" in window || YAHOO.env.ua.gecko) {
+ YAHOO.util.Event._simpleRemove(window, "unload",
+ YAHOO.util.Event._unload);
+ }
+ [% END %]
+
[%# The language selector needs javascript to set its cookie,
# so it is hidden in HTML/CSS by the "bz_default_hidden" class.
# If the browser can run javascript, it will then "unhide"
# the language selector using the following code.
#%]
- function unhide_language_selector() {
- YAHOO.util.Dom.removeClass(
- 'lang_links_container', 'bz_default_hidden'
- );
+ function unhide_language_selector() {
+ $('#lang_links_container').removeClass('bz_default_hidden');
}
- YAHOO.util.Event.onDOMReady(unhide_language_selector);
+ $(document).ready(unhide_language_selector);
[%# Make some Bugzilla information available to all scripts.
# We don't import every parameter and constant because we
@@ -199,11 +228,14 @@
}
};
- [% FOREACH yui_name = yui %]
- [% FOREACH yui_template = yui_templates.$yui_name %]
- [% INCLUDE $yui_template %]
+ [% IF NOT no_yui %]
+ [% FOREACH yui_name = yui %]
+ [% FOREACH yui_template = yui_templates.$yui_name %]
+ [% INCLUDE $yui_template %]
+ [% END %]
[% END %]
[% END %]
+
[% IF javascript %]
[% javascript %]
[% END %]
diff --git a/template/en/default/global/user.html.tmpl b/template/en/default/global/user.html.tmpl
index 38c1da113..847643c38 100644
--- a/template/en/default/global/user.html.tmpl
+++ b/template/en/default/global/user.html.tmpl
@@ -23,11 +23,11 @@
# who: A Bugzilla::User object that we are going to represent.
#%]
-<span class="vcard">
+<span class="vcard vcard_[% who.id FILTER html %]">
[% FILTER collapse %]
[% IF user.id %]
<a class="email" href="mailto:[% who.email FILTER html %]"
- onclick="return show_usermenu(event, [% who.id FILTER none %], '[% who.email FILTER js %]',
+ onclick="return show_usermenu([% who.id FILTER none %], '[% who.email FILTER js %]',
[% user.in_group('editusers') || user.bless_groups.size > 0 ? "true" : "false" %]);"
title="[% who.identity FILTER html %]">
[%- END -%]