From b804cd8dd082a8f8c2e495bbb5e465564351db84 Mon Sep 17 00:00:00 2001 From: Matt Beckett Date: Wed, 27 Jun 2012 16:00:09 -0600 Subject: Fixes #4607 - Adds confirmation on widget deletion --- js/lib/ui.widgets.js | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3