aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Beckett <beck24@gmail.com>2012-06-27 16:00:09 -0600
committerMatt Beckett <beck24@gmail.com>2012-06-27 16:00:09 -0600
commitb804cd8dd082a8f8c2e495bbb5e465564351db84 (patch)
tree7f8bfec8a80c3600fbf554e695ae7c47e3c0e25b
parentdbf78a975d2979ebeb50bd914b4ebc2c076ae09b (diff)
downloadelgg-b804cd8dd082a8f8c2e495bbb5e465564351db84.tar.gz
elgg-b804cd8dd082a8f8c2e495bbb5e465564351db84.tar.bz2
Fixes #4607 - Adds confirmation on widget deletion
-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