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 --- .../en/default/admin/components/create.html.tmpl | 4 +- .../en/default/admin/components/edit.html.tmpl | 4 +- template/en/default/bug/create/create.html.tmpl | 8 ++-- template/en/default/bug/show-header.html.tmpl | 8 ++-- template/en/default/global/header.html.tmpl | 43 +++++++++++++++++++++- template/en/default/list/list.html.tmpl | 7 ++-- .../en/default/search/search-advanced.html.tmpl | 6 +-- .../default/search/search-create-series.html.tmpl | 5 ++- .../default/search/search-report-graph.html.tmpl | 5 ++- .../default/search/search-report-table.html.tmpl | 5 ++- 10 files changed, 66 insertions(+), 29 deletions(-) (limited to 'template') diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl index 96c80226c..c3b691d83 100644 --- a/template/en/default/admin/components/create.html.tmpl +++ b/template/en/default/admin/components/create.html.tmpl @@ -26,8 +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"] + yui = [ 'autocomplete' ] + javascript_urls = [ "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 30b7303e7..be14be054 100644 --- a/template/en/default/admin/components/edit.html.tmpl +++ b/template/en/default/admin/components/edit.html.tmpl @@ -33,8 +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"] + yui = [ 'autocomplete' ] + javascript_urls = [ "js/field.js" ] %]
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 39f14e8de..a59fe9112 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -30,11 +30,9 @@ [% PROCESS global/header.html.tmpl title = title - style_urls = [ 'skins/standard/yui/autocomplete.css', - 'skins/standard/attachment.css', - 'skins/standard/yui/calendar.css' ] - javascript_urls = [ "js/yui/bz_autocomplete_bundle.js", - "js/attachment.js", "js/util.js", "js/yui/calendar.js", + yui = [ 'autocomplete', 'calendar' ] + style_urls = [ 'skins/standard/attachment.css' ] + javascript_urls = [ "js/attachment.js", "js/util.js", "js/field.js", "js/TUI.js" ] onload = 'set_assign_to();' %] diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index c260f6902..a17c3201a 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -34,11 +34,9 @@ [% title = "$terms.Bug $bug.bug_id – $filtered_desc" %] [% header = "$terms.Bug $bug.bug_id" %] [% header_addl_info = "Last modified: $filtered_timestamp" %] -[% 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" ] %] +[% yui = ['autocomplete', 'calendar'] %] +[% javascript_urls = [ "js/util.js", "js/field.js" ] %] +[% style_urls = [ "skins/standard/show_bug.css" ] %] [% doc_section = "bug_page.html" %] [% bodyclasses = ['bz_bug', "bz_status_$bug.bug_status", 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 %] + +