From 7ae63b1e06f607ede3ed32829ac9316e4c657247 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Fri, 18 Jun 2010 01:00:38 -0700 Subject: Bug 572949: Update YUI to 2.8.1 r=glob, a=mkanat --- template/en/default/global/header.html.tmpl | 43 +++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'template/en/default/global/header.html.tmpl') 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 %] + + [% END %] + [% END %] + [%# CSS cascade, part 1: Standard Bugzilla stylesheet set (persistent). # Always present. #%] @@ -190,9 +214,24 @@ type="text/css"> - - + [%# YUI Scripts %] + + + [%# 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 %] + + [% END %] + +