From f7a23e0a9cdd4a85e4bc50964917d6995b7d54ab Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 9 Aug 2009 23:08:35 -0700 Subject: Fix up context menus a bit. - Update digibug_event::context_menu() to take the actual item - Change gallery::context_menu() to not require the page_type as an argument --- modules/digibug/helpers/digibug_event.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/digibug/helpers') diff --git a/modules/digibug/helpers/digibug_event.php b/modules/digibug/helpers/digibug_event.php index b257d16c..d2830b80 100644 --- a/modules/digibug/helpers/digibug_event.php +++ b/modules/digibug/helpers/digibug_event.php @@ -36,15 +36,15 @@ class digibug_event_Core { ->css_class("ui-icon-print")); } - static function context_menu($menu, $theme) { - $item = $theme->item(); + static function context_menu($menu, $theme, $item) { if ($item->type == "photo") { - $menu->append(Menu::factory("link") - ->id("digibug") - ->label(t("Print with Digibug")) - ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) - ->css_id("gDigibugLink") - ->css_class("ui-icon-print")); + $menu->get("options_menu") + ->append(Menu::factory("link") + ->id("digibug") + ->label(t("Print with Digibug")) + ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) + ->css_id("gDigibugLink") + ->css_class("ui-icon-print")); } } } -- cgit v1.2.3