summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/digibug/helpers/digibug_event.php16
-rw-r--r--modules/gallery/helpers/gallery.php7
-rw-r--r--modules/gallery/libraries/Theme_View.php5
3 files changed, 14 insertions, 14 deletions
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"));
}
}
}
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 0bf180c1..279f2013 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -197,7 +197,8 @@ class gallery_Core {
return $menu;
}
- static function context_menu($menu, $theme, $item, $page_type) {
+ static function context_menu($menu, $theme, $item) {
+ $page_type = $theme->page_type();
switch ($item->type) {
case "movie":
$edit_title = t("Edit this movie");
@@ -218,9 +219,9 @@ class gallery_Core {
$move_title = t("Move to another album");
$csrf = access::csrf_token();
-
+
$menu->append($options_menu = Menu::factory("submenu")
- ->id("options")
+ ->id("options_menu")
->label(t("Options"))
->css_class("ui-icon-carat-1-n"));
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 24dea729..a5f5db03 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -118,9 +118,8 @@ class Theme_View_Core extends Gallery_View {
->label(t("Options")))
->css_class("gContextMenu");
- $page_type = Input::instance()->get("page_type");
- gallery::context_menu($menu, $this, $item, $page_type);
- module::event("context_menu", $menu, $this, $item, $page_type);
+ gallery::context_menu($menu, $this, $item);
+ module::event("context_menu", $menu, $this, $item);
return $menu->compact();
}