mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
add confirm dialog when delete one item in events table
This commit is contained in:
parent
0bd255924f
commit
4904718c41
@ -712,7 +712,7 @@ function update_event(table, id_evento, type, event_rep, row) {
|
|||||||
values[this.name] = $(this).val();
|
values[this.name] = $(this).val();
|
||||||
});
|
});
|
||||||
var t1 = new Date();
|
var t1 = new Date();
|
||||||
|
console.log("al ajax directo");
|
||||||
// Update events matching current filters and id_evento selected.
|
// Update events matching current filters and id_evento selected.
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: true,
|
async: true,
|
||||||
@ -791,10 +791,25 @@ function delete_event(table, id_evento, event_rep, row) {
|
|||||||
processed += 1;
|
processed += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
confirmDialog({
|
||||||
button.children[0];
|
title: "ATTENTION",
|
||||||
button.children[0].src = "images/spinner.gif";
|
message:
|
||||||
return update_event(table, id_evento, { delete_event: 1 }, event_rep, row);
|
"<h4 style='text-align: center;padding-top: 20px;'>Are you sure?</h4>",
|
||||||
|
cancel: "Cancel",
|
||||||
|
ok: "Ok",
|
||||||
|
onAccept: function() {
|
||||||
|
// Continue execution.
|
||||||
|
button.children[0];
|
||||||
|
button.children[0].src = "images/spinner.gif";
|
||||||
|
return update_event(
|
||||||
|
table,
|
||||||
|
id_evento,
|
||||||
|
{ delete_event: 1 },
|
||||||
|
event_rep,
|
||||||
|
row
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imported from old files.
|
// Imported from old files.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user