mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
Merge branch 'ent-5750-dashboards-boton-de-borrado' into 'develop'
add delete confirmation dialog See merge request artica/pandorafms!3185
This commit is contained in:
commit
19713f5040
@ -244,8 +244,19 @@ function initialiceLayout(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#delete-widget-" + id).click(function(event) {
|
$("#delete-widget-" + id).click(function(event) {
|
||||||
var nodo = event.target.offsetParent;
|
// eslint-disable-next-line no-undef
|
||||||
deleteCell(id, nodo.parentNode);
|
confirmDialog({
|
||||||
|
title: "Are you sure?",
|
||||||
|
message:
|
||||||
|
"<h4 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h4>",
|
||||||
|
cancel: "Cancel",
|
||||||
|
ok: "Ok",
|
||||||
|
onAccept: function() {
|
||||||
|
// Continue execution.
|
||||||
|
var nodo = event.target.offsetParent;
|
||||||
|
deleteCell(id, nodo.parentNode);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#configure-widget-" + id).click(function() {
|
$("#configure-widget-" + id).click(function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user