summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-06 07:22:24 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-06 07:22:24 -0700
commit5997f57323ff6608de75c3700bbcde8b8d0f3bbf (patch)
tree3d7ef628410e82e3e66d9d65dfe509fc75e6df7b /modules
parent7bdf382e813515ce7ab6e14f0b8e3e0b7b6bd867 (diff)
Cleanup the javascript for enabling dialog or panel links.
1) We don't need to loop over the elements to bind the event handler. 2) Just include gallery.panel.js for all the admin pages.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/gallery_theme.php1
-rw-r--r--modules/user/helpers/user_theme.php6
2 files changed, 1 insertions, 6 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index d3751b80..903827cc 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -78,6 +78,7 @@ class gallery_theme_Core {
}
static function admin_head($theme) {
+ $theme->script("gallery.panel.js");
$session = Session::instance();
if ($session->get("debug")) {
$theme->css("debug.css");
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
index c5351f8e..69042aed 100644
--- a/modules/user/helpers/user_theme.php
+++ b/modules/user/helpers/user_theme.php
@@ -23,10 +23,4 @@ class user_theme_Core {
$view->user = user::active();
return $view->render();
}
-
- static function admin_head($theme) {
- if (strpos(Router::$current_uri, "admin/users") !== false) {
- $theme->script("gallery.panel.js");
- }
- }
}