diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-26 07:51:29 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-26 07:51:29 -0700 |
commit | 42a5bd20a550a9edb5ec84625037b9d85889ff63 (patch) | |
tree | 8d9ff1df3ab5df408edda3d6d751d0d3a0c15296 /modules/gallery/helpers/gallery_theme.php | |
parent | eee8dbe511a86967cc27d93c26718253b301bec6 (diff) |
1) Move the generation of script tags to gallery_theme::head and gallery_theme::admin_head. This allows us to potentially manage the scripts like we do in g2 (single file and compressed)
2) Change Theme_View::_call to always call the gallery_theme::$function first.
Diffstat (limited to 'modules/gallery/helpers/gallery_theme.php')
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index a96c8f5b..24f4129b 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -21,6 +21,18 @@ class gallery_theme_Core { static function head($theme) { $session = Session::instance(); $buf = ""; + $buf .= html::script("lib/jquery.js"); + $buf .= html::script("lib/jquery.form.js"); + $buf .= html::script("lib/jquery-ui.js"); + $buf .= html::script("lib/gallery.common.js"); + $buf .= html::script("lib/gallery.dialog.js"); + $buf .= html::script("lib/gallery.form.js"); + $buf .= html::script("lib/superfish/js/superfish.js"); + if ($theme->page_type == 'photo') { + $buf .= html::script("lib/jquery.scrollTo.js"); + $buf .= html::script("lib/jquery.localscroll.js"); + } + $buf .= html::script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/debug.css") . "\" />"; @@ -79,6 +91,14 @@ class gallery_theme_Core { static function admin_head($theme) { $session = Session::instance(); $buf = ""; + $buf .= html::script("lib/jquery.js"); + $buf .= html::script("lib/jquery.form.js"); + $buf .= html::script("lib/jquery-ui.js"); + $buf .= html::script("lib/gallery.common.js"); + $buf .= html::script("lib/gallery.dialog.js"); + $buf .= html::script("lib/superfish/js/superfish.js"); + $buf .= html::script($theme->url("js/jquery.dropshadow.js", false, true)); + $buf .= html::script($theme->url("js/ui.init.js", false, true)); if ($session->get("debug")) { $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . url::file("modules/gallery/css/debug.css") . "\" />"; |