diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-06-15 00:42:14 +0800 |
---|---|---|
committer | <unostar@danalan.info> | 2009-06-15 01:10:13 +0800 |
commit | b86e657194c2abaf53eba3752d4c63af1e689f67 (patch) | |
tree | d1eaaf19efc2885fc53655e145d70d10c3a70067 /modules/gallery/controllers/quick.php | |
parent | a89c871861d002a5a3174c01533919f7d12ff772 (diff) |
Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355.
Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'modules/gallery/controllers/quick.php')
-rw-r--r-- | modules/gallery/controllers/quick.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index d6f5213f..30383307 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -95,6 +95,21 @@ class Quick_Controller extends Controller { print json_encode(array("result" => "success", "reload" => 1)); } + public function form_delete($id) { + $item = model_cache::get("item", $id); + access::required("view", $item); + access::required("edit", $item); + + if ($item->is_album()) { + print t("Delete the album <b>%title</b>? All items within the album will also be deleted.", array("title" => $item->title)); + } else { + print t("Are you sure you want to delete <b>%title</b>?", array("title" => $item->title)); + } + + $form = item::get_delete_form($item); + print $form; + } + public function delete($id) { access::verify_csrf(); $item = model_cache::get("item", $id); |