From 04add75f6ff7596319b01c635cb62fafacf504cf Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 Aug 2010 00:27:24 -0700 Subject: Get rid of the move dialog and move option. Instead, replace it with a call to Organize with the appropriate album open. I have not yet figured out how to get the SWF code to highlight the active image, but that's coming. Partial fix for #1204. --- modules/organize/helpers/organize_event.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index ae05fb5d..1593d30e 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -32,13 +32,23 @@ class organize_event_Core { } static function context_menu($menu, $theme, $item) { - if ($item->is_album() && access::can("edit", $item)) { - $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("organize") - ->label(t("Organize album")) - ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + if (access::can("edit", $item)) { + if ($item->is_album()) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("organize") + ->label(t("Organize album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$item->id}"))); + } else { + $parent = $item->parent(); + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("move") + ->label(t("Move to another album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); + } } } -- cgit v1.2.3