summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-22 04:10:21 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-22 04:10:21 +0200
commit4acb2424e62cbd64bc92a5dec2cbe1e2b7096157 (patch)
tree9076b3809846e8fc58ce720e0cd32dc0d3c8ff77 /template/en/default/global
parent601bda78fa436e7030ebcefc589d930c99f1373e (diff)
downloadbugzilla-4acb2424e62cbd64bc92a5dec2cbe1e2b7096157.tar.gz
bugzilla-4acb2424e62cbd64bc92a5dec2cbe1e2b7096157.tar.xz
Bug 22353: Automatic duplicate bug detection on enter_bug.cgi
r=glob, a=mkanat
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/header.html.tmpl21
1 files changed, 15 insertions, 6 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 3d7fc2e68..75fa71825 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -52,6 +52,7 @@
[% SET yui_css = {
autocomplete => 1,
calendar => 1,
+ datatable => 1,
} %]
[%# Note: This is simple dependency resolution--you can't have dependencies
@@ -60,6 +61,7 @@
#%]
[% SET yui_deps = {
autocomplete => ['json', 'connection', 'datasource'],
+ datatable => ['json', 'connection', 'datasource', 'element'],
} %]
@@ -99,7 +101,20 @@
[% END %]
[% style_urls.unshift('skins/standard/global.css') %]
+ [%# YUI dependency resolution %]
+ [%# We have to do this in a separate array, because modifying the
+ # existing array by unshift'ing dependencies confuses FOREACH.
+ #%]
+ [% SET yui_resolved = [] %]
+ [% FOREACH yui_name = yui %]
+ [% FOREACH yui_dep = yui_deps.${yui_name}.reverse %]
+ [% yui_resolved.push(yui_dep) IF NOT yui_resolved.contains(yui_dep) %]
+ [% END %]
+ [% yui_resolved.push(yui_name) IF NOT yui_resolved.contains(yui_name) %]
+ [% END %]
+ [% SET yui = yui_resolved %]
+ [%# YUI CSS %]
[% FOREACH yui_name = yui %]
[% IF yui_css.$yui_name %]
<link rel="stylesheet" type="text/css"
@@ -218,12 +233,6 @@
<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 %]/