diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-06 14:55:03 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-06 14:55:03 -0700 |
| commit | 794a7a5abf38ed828329cb0023df938479e90901 (patch) | |
| tree | b11b63813e9b1231b059a8ee14f48a92026dbb12 /modules/organize/helpers | |
| parent | 7ed15ea481565b1364573a814c0529adaf9f2eb7 (diff) | |
Leverage the gallery.dialog/js functionality in order to reduce duplicate code
Diffstat (limited to 'modules/organize/helpers')
| -rw-r--r-- | modules/organize/helpers/organize_event.php | 2 | ||||
| -rw-r--r-- | modules/organize/helpers/organize_theme.php | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 99a28673..887d9c2d 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -23,7 +23,7 @@ class organize_event_Core { if ($item && access::can("edit", $item) && $item->is_album()) { $menu->get("options_menu") - ->append(Menu::factory("link") + ->append(Menu::factory("dialog") ->id("organize") ->label(t("Organize Album")) ->css_id("gOrganizeLink") diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php index f01ab88b..0fd117c3 100644 --- a/modules/organize/helpers/organize_theme.php +++ b/modules/organize/helpers/organize_theme.php @@ -19,8 +19,9 @@ */ class organize_theme { static function head($theme) { - //$theme->script("organize_init.js"); - $theme->script("organize.js"); - $theme->css("organize.css"); + if (access::can("view", $theme->item()) && access::can("edit", $theme->item())) { + $theme->script("organize.js"); + $theme->css("organize.css"); + } } } |
