From 09c8953af7696bda51e052243950f9830f905463 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 21 May 2009 02:24:37 +0000 Subject: Provide delete confirmations in quick pane and organize features. If I've missed any spots let me know. --- core/js/quick.js | 5 +++++ core/views/quick_pane.html.php | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/js/quick.js b/core/js/quick.js index 750bdd40..e7f35cea 100644 --- a/core/js/quick.js +++ b/core/js/quick.js @@ -39,6 +39,10 @@ var show_quick = function() { ); $("#gQuickPane a:not(.options)").click(function(e) { e.preventDefault(); + if ($(this).attr("id") == "gQuickDelete" && + !confirm($(this).attr("ref"))) { + return; + } quick_do(cont, $(this), img); }); $("#gQuickPane a.options").click(function(e) { @@ -88,3 +92,4 @@ var quick_do = function(cont, pane, img) { var hide_quick = function() { $("#gQuickPane").remove(); }; + diff --git a/core/views/quick_pane.html.php b/core/views/quick_pane.html.php index 4c56842f..95de972b 100644 --- a/core/views/quick_pane.html.php +++ b/core/views/quick_pane.html.php @@ -67,13 +67,15 @@ type == "photo"): ?> + type == "movie"): ?> + type == "album"): ?> + -id?csrf=$csrf&page_type=$page_type") ?>" - title=""> +id?csrf=$csrf&page_type=$page_type") ?>" ref="" id="gQuickDelete" title=""> -- cgit v1.2.3