diff --git a/Js/fonctions.js b/Js/fonctions.js index 5873c1d..be14563 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -376,67 +376,62 @@ function connexion_cookie() // Applique la librairie DataBase sur les tableaux function appliquerDataTable() { - const $table = $('.tabliste'); const codeLangue = $("#codeLangue").val(); - // Dictionnaire des traductions const translations = { - en_US: { - lengthMenu: "Display _MENU_ records per page", - zeroRecords: "Nothing found - sorry", - info: "Showing page _PAGE_ of _PAGES_", - infoEmpty: "No records available", - search: "Search:", - paginate: { - next: "►", - previous: "◄", - first: "|◄", - last: "►|" - }, - infoFiltered: "(filtered from _MAX_ total records)" - }, fr_FR: { lengthMenu: "Affiche _MENU_ par page", zeroRecords: "Désolé - Aucune donnée trouvée", info: "_PAGE_ sur _PAGES_ pages", infoEmpty: "Pas d'enregistrement", search: "Recherche:", - paginate: { - next: "►", - previous: "◄", - first: "|◄", - last: "►|" - }, + paginate: { next: "►", previous: "◄", first: "|◄", last: "►|" }, infoFiltered: "(filtré de _MAX_ total enregistrements)" + }, + en_US: { + lengthMenu: "Display _MENU_ records per page", + zeroRecords: "Nothing found - sorry", + info: "Showing page _PAGE_ of _PAGES_", + infoEmpty: "No records available", + search: "Search:", + paginate: { next: "►", previous: "◄", first: "|◄", last: "►|" }, + infoFiltered: "(filtered from _MAX_ total records)" } }; - // Options DataTable - const options = { - destroy: true, - responsive: true, - order: [[0, "desc"]], - lengthMenu: [50, 100, 150], - pagingType: "full_numbers", - autoWidth: false, - language: translations[codeLangue] || translations.fr_FR - }; + $('.tabliste').each(function() { + const $table = $(this); + + // Détecter les colonnes avec data-hidden="true" + const hiddenTargets = []; + $table.find('thead th').each(function(index) { + if ($(this).data('hidden')) { + hiddenTargets.push(index); + } + }); + + const options = { + destroy: true, + responsive: true, + order: [[0, "desc"]], + lengthMenu: [50, 100, 150], + pagingType: "full_numbers", + autoWidth: false, + language: translations[codeLangue] || translations.fr_FR, + columnDefs: [ + { targets: hiddenTargets, visible: false, searchable: true } + ] + }; - try { - // Initialisation const instance = $table.DataTable(options); - // Correction d'alignement après le rendu setTimeout(() => { instance.columns.adjust().responsive.recalc(); }, 100); - - } catch (err) { - console.error("Erreur lors de l'application du DataTable :", err); - return false; - } + }); } + function raffraichier_gabarit() { diff --git a/Vue/Accueil/index.php b/Vue/Accueil/index.php index ee7eb34..04703fe 100644 --- a/Vue/Accueil/index.php +++ b/Vue/Accueil/index.php @@ -78,48 +78,61 @@
- - - - - - - - - - - - + + + + + + + + + + + + + + + + - - nettoyer($police['idPolice']); - $nopol = $this->nettoyer($police['numeroPolice']); - ?> - - - - - - - - - - - - + nettoyer($police['idPolice']); + $nopol = $this->nettoyer($police['numeroPolice']); + ?> + + + + - 65 && $police["rapportSp"] <= 80):?> - - 80):?> - - - - - - - + + + + + + + + + + 65 && $police["rapportSp"] <= 80):?> + + 80):?> + + + + + + + + + +
Type
Type NoPoliceHiddenIdPoliceHidden
nettoyer($police['typeContrat']) ?>nettoyer($police['dateEffet']), $_SESSION['lang'])?>nettoyer($police['dateEcheance']), $_SESSION['lang']) ?>nettoyer($police['typeAvenant']) ?>nettoyer($police['etatPolice']) ?>nettoyer($police['primeNetteStat'])) ?>nettoyer($police['montantApayer'])) ?>
+ + + +
nettoyer($police['typeContrat']) ?>nettoyer($police['dateEffet']), $_SESSION['lang'])?>nettoyer($police['dateEcheance']), $_SESSION['lang']) ?>nettoyer($police['typeAvenant']) ?>nettoyer($police['etatPolice']) ?>nettoyer($police['primeNetteStat'])) ?>nettoyer($police['montantApayer'])) ?>
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 5abe5d6..956ca41 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -594,7 +594,7 @@ console.groupEnd(); - +