From c4f991bb7d7e90f8c55897f89888d9196c7e438f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Jun 2009 19:45:11 -0700 Subject: Clean up the combined javascript change and refactor out the Gallery_View base class from Theme_View and Admin_View. 1) Move all the theme specific jquery stuff from gallery_theme::head() and admin_head() into the theme files. Use $theme->script() as appropriate. 2) Get rid of the extra boolean on $theme->url() that we were using so that we could call $theme->script($theme->url(...)) -- add $theme->theme_script() instead (poorly named, but still clearer than what we had before) 3) Fix the bug that combined scripts didn't work at all in the admin theme. 4) Get rid of $theme->display() in favor of new View(...) --- themes/admin_default/views/admin.html.php | 10 ++++++++++ themes/default/views/page.html.php | 24 +++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) (limited to 'themes') diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index dfbafe31..2a91a76c 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -20,6 +20,16 @@ " media="screen,print,projection" /> + + script("lib/jquery.js") ?> + script("lib/jquery.form.js") ?> + script("lib/jquery-ui.js") ?> + script("lib/gallery.common.js") ?> + script("lib/gallery.dialog.js") ?> + script("lib/superfish/js/superfish.js") ?> + theme_script("js/jquery.dropshadow.js") ?> + theme_script("js/ui.init.js") ?> + admin_head() ?> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index c74d4097..8b9466ac 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -49,6 +49,24 @@ + script("lib/jquery.js") ?> + script("lib/jquery.form.js") ?> + script("lib/jquery-ui.js") ?> + script("lib/gallery.common.js") ?> + script("lib/gallery.dialog.js") ?> + script("lib/gallery.form.js") ?> + script("lib/superfish/js/superfish.js") ?> + script("lib/jquery.localscroll.js") ?> + theme_script("js/ui.init.js") ?> + + head() they get combined */ ?> + page_type == "photo"): ?> + script("lib/jquery.scrollTo.js") ?> + script("lib/gallery.show_full_size.js") ?> + page_type == "movie"): ?> + script("lib/flowplayer.js") ?> + + head() ?> @@ -57,7 +75,7 @@
site_status() ?>
- display("header.html") ?> +
@@ -70,12 +88,12 @@
page_type != "login"): ?> - display("sidebar.html") ?> +
- display("footer.html") ?> +
page_bottom() ?> -- cgit v1.2.3 From 6e8a8c53e685a6c3f35f1426ab4dd6dcc18578e0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Jun 2009 19:49:48 -0700 Subject: Rename $theme->url() to $theme->theme_url() for consistency wiht $theme->theme_script(). --- modules/comment/views/admin_block_recent_comments.html.php | 2 +- modules/comment/views/admin_comments.html.php | 2 +- modules/comment/views/comment.html.php | 2 +- modules/comment/views/comments.html.php | 2 +- modules/gallery/libraries/Gallery_View.php | 2 +- modules/user/views/admin_users.html.php | 2 +- themes/admin_default/views/admin.html.php | 4 ++-- themes/default/views/header.html.php | 2 +- themes/default/views/page.html.php | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'themes') diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index edaa19ae..af4d946e 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -2,7 +2,7 @@