From 5ac49d497f51a3828c1254b5024a4aa898f86530 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 10 Jan 2011 22:20:12 -0800 Subject: Create new APIs for allowing themers to control what CSS/JS get combined and when. Backwards compatible in that old themes will work, but their CSS/JS will no longer be combined unless they make some changes. Fixes #1600. --- themes/admin_wind/views/admin.html.php | 38 ++++++++++++++++---------- themes/wind/views/page.html.php | 49 +++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 32 deletions(-) (limited to 'themes') diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index c8041069..54b30c6f 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -4,6 +4,7 @@ + start_combining("script,css") ?> <? if ($page_title): ?> <?= t("Gallery Admin: %page_title", array("page_title" => $page_title)) ?> @@ -11,8 +12,26 @@ <?= t("Admin dashboard") ?> <? endif ?> - " type="image/x-icon" /> + " + type="image/x-icon" /> + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + + admin_head() ?> + + + script("ui.init.js") ?> css("yui/reset-fonts-grids.css") ?> css("themeroller/ui.base.css") ?> css("superfish/css/superfish.css") ?> @@ -22,20 +41,11 @@ media="screen,print,projection" /> - script("jquery.js") ?> - script("jquery.form.js") ?> - script("jquery-ui.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("ui.init.js") ?> + + get_combined("script") ?> - admin_head() ?> + + get_combined("css") ?> body_attributes() ?>> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 90f76bb5..441866d5 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -4,6 +4,7 @@ + start_combining("script,css") ?> <? if ($page_title): ?> <?= $page_title ?> @@ -17,28 +18,24 @@ <? endif ?> <? endif ?> - " type="image/x-icon" /> - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("themeroller/ui.base.css") ?> - css("screen.css") ?> - + " + type="image/x-icon" /> + page_type == "collection"): ?> - + + script("json2-min.js") ?> script("jquery.js") ?> script("jquery.form.js") ?> @@ -52,9 +49,8 @@ script("gallery.dialog.js") ?> script("superfish/js/superfish.js") ?> script("jquery.localscroll.js") ?> - script("ui.init.js") ?> - head() they get combined */ ?> + page_subtype == "photo"): ?> script("jquery.scrollTo.js") ?> script("gallery.show_full_size.js") ?> @@ -63,6 +59,23 @@ head() ?> + + + script("ui.init.js") ?> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("screen.css") ?> + + + + get_combined("script") ?> + + + get_combined("css") ?> body_attributes() ?>> -- cgit v1.2.3