diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-06-29 19:03:36 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-06-29 19:03:36 -0700 |
commit | b1adaebc1c624e0fd8f7e1c65a0b8f0501259b0e (patch) | |
tree | 8c9268d0620efd49aee3230f313c244b6db9924b /js/lib/ui.widgets.js | |
parent | 0288907a2989db16408eba3018668d07c7626cdd (diff) | |
parent | b804cd8dd082a8f8c2e495bbb5e465564351db84 (diff) | |
download | elgg-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/lib/ui.widgets.js')
-rw-r--r-- | js/lib/ui.widgets.js | 5 |
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 |