summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/helpers/gallery_theme.php1
-rw-r--r--modules/user/helpers/user_theme.php6
-rw-r--r--themes/admin_default/js/ui.init.js12
-rw-r--r--themes/default/js/ui.init.js5
4 files changed, 5 insertions, 19 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");
- }
- }
}
diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js
index 3f062a27..06cc1cd5 100644
--- a/themes/admin_default/js/ui.init.js
+++ b/themes/admin_default/js/ui.init.js
@@ -1,5 +1,5 @@
$(document).ready(function(){
-
+
// Initialize Superfish menus
$("#gSiteAdminMenu ul.gMenu").addClass("sf-menu");
$("ul.gMenu").addClass("sf-menu");
@@ -18,16 +18,10 @@ $(document).ready(function(){
$("#gMessage li").showMessage();
// Initialize modal dialogs
- var dialogLinks = $(".gDialogLink");
- for (var i=0; i < dialogLinks.length; i++) {
- $(dialogLinks[i]).bind("click", handleDialogEvent);
- }
+ $(".gDialogLink").bind("click", handleDialogEvent);
// Initialize panels
- var panelLinks = $(".gPanelLink");
- for (i=0; i<panelLinks.length; i++) {
- $(panelLinks[i]).bind("click", handlePanelEvent);
- }
+ $(".gPanelLink").bind("click", handlePanelEvent);
if ($("#gPhotoStream").length) {
// Vertically align thumbs in photostream
diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js
index 11cd06ed..ff76c79c 100644
--- a/themes/default/js/ui.init.js
+++ b/themes/default/js/ui.init.js
@@ -34,10 +34,7 @@ $(document).ready(function() {
// Initialize dialogs
$(".gMenuLink").addClass("gDialogLink");
$("#gLoginLink").addClass("gDialogLink");
- var dialogLinks = $(".gDialogLink");
- for (var i=0; i < dialogLinks.length; i++) {
- $(dialogLinks[i]).bind("click", handleDialogEvent);
- }
+ $(".gDialogLink").bind("click", handleDialogEvent);
// Initialize view menu
if ($("#gViewMenu").length) {