diff options
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/ui.widgets.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js index 6435d2147..f12ae02c1 100644 --- a/js/lib/ui.widgets.js +++ b/js/lib/ui.widgets.js @@ -124,15 +124,9 @@ elgg.ui.widgets.remove = function(event) { $widget.remove(); - // elgg-widget-delete-button-<guid> - var id = $(this).attr('id'); - id = id.substr(id.indexOf('elgg-widget-delete-button-') + "elgg-widget-delete-button-".length); + // delete the widget through ajax + elgg.action($(this).attr('href')); - elgg.action('widgets/delete', { - data: { - widget_guid: id - } - }); event.preventDefault(); }; |