From f2cb6343f7351e14f149f0e3bb6b97638bead2dd Mon Sep 17 00:00:00 2001 From: solocla Date: Sun, 19 Jul 2026 15:17:18 +0200 Subject: [PATCH] fixed table dscaeznairio --- public/userarea/scadenzario/index.php | 63 +++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/public/userarea/scadenzario/index.php b/public/userarea/scadenzario/index.php index 92ea6ea..dcf0bf9 100644 --- a/public/userarea/scadenzario/index.php +++ b/public/userarea/scadenzario/index.php @@ -653,6 +653,38 @@ function getContrastTextColor($hexColor) width: 100%; } } + + /* Law badge */ + .law-badge { + display: inline-flex; + align-items: center; + gap: 0.25rem; + padding: 0.1rem 0.45rem; + border-radius: 0.35rem; + font-size: 0.68rem; + font-weight: 700; + background: #eef3ff; + color: var(--scad-primary); + border: 1px solid #d0d9e8; + cursor: pointer; + vertical-align: middle; + white-space: nowrap; + } + + .law-badge:hover { + background: var(--scad-primary); + color: #fff; + border-color: var(--scad-primary); + } + + .popover { + max-width: 320px; + } + + .popover-body { + font-size: 0.85rem; + color: var(--scad-heading); + } @@ -970,7 +1002,6 @@ function getContrastTextColor($hexColor) Argomento Dettaglio - Legge/Art. Scadenza Verifica Funzione @@ -1025,8 +1056,18 @@ function getContrastTextColor($hexColor) 0): ?> + + + Legge + + - @@ -1133,7 +1174,7 @@ function getContrastTextColor($hexColor) if ($('#deadlinesTable').length) { table = $('#deadlinesTable').DataTable({ order: [ - [3, 'asc'] + [2, 'asc'] ], pageLength: 25, language: { @@ -1145,7 +1186,21 @@ function getContrastTextColor($hexColor) }] }); } - + // --- Popover Legge/Articolo --- + function initLawPopovers() { + $('.js-law-popover').each(function() { + if (!bootstrap.Popover.getInstance(this)) { + new bootstrap.Popover(this, { + html: false, + container: 'body' + }); + } + }); + } + initLawPopovers(); + if (table) { + table.on('draw', initLawPopovers); + } // --- Filters --- function filterCards() { var statusVal = $('#filterStatus').val();