summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-18 10:00:38 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-18 10:00:38 +0200
commit7ae63b1e06f607ede3ed32829ac9316e4c657247 (patch)
tree2d347681207e337dad6ad21ec15a319b6a734a62 /template/en/default/global
parent3eb535037ca7ef9ea026cc7799fa0e7d93438089 (diff)
downloadbugzilla-7ae63b1e06f607ede3ed32829ac9316e4c657247.tar.gz
bugzilla-7ae63b1e06f607ede3ed32829ac9316e4c657247.tar.xz
Bug 572949: Update YUI to 2.8.1
r=glob, a=mkanat
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/header.html.tmpl43
1 files changed, 41 insertions, 2 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 8e94e86f4..3d7fc2e68 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -46,8 +46,23 @@
header_addl_info = ""
onload = ""
style_urls = []
+ yui = []
%]
+[% SET yui_css = {
+ autocomplete => 1,
+ calendar => 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'],
+} %]
+
+
[%# We should be able to set the default value of the header variable
# to the value of the title variable using the DEFAULT directive,
# but that doesn't work if a caller sets header to the empty string
@@ -70,6 +85,7 @@
[% PROCESS 'global/setting-descs.none.tmpl' %]
[%# Set up the skin CSS cascade:
+ # 0. YUI CSS
# 1. Standard Bugzilla stylesheet set (persistent)
# 2. Standard Bugzilla stylesheet set (selectable)
# 3. All third-party "skin" stylesheet sets (selectable)
@@ -83,6 +99,14 @@
[% END %]
[% style_urls.unshift('skins/standard/global.css') %]
+
+ [% FOREACH yui_name = yui %]
+ [% IF yui_css.$yui_name %]
+ <link rel="stylesheet" type="text/css"
+ href="js/yui/assets/skins/sam/[%- yui_name FILTER html %].css">
+ [% END %]
+ [% END %]
+
[%# CSS cascade, part 1: Standard Bugzilla stylesheet set (persistent).
# Always present.
#%]
@@ -190,9 +214,24 @@
type="text/css">
<![endif]-->
- <script src="js/yui/yahoo-dom-event.js" type="text/javascript"></script>
- <script src="js/yui/cookie.js" type="text/javascript"></script>
+ [%# YUI Scripts %]
+ <script src="js/yui/yahoo-dom-event/yahoo-dom-event.js"
+ type="text/javascript"></script>
+ <script src="js/yui/cookie/cookie-min.js" type="text/javascript"></script>
+ [%# Resolve YUI dependencies. Note that CSS was already done above. %]
+ [% FOREACH yui_name = yui %]
+ [% IF yui_deps.$yui_name %]
+ [% yui = yui_deps.${yui_name}.merge(yui) %]
+ [% END %]
+ [% END %]
+ [% FOREACH yui_name = yui %]
+ <script type="text/javascript"
+ src="js/yui/[% yui_name FILTER html %]/
+ [%- yui_name FILTER html %]-min.js"></script>
+ [% END %]
+
<script src="js/global.js" type="text/javascript"></script>
+
<script type="text/javascript">
<!--
YAHOO.namespace('bugzilla');