diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index cb9b4333a9..03101d09b4 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -873,41 +873,45 @@ $(document).ready( function() { "html" ); }); - + $("td").on('click', 'a.delete_event', function () { - confirmation = confirm(""); - if (!confirmation) { - return; - } - meta = $('#hidden-meta').val(); - history_var = $('#hidden-history').val(); - - $tr = $(this).parents ("tr"); - id = this.id.split ("-").pop (); - - $("#delete_cross_"+id).attr ("src", "images/spinner.gif"); - - jQuery.post ("", - {"page" : "operation/events/events", - "delete_event" : 1, - "id" : id, - "similars" : , - "meta" : meta, - "history" : history_var - }, - function (data, status) { - if (data == "ok") { - $tr.remove (); - $('#show_message_error').html('

'); - } - else - $('#show_message_error').html('

'); - }, - "html" + var click_element = this; + display_confirm_dialog( + "", + "", + "", + function () { + meta = $('#hidden-meta').val(); + history_var = $('#hidden-history').val(); + + $tr = $(click_element).parents ("tr"); + id = click_element.id.split ("-").pop (); + + $("#delete_cross_"+id).attr ("src", "images/spinner.gif"); + + jQuery.post ("", + {"page" : "operation/events/events", + "delete_event" : 1, + "id" : id, + "similars" : , + "meta" : meta, + "history" : history_var + }, + function (data, status) { + if (data == "ok") { + $tr.remove (); + $('#show_message_error').html('

'); + } + else + $('#show_message_error').html('

'); + }, + "html" + ); + return false; + } ); - return false; }); - + function toggleDiv (divid) { if (document.getElementById(divid).style.display == 'none') { document.getElementById(divid).style.display = 'block';