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:
Daniel Rodriguez 2020-04-28 11:36:17 +02:00
commit 19713f5040
1 changed files with 13 additions and 2 deletions

View File

@ -244,8 +244,19 @@ function initialiceLayout(data) {
} }
$("#delete-widget-" + id).click(function(event) { $("#delete-widget-" + id).click(function(event) {
// eslint-disable-next-line no-undef
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; var nodo = event.target.offsetParent;
deleteCell(id, nodo.parentNode); deleteCell(id, nodo.parentNode);
}
});
}); });
$("#configure-widget-" + id).click(function() { $("#configure-widget-" + id).click(function() {