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