Added custom confirm dialog to events

This commit is contained in:
fermin831 2018-04-25 12:34:33 +02:00
parent 675e8deb47
commit 9c9f75152d

View File

@ -875,15 +875,17 @@ $(document).ready( function() {
});
$("td").on('click', 'a.delete_event', function () {
confirmation = confirm("<?php echo __('Are you sure?'); ?>");
if (!confirmation) {
return;
}
var click_element = this;
display_confirm_dialog(
"<?php echo __('Are you sure?'); ?>",
"<?php echo __('Confirm'); ?>",
"<?php echo __('Cancel'); ?>",
function () {
meta = $('#hidden-meta').val();
history_var = $('#hidden-history').val();
$tr = $(this).parents ("tr");
id = this.id.split ("-").pop ();
$tr = $(click_element).parents ("tr");
id = click_element.id.split ("-").pop ();
$("#delete_cross_"+id).attr ("src", "images/spinner.gif");
@ -906,6 +908,8 @@ $(document).ready( function() {
"html"
);
return false;
}
);
});
function toggleDiv (divid) {