fixed table dscaeznairio
This commit is contained in:
@@ -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);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -970,7 +1002,6 @@ function getContrastTextColor($hexColor)
|
||||
<tr>
|
||||
<th style="width:110px">Argomento</th>
|
||||
<th>Dettaglio</th>
|
||||
<th class="d-none d-lg-table-cell">Legge/Art.</th>
|
||||
<th>Scadenza</th>
|
||||
<th class="d-none d-lg-table-cell">Verifica</th>
|
||||
<th>Funzione</th>
|
||||
@@ -1025,8 +1056,18 @@ function getContrastTextColor($hexColor)
|
||||
<?php if ((int)$row['attachment_count'] > 0): ?>
|
||||
<span class="text-muted ms-1" title="<?= (int)$row['attachment_count'] ?> allegati"><i class="fa-solid fa-paperclip"></i> <?= (int)$row['attachment_count'] ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($row['law_regulation'])): ?>
|
||||
<span class="law-badge ms-1 js-law-popover"
|
||||
data-bs-toggle="popover"
|
||||
data-bs-trigger="focus"
|
||||
data-bs-placement="top"
|
||||
data-bs-title="Legge / Articolo"
|
||||
data-bs-content="<?= htmlspecialchars($row['law_regulation'], ENT_QUOTES, 'UTF-8') ?>"
|
||||
tabindex="0" role="button">
|
||||
<i class="fa-solid fa-scale-balanced"></i> Legge
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell text-muted"><?= htmlspecialchars($row['law_regulation'] ?? '—', ENT_QUOTES, 'UTF-8') ?></td>
|
||||
<td><span class="text-nowrap"><?= $row['_dueFmt'] ?></span></td>
|
||||
<td class="d-none d-lg-table-cell text-muted"><?= $row['_checkFmt'] ?></td>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user