diff --git a/public/userarea/matrici.php b/public/userarea/matrici.php index 77d16dc..f8fb4cc 100644 --- a/public/userarea/matrici.php +++ b/public/userarea/matrici.php @@ -138,6 +138,65 @@ .dataTables_wrapper .dataTables_filter input { padding-right: 42px !important; } + + /* --- FIX larghezze tabella matrici --- */ + #tabellaMatrici { + table-layout: fixed; + /* rende fisse le larghezze */ + width: 100% !important; + } + + #tabellaMatrici th, + #tabellaMatrici td { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + /* evita che il testo allarghi */ + vertical-align: middle; + } + + /* Foto: più stretta */ + #tabellaMatrici th:nth-child(1), + #tabellaMatrici td:nth-child(1) { + width: 90px; + max-width: 90px; + } + + /* Nome: più largo */ + #tabellaMatrici th:nth-child(2), + #tabellaMatrici td:nth-child(2) { + width: 320px; + max-width: 320px; + } + + /* Cliente: più largo */ + #tabellaMatrici th:nth-child(3), + #tabellaMatrici td:nth-child(3) { + width: 320px; + max-width: 320px; + } + + /* Data: piccola */ + #tabellaMatrici th:nth-child(4), + #tabellaMatrici td:nth-child(4) { + width: 120px; + max-width: 120px; + } + + /* Azioni: fissa */ + #tabellaMatrici th:nth-child(5), + #tabellaMatrici td:nth-child(5) { + width: 170px; + max-width: 170px; + } + + /* Immagine: non “sfora” mai nella cella */ + #tabellaMatrici td:nth-child(1) img { + width: 70px; + /* puoi scendere a 60 */ + height: 60px; + object-fit: cover; + } @@ -213,19 +272,33 @@ echo ""; // colonna FOTO - echo " - - "; + // colonna FOTO (robusta: NP appare solo se l'immagine non si carica) + $imgSrc = $hasPhoto ? $thumb : ''; // se non c'è foto, src vuoto → trigger onerror - // colonna NOME - echo "" . htmlspecialchars($row['nome']) . ""; + echo " + + NP + "; + + + // colonna NOME (con tooltip) + echo "" + . htmlspecialchars($row['nome']) + . ""; + + // colonna CLIENTE (con tooltip) + echo "" + . htmlspecialchars($row['cliente']) + . ""; - // colonna CLIENTE - echo "" . htmlspecialchars($row['cliente']) . ""; // colonna DATA echo "{$dataIT}"; @@ -327,6 +400,14 @@ order: [ [0, 'desc'] ], + columnDefs: [{ + targets: 0, // colonna FOTO + orderable: false, + searchable: false, + render: function(data, type, row, meta) { + return data; // lascia l'HTML così com'è (img + NP) + } + }], pageLength: 50, language: { url: 'https://cdn.datatables.net/plug-ins/1.13.6/i18n/it-IT.json'