diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-28 23:22:38 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-28 23:22:38 -0800 |
commit | 743fbe76965b00087d8e091f742acd61d3a740d0 (patch) | |
tree | a7c465c697ea0f940ebbbcb55c628e1f0ba40512 /modules/gallery/helpers/gallery_event.php | |
parent | aacafaaf35d8cc41c9d6374412c8cf1e2544dad7 (diff) |
Add page_type to the rotate and delete context menu items so that the
quick menu knows where to send you after the action is done.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index b3d4daab..80452276 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -286,6 +286,7 @@ class gallery_event_Core { ->label(t("Options")) ->css_class("ui-icon-carat-1-n")); + $page_type = $theme->page_type(); if (access::can("edit", $item)) { switch ($item->type) { case "movie": @@ -324,7 +325,7 @@ class gallery_event_Core { ->css_class("ui-icon-rotate-ccw") ->ajax_handler("function(data) { " . "\$.gallery_replace_image(data, \$('$thumb_css_selector')) }") - ->url(url::site("quick/rotate/$item->id/ccw?csrf=$csrf&from_id=$theme_item->id"))) + ->url(url::site("quick/rotate/$item->id/ccw?csrf=$csrf&from_id=$theme_item->id&page_type=$page_type"))) ->append( Menu::factory("ajax_link") ->id("rotate_cw") @@ -332,7 +333,7 @@ class gallery_event_Core { ->css_class("ui-icon-rotate-cw") ->ajax_handler("function(data) { " . "\$.gallery_replace_image(data, \$('$thumb_css_selector')) }") - ->url(url::site("quick/rotate/$item->id/cw?csrf=$csrf&from_id=$theme_item->id"))); + ->url(url::site("quick/rotate/$item->id/cw?csrf=$csrf&from_id=$theme_item->id&page_type=$page_type"))); } // @todo Don't move photos from the photo page; we don't yet have a good way of redirecting @@ -372,7 +373,7 @@ class gallery_event_Core { ->label($delete_title) ->css_class("ui-icon-trash") ->css_id("g-quick-delete") - ->url(url::site("quick/form_delete/$item->id?csrf=$csrf&from_id=$theme_item->id"))); + ->url(url::site("quick/form_delete/$item->id?csrf=$csrf&from_id=$theme_item->id&page_type=$page_type"))); } if ($item->is_album()) { |