From 24f4f68b33e884fb8e9155700217f8b05e5ea9f6 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 11 May 2020 14:50:13 +0200 Subject: [PATCH] Fixed errors in dashboards --- .../include/javascript/pandora_dashboards.js | 15 +++++++++++++-- pandora_console/include/styles/dashboards.css | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 842bd5daaa..8fec02411c 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -667,8 +667,19 @@ function initialiceLayout(data) { } $("#delete-widget-" + cellId).click(function(event) { - var nodo = event.target.offsetParent; - deleteCell(cellId, nodo.parentNode); + // eslint-disable-next-line no-undef + confirmDialog({ + title: "Are you sure?", + message: + "

All changes made to this widget will be lost

", + cancel: "Cancel", + ok: "Ok", + onAccept: function() { + // Continue execution. + var nodo = event.target.offsetParent; + deleteCell(cellId, nodo.parentNode); + } + }); }); $("#configure-widget-" + cellId).click(function() { diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index f3b41ccb2c..e89e282d6f 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -477,14 +477,14 @@ div#main_pure { margin-top: 30px; } -.info_box { +.content-widget .info_box { border-radius: 5px; width: 90%; } -.info_box tbody tr td { +.content-widget .info_box tbody tr td { padding: 10px; } -.info_box tbody tr td.icon { +.content-widget .info_box tbody tr td.icon { padding-right: 10px !important; }