Add confirmation window
This commit is contained in:
parent
ef30239cc6
commit
ccd58897ee
|
@ -244,8 +244,18 @@ function initialiceLayout(data) {
|
|||
}
|
||||
|
||||
$("#delete-widget-" + id).click(function(event) {
|
||||
var nodo = event.target.offsetParent;
|
||||
deleteCell(id, nodo.parentNode);
|
||||
// eslint-disable-next-line no-undef
|
||||
confirmDialog({
|
||||
title: "Are you sure?",
|
||||
message: "",
|
||||
cancel: "Cancel",
|
||||
ok: "Ok",
|
||||
onAccept: function() {
|
||||
// Continue execution.
|
||||
var nodo = event.target.offsetParent;
|
||||
deleteCell(id, nodo.parentNode);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#configure-widget-" + id).click(function() {
|
||||
|
|
|
@ -58,7 +58,7 @@ if ($manageDashboards !== 0) {
|
|||
$output .= '</a> ';
|
||||
}
|
||||
|
||||
$output .= '<a id="delete-widget-'.$cellData['id'].'" class="" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$output .= '<a id="delete-widget-'.$cellData['id'].'" class="">';
|
||||
$output .= html_print_image(
|
||||
'images/input_delete_white.png',
|
||||
true,
|
||||
|
|
Loading…
Reference in New Issue