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() {
const $table = $('.tabmini');
function dataTableSpeciale() {
const $table = $('.tabspeciale');
const codeLangue = $("#codeLangue").val() || "fr_FR";
// Détruire l'instance existante si elle existe
if ($.fn.DataTable.isDataTable($table)) {
$table.DataTable().clear().destroy();
$table.empty(); // Optionnel : vider le contenu si nécessaire
}
// 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 {
$table.DataTable({
destroy: true,
responsive: true,
lengthMenu: [10], // tu peux mettre [10, 25, 50] pour plus de flexibilité
lengthMenu: lengthMenuOptions,
scrollX: true,
scrollY: "20vh",
scrollY: "75vh",
pagingType: "full_numbers",
autoWidth: false,
searching: false, // équivalent moderne de bFilter:false
ordering: false,
lengthChange: false, // équivalent moderne de bLengthChange:false
orderMulti: true,
language: langOptions[codeLangue] || langOptions.fr_FR

View File

@ -70,7 +70,7 @@
<div class="card shadow-sm border-0">
<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">
<tr class="text-center text-nowrap">
<th><?= _("Cat") ?></th>

View File

@ -3,7 +3,7 @@
?>
<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">
<tr>
<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>
<!-- 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">
raffraichier_gabarit();