aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-29 19:03:36 -0700
committerCash Costello <cash.costello@gmail.com>2012-06-29 19:03:36 -0700
commitb1adaebc1c624e0fd8f7e1c65a0b8f0501259b0e (patch)
tree8c9268d0620efd49aee3230f313c244b6db9924b /js
parent0288907a2989db16408eba3018668d07c7626cdd (diff)
parentb804cd8dd082a8f8c2e495bbb5e465564351db84 (diff)
downloadelgg-b1adaebc1c624e0fd8f7e1c65a0b8f0501259b0e.tar.gz
elgg-b1adaebc1c624e0fd8f7e1c65a0b8f0501259b0e.tar.bz2
Merge pull request #284 from beck24/widget-delete-confirmation
Fixes #4607 - Adds confirmation to widget deletion
Diffstat (limited to 'js')
-rw-r--r--js/lib/ui.widgets.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js
index d897564b4..b7d4b2fe4 100644
--- a/js/lib/ui.widgets.js
+++ b/js/lib/ui.widgets.js
@@ -107,6 +107,11 @@ elgg.ui.widgets.move = function(event, ui) {
* @return void
*/
elgg.ui.widgets.remove = function(event) {
+ if (confirm(elgg.echo('deleteconfirm')) == false) {
+ event.preventDefault();
+ return;
+ }
+
var $widget = $(this).closest('.elgg-module-widget');
// if widget type is single instance type, enable the add buton