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(...) --- modules/gallery/helpers/gallery_theme.php | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index b6b24b27..cffecb12 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -21,22 +21,6 @@ class gallery_theme_Core { static function head($theme) { $session = Session::instance(); $buf = ""; - $theme->script("lib/jquery.js"); - $theme->script("lib/jquery.form.js"); - $theme->script("lib/jquery-ui.js"); - $theme->script("lib/gallery.common.js"); - $theme->script("lib/gallery.dialog.js"); - $theme->script("lib/gallery.form.js"); - $theme->script("lib/superfish/js/superfish.js"); - if ($theme->page_type == 'photo') { - $theme->script("lib/jquery.scrollTo.js"); - $theme->script("lib/jquery.localscroll.js"); - $theme->script("lib/gallery.show_full_size.js"); - } - if ($theme->page_type == 'movie') { - $theme->script("lib/flowplayer.js"); - } - $theme->script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= ""; @@ -95,14 +79,6 @@ class gallery_theme_Core { static function admin_head($theme) { $session = Session::instance(); $buf = ""; - $theme->script("lib/jquery.js"); - $theme->script("lib/jquery.form.js"); - $theme->script("lib/jquery-ui.js"); - $theme->script("lib/gallery.common.js"); - $theme->script("lib/gallery.dialog.js"); - $theme->script("lib/superfish/js/superfish.js"); - $theme->script($theme->url("js/jquery.dropshadow.js", false, true)); - $theme->script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= ""; -- cgit v1.2.3