From 5e83ebd6d0e1eccb1a865dc6c5fe2ef712bd421b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 28 Jun 2009 16:50:55 -0700 Subject: Use $theme->script() method to render module javascript files --- modules/server_add/helpers/server_add_theme.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/server_add/helpers/server_add_theme.php') diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php index 4f307a2e..3df57ee4 100644 --- a/modules/server_add/helpers/server_add_theme.php +++ b/modules/server_add/helpers/server_add_theme.php @@ -20,7 +20,7 @@ class server_add_theme_Core { static function head($theme) { if (user::active()->admin) { - return html::script("modules/server_add/js/server_add.js"); + $theme->script("modules/server_add/js/server_add.js"); } } @@ -33,8 +33,8 @@ class server_add_theme_Core { $csrf = access::csrf_token(); $head[] = ""; - $head[] = html::script("lib/jquery.autocomplete.js"); - $head[] = html::script("modules/server_add/js/admin.js"); + $theme->script("lib/jquery.autocomplete.js"); + $theme->script("modules/server_add/js/admin.js"); } return implode("\n", $head); -- cgit v1.2.3 From 42c82ef7f081630c15a5d354205896764348a76a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 29 Jun 2009 06:08:50 -0700 Subject: Temporary checkin to allow merge with trunk... don't integrate --- modules/gallery/libraries/Theme_View.php | 29 ++++++++++++++++++++++++- modules/organize/helpers/organize_theme.php | 3 +-- modules/server_add/helpers/server_add_theme.php | 3 +-- themes/admin_default/views/admin.html.php | 16 +------------- 4 files changed, 31 insertions(+), 20 deletions(-) (limited to 'modules/server_add/helpers/server_add_theme.php') diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 25818821..c5888b4a 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -20,6 +20,7 @@ class Theme_View_Core extends View { private $theme_name = null; private $scripts = array(); + private $css = array(); /** * Attempts to load a view and pre-load view data. @@ -172,6 +173,10 @@ class Theme_View_Core extends View { $this->scripts[$file] = 1; } + public function css($file) { + $this->css[$file] = 1; + } + /** * Combine a series of Javascript files into a single one and cache it in the database, then * return a single "; } + /** + * Combine a series of Javascript files into a single one and cache it in the database, then + * return a single "; diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index dfbafe31..1361ae33 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -6,21 +6,7 @@ <?= t("Admin Dashboard") ?> " type="image/x-icon" /> - " - media="screen,projection" /> - " - media="screen,projection" /> - " - media="screen,projection" /> - " - media="screen,projection" /> - " - media="screen,projection" /> - - admin_head() ?> + admin_head() ?> body_attributes() ?>> -- cgit v1.2.3