This commit is contained in:
KONE SOREL 2026-01-19 17:30:31 +00:00
parent 4b1529360e
commit 3318525731
4 changed files with 12 additions and 7 deletions

View File

@ -1449,13 +1449,14 @@ function enregistrer_avenant()
} }
function dataTableMini() { function dataTableSpeciale() {
const $table = $('.tabmini'); const $table = $('.tabspeciale');
const codeLangue = $("#codeLangue").val() || "fr_FR"; const codeLangue = $("#codeLangue").val() || "fr_FR";
// Détruire l'instance existante si elle existe // Détruire l'instance existante si elle existe
if ($.fn.DataTable.isDataTable($table)) { if ($.fn.DataTable.isDataTable($table)) {
$table.DataTable().clear().destroy(); $table.DataTable().clear().destroy();
$table.empty(); // Optionnel : vider le contenu si nécessaire
} }
// Définition des traductions // Définition des traductions
@ -1490,16 +1491,20 @@ function dataTableMini() {
} }
}; };
// Définition des lengthMenu selon la langue
const lengthMenuOptions = (codeLangue === "en_US") ? [20, 50, 100] : [20, 50, 100];
try { try {
$table.DataTable({ $table.DataTable({
destroy: true, destroy: true,
responsive: true, responsive: true,
lengthMenu: [10], // tu peux mettre [10, 25, 50] pour plus de flexibilité lengthMenu: lengthMenuOptions,
scrollX: true, scrollX: true,
scrollY: "20vh", scrollY: "75vh",
pagingType: "full_numbers", pagingType: "full_numbers",
autoWidth: false, autoWidth: false,
searching: false, // équivalent moderne de bFilter:false searching: false, // équivalent moderne de bFilter:false
ordering: false,
lengthChange: false, // équivalent moderne de bLengthChange:false lengthChange: false, // équivalent moderne de bLengthChange:false
orderMulti: true, orderMulti: true,
language: langOptions[codeLangue] || langOptions.fr_FR language: langOptions[codeLangue] || langOptions.fr_FR

View File

@ -70,7 +70,7 @@
<div class="card shadow-sm border-0"> <div class="card shadow-sm border-0">
<div class="table-responsive py-2"> <div class="table-responsive py-2">
<table class="table table-hover align-middle border shadow-sm tabmini compact" style="width:100%; font-size: 8.5pt;"> <table class="table table-hover align-middle border shadow-sm tabspeciale compact" style="width:100%; font-size: 8.5pt;">
<thead class="table-dark"> <thead class="table-dark">
<tr class="text-center text-nowrap"> <tr class="text-center text-nowrap">
<th><?= _("Cat") ?></th> <th><?= _("Cat") ?></th>

View File

@ -3,7 +3,7 @@
?> ?>
<div class="table-responsive"> <div class="table-responsive">
<table id="table_retrait_assures" class="table table-striped table-hover align-middle border tabmini compact" style="width:100%; font-size:8pt;"> <table class="table table-striped table-hover align-middle border tabspeciale compact" style="width:100%; font-size:8pt;">
<thead class="table-dark text-nowrap"> <thead class="table-dark text-nowrap">
<tr> <tr>
<th class="text-center small"><?= _("Cat") ?></th> <th class="text-center small"><?= _("Cat") ?></th>

View File

@ -654,7 +654,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Application Scripts --> <!-- Application Scripts -->
<script src="/Js/fonctions.js?ver=2026.01.19.13"></script> <script src="/Js/fonctions.js?ver=2026.01.19.15"></script>
<script type="text/javascript"> <script type="text/javascript">
raffraichier_gabarit(); raffraichier_gabarit();