Maj DataTable export
This commit is contained in:
parent
a6ae4e7efe
commit
191600e27f
|
|
@ -402,7 +402,7 @@ function appliquerDataTable() {
|
||||||
$('.tabliste').each(function() {
|
$('.tabliste').each(function() {
|
||||||
const $table = $(this);
|
const $table = $(this);
|
||||||
|
|
||||||
// Détecter les colonnes avec data-hidden="true"
|
// Détecter les colonnes cachées
|
||||||
const hiddenTargets = [];
|
const hiddenTargets = [];
|
||||||
$table.find('thead th').each(function(index) {
|
$table.find('thead th').each(function(index) {
|
||||||
if ($(this).data('hidden')) {
|
if ($(this).data('hidden')) {
|
||||||
|
|
@ -420,6 +420,14 @@ function appliquerDataTable() {
|
||||||
language: translations[codeLangue] || translations.fr_FR,
|
language: translations[codeLangue] || translations.fr_FR,
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ targets: hiddenTargets, visible: false, searchable: true }
|
{ targets: hiddenTargets, visible: false, searchable: true }
|
||||||
|
],
|
||||||
|
dom: 'Bfrtip', // B = Buttons, f = filter, r = processing, t = table, i = info, p = pagination
|
||||||
|
buttons: [
|
||||||
|
{ extend: 'copy', text: 'Copier' },
|
||||||
|
{ extend: 'csv', text: 'CSV' },
|
||||||
|
{ extend: 'excel', text: 'Excel' },
|
||||||
|
{ extend: 'pdf', text: 'PDF' },
|
||||||
|
{ extend: 'print', text: 'Imprimer' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -431,7 +439,6 @@ function appliquerDataTable() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function raffraichier_gabarit()
|
function raffraichier_gabarit()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,9 @@ console.groupEnd();
|
||||||
<!-- DataTables -->
|
<!-- DataTables -->
|
||||||
<link href="https://cdn.datatables.net/v/bs5/jq-3.7.0/dt-2.0.3/datatables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/v/bs5/jq-3.7.0/dt-2.0.3/datatables.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- DataTables Buttons CSS -->
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.2/css/buttons.bootstrap5.min.css">
|
||||||
|
|
||||||
<!-- SweetAlert2 -->
|
<!-- SweetAlert2 -->
|
||||||
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.10.5/dist/sweetalert2.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.10.5/dist/sweetalert2.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
|
@ -590,11 +593,23 @@ console.groupEnd();
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/v/bs5/dt-1.13.6/datatables.min.js"></script>
|
<script src="https://cdn.datatables.net/v/bs5/dt-1.13.6/datatables.min.js"></script>
|
||||||
|
|
||||||
|
<!-- JS Buttons + dépendances -->
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.4.2/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.bootstrap5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.print.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Librairies pour Excel/PDF -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||||
<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=2025.12.25.03"></script>
|
<script src="/Js/fonctions.js?ver=2025.12.25.04"></script>
|
||||||
|
|
||||||
<?php if (est_anglophone()): ?>
|
<?php if (est_anglophone()): ?>
|
||||||
<script src="/Js/datepicker-eng.js"></script>
|
<script src="/Js/datepicker-eng.js"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user