summaryrefslogtreecommitdiffstats
path: root/template/en/default/global/header.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/global/header.html.tmpl')
-rw-r--r--template/en/default/global/header.html.tmpl64
1 files changed, 33 insertions, 31 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 107c69069..57088ac2a 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -52,7 +52,6 @@
style_urls = []
no_yui = 0
jquery = []
- jquery_css = []
generate_api_token = 0
%]
@@ -73,7 +72,7 @@
"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 %]
+[% CALL style_urls.import(jq_css_urls) %]
[%# Add our required jQuery plugins %]
[% jquery.push("cookie", "devbridgeAutocomplete") %]
@@ -137,30 +136,25 @@
[% PROCESS 'global/setting-descs.none.tmpl' %]
[% SET css_sets = css_files(style_urls.unique, no_yui) %]
- [% IF constants.CONCATENATE_ASSETS %]
- [% PROCESS format_css_link asset_url = css_sets.unified_standard_skin %]
- [% ELSE %]
- [% FOREACH asset_url = css_sets.standard %]
- [% PROCESS format_css_link %]
- [% END %]
- [% FOREACH asset_url = css_sets.skin %]
+ [% SET css_standard_and_skin = css_sets.standard %]
+ [% CALL css_standard_and_skin.import(css_sets.skin) %]
+ [% IF style %]
+ [% FOREACH asset_url = asset_files(css_standard_and_skin) %]
[% PROCESS format_css_link %]
[% END %]
- [% END %]
- [% IF style %]
<style type="text/css">
[% style %]
</style>
- [% END %]
- [% IF css_sets.unified_custom %]
- [% IF constants.CONCATENATE_ASSETS %]
- [% PROCESS format_css_link asset_url = css_sets.unified_custom %]
- [% ELSE %]
- [% FOREACH asset_url = css_sets.custom %]
- [% PROCESS format_css_link %]
- [% END %]
+ [% FOREACH asset_url = asset_files(css_sets.custom) %]
+ [% PROCESS format_css_link %]
+ [% END %]
+ [% ELSE %]
+ [% SET css_all = [] %]
+ [% CALL css_all.import(css_standard_and_skin, css_sets.custom) %]
+ [% FOREACH asset_url = asset_files(css_all) %]
+ [% PROCESS format_css_link %]
[% END %]
[% END %]
@@ -170,10 +164,6 @@
[% END %]
[% starting_js_urls.push('js/global.js') %]
- [% FOREACH asset_url = concatenate_js(starting_js_urls) %]
- [% PROCESS format_js_link %]
- [% END %]
-
[% inline_javascript = BLOCK %]
[% IF NOT no_yui %]
YAHOO.namespace('bugzilla');
@@ -188,14 +178,26 @@
[% javascript %]
[% END %]
[% END %]
+
[% IF inline_javascript.search("\\S") %]
+ [% FOREACH asset_url = asset_files(starting_js_urls) %]
+ [% PROCESS format_js_link %]
+ [% END %]
+
<script [% script_nonce FILTER none %]>
[% inline_javascript FILTER none %]
</script>
- [% END %]
- [% FOREACH asset_url = concatenate_js(javascript_urls) %]
- [% PROCESS format_js_link %]
+ [% FOREACH asset_url = asset_files(javascript_urls) %]
+ [% PROCESS format_js_link %]
+ [% END %]
+ [% ELSE %]
+ [% SET js_all = [] %]
+ [% CALL js_all.import(starting_js_urls) %]
+ [% CALL js_all.import(javascript_urls) %]
+ [% FOREACH asset_url = asset_files(js_all) %]
+ [% PROCESS format_js_link %]
+ [% END %]
[% END %]
[%# this puts the live bookmark up on firefox for the Atom feed %]
@@ -310,7 +312,7 @@
</td>
<td id="moz_tab">
<a href="https://www.mozilla.org/" title="Mozilla - Home of the Mozilla Project">
- <img src="images/tabzilla.png" border="0" height="42" width="154"></a>
+ <img src="[% asset_file('images/tabzilla.png') FILTER html %]" border="0" height="42" width="154"></a>
</td>
</tr>
</table>
@@ -396,9 +398,9 @@
[% END %]
[% BLOCK format_css_link %]
- <link href="[% asset_url FILTER html %]" rel="stylesheet" type="text/css">
-[% END %]
+ <link data-file="[% asset_url FILTER html %]" href="[% asset_file(asset_url) FILTER html %]" rel="stylesheet" type="text/css">
+[%+ END %]
[% BLOCK format_js_link %]
- <script [% script_nonce FILTER none %] type="text/javascript" src="[% asset_url FILTER mtime FILTER html %]"></script>
-[% END %]
+ <script [% script_nonce FILTER none %] data-file="[% asset_url FILTER html %]" type="text/javascript" src="[% asset_file(asset_url) FILTER html %]"></script>
+[%+ END %]