summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-06-23 20:34:55 +0200
committerGitHub <noreply@github.com>2017-06-23 20:34:55 +0200
commit8630521c3151c652143673b80fb7f1cc501687a7 (patch)
tree47bf47da68d4a519884c91e0cd0f808b899ee2b1 /template
parentdf042aa77951fa69ea59c1ced9feded43ba3ae6c (diff)
downloadbugzilla-8630521c3151c652143673b80fb7f1cc501687a7.tar.gz
bugzilla-8630521c3151c652143673b80fb7f1cc501687a7.tar.xz
Bug 1361890 - Fix problems with current js and css concatenation
Diffstat (limited to 'template')
-rw-r--r--template/en/default/attachment/diff-header.html.tmpl4
-rw-r--r--template/en/default/bug/comments.html.tmpl3
-rw-r--r--template/en/default/flag/list.html.tmpl2
-rw-r--r--template/en/default/global/header.html.tmpl64
-rw-r--r--template/en/default/list/list-simple.html.tmpl2
-rw-r--r--template/en/default/reports/duplicates-simple.html.tmpl4
-rw-r--r--template/en/default/rest.html.tmpl2
-rw-r--r--template/en/default/search/boolean-charts.html.tmpl4
8 files changed, 43 insertions, 42 deletions
diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl
index b407b4f3a..3e56ab2f4 100644
--- a/template/en/default/attachment/diff-header.html.tmpl
+++ b/template/en/default/attachment/diff-header.html.tmpl
@@ -57,9 +57,9 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %]
[% ELSE %]
<html>
<head>
- <link href="[% 'skins/standard/attachment.css' FILTER mtime %]"
+ <link href="[% asset_file('skins/standard/attachment.css') FILTER html %]"
rel="stylesheet" type="text/css">
- <script src="[% 'js/attachment.js' FILTER mtime %]"
+ <script src="[% asset_file('js/attachment.js') FILTER html %]"
type="text/javascript"></script>
</head>
<body onload="[% onload FILTER html %]">
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index 2f8658c9c..eb7d240b6 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -22,8 +22,7 @@
[% PROCESS bug/time.html.tmpl %]
-<script src="[% 'js/comments.js' FILTER mtime %]" type="text/javascript">
-</script>
+<script src="[% asset_file('js/comments.js') FILTER html %]" type="text/javascript"></script>
<script type="text/javascript">
<!--
diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl
index 55184c47b..09113bbf3 100644
--- a/template/en/default/flag/list.html.tmpl
+++ b/template/en/default/flag/list.html.tmpl
@@ -30,7 +30,7 @@
[% DEFAULT flag_table_id = "flags" %]
-<script src="[% 'js/flag.js' FILTER mtime %]" type="text/javascript"></script>
+<script src="[% asset_file('js/flag.js') FILTER html %]" type="text/javascript"></script>
<table id="[% flag_table_id FILTER html %]">
[% UNLESS flag_no_header %]
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 %]
diff --git a/template/en/default/list/list-simple.html.tmpl b/template/en/default/list/list-simple.html.tmpl
index f4c3549ed..4c186e207 100644
--- a/template/en/default/list/list-simple.html.tmpl
+++ b/template/en/default/list/list-simple.html.tmpl
@@ -39,7 +39,7 @@
<head>
<title>[% title FILTER html %]</title>
<base href="[% urlbase FILTER html %]">
- <link href="[% 'skins/standard/buglist.css' FILTER mtime %]"
+ <link href="[% asset_file('skins/standard/buglist.css') FILTER html %]"
rel="stylesheet" type="text/css">
</head>
diff --git a/template/en/default/reports/duplicates-simple.html.tmpl b/template/en/default/reports/duplicates-simple.html.tmpl
index a08522790..88f14b910 100644
--- a/template/en/default/reports/duplicates-simple.html.tmpl
+++ b/template/en/default/reports/duplicates-simple.html.tmpl
@@ -39,9 +39,9 @@
<head>
<title>[% title FILTER html %]</title>
- <link href="[% 'skins/standard/global.css' FILTER mtime %]"
+ <link href="[% asset_file('skins/standard/global.css') FILTER html %]"
rel="stylesheet" type="text/css">
- <link href="[% 'skins/standard/duplicates.css' FILTER mtime %]"
+ <link href="[% asset_file('skins/standard/duplicates.css') FILTER html %]"
rel="stylesheet" type="text/css">
</head>
diff --git a/template/en/default/rest.html.tmpl b/template/en/default/rest.html.tmpl
index 0b8321dd1..bc9c5b6fd 100644
--- a/template/en/default/rest.html.tmpl
+++ b/template/en/default/rest.html.tmpl
@@ -10,7 +10,7 @@
<html>
<head>
<title>Bugzilla::REST::API</title>
- <link href="[% urlbase FILTER none %][% 'skins/standard/global.css' FILTER mtime %]"
+ <link href="[% urlbase FILTER none %][% asset_file('skins/standard/global.css') FILTER html %]"
rel="stylesheet" type="text/css">
</head>
<body>
diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl
index 3fb1f8eae..e3b149969 100644
--- a/template/en/default/search/boolean-charts.html.tmpl
+++ b/template/en/default/search/boolean-charts.html.tmpl
@@ -76,8 +76,8 @@
TUI_alternates['custom_search_advanced'] = "Show Advanced Features";
TUI_hide_default('custom_search_advanced');
</script>
- <script type="text/javascript" src="[% 'js/custom-search.js' FILTER mtime %]"></script>
- <script type="text/javascript" src="[% 'js/history.js/native.history.js' FILTER mtime %]"></script>
+ <script type="text/javascript" src="[% asset_file('js/custom-search.js') FILTER html %]"></script>
+ <script type="text/javascript" src="[% asset_file('js/history.js/native.history.js') FILTER html %]"></script>
<script type="text/javascript">
redirect_html4_browsers();
[%# These are alternative labels for the AND and OR options in and_all_select %]