summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/js/quick.js5
-rw-r--r--core/views/quick_pane.html.php6
-rw-r--r--modules/organize/js/organize.js4
-rw-r--r--modules/organize/views/organize.html.php2
4 files changed, 14 insertions, 3 deletions
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 @@
<? if ($item->type == "photo"): ?>
<? $title = t("Delete this photo") ?>
+<? $message = t("Do you really want to delete this photo") ?>
<? elseif ($item->type == "movie"): ?>
<? $title = t("Delete this movie") ?>
+<? $message = t("Do you really want to delete this movie") ?>
<? elseif ($item->type == "album"): ?>
<? $title = t("Delete this album") ?>
+<? $message = t("Do you really want to delete this album") ?>
<? endif ?>
-<a class="gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/delete/$item->id?csrf=$csrf&page_type=$page_type") ?>"
- title="<?= $title ?>">
+<a class="gButtonLink ui-corner-all ui-state-default" href="<?= url::site("quick/delete/$item->id?csrf=$csrf&page_type=$page_type") ?>" ref="<?= $message ?>" id="gQuickDelete" title="<?= $title ?>">
<span class="ui-icon ui-icon-trash">
<?= $title ?>
</span>
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index 30b3f8b6..6ae2d4eb 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -267,6 +267,10 @@ function drawerHandleButtonsClick(event) {
url: $(form).attr("action").replace("__FUNCTION__", "reset_" + $(form).attr("ref"))
});
break;
+ case "delete":
+ if (!confirm(CONFIRM_DELETE)) {
+ break;
+ }
default:
$.ajax({
data: serializeItemIds("#gMicroThumbPanel li.ui-selected"),
diff --git a/modules/organize/views/organize.html.php b/modules/organize/views/organize.html.php
index b1f062a1..2f2c3a62 100644
--- a/modules/organize/views/organize.html.php
+++ b/modules/organize/views/organize.html.php
@@ -6,7 +6,7 @@
var RESUME_BUTTON = "<?= t("Resume") ?>";
var CANCEL_BUTTON = "<?= t("Cancel") ?>";
var INVALID_DROP_TARGET = "<div class=\"gError\"><?= t("Drop cancelled as it would result in a recursive move") ?></div>";
-
+var CONFIRM_DELETE = "<?= t("Do you really want to delete the selected albums and/or photos") ?>"
var item_id = <?= $item->id ?>;
var csrf = "<?= $csrf ?>";