This commit is contained in:
KONE SOREL 2026-04-09 17:07:42 +00:00
parent 3455a3104e
commit dc8a6bdc02

View File

@ -92276,17 +92276,17 @@ function initSmartTable(selector = '.datatable-inter', pageTitle = 'Export Donn
$(selector).DataTable().destroy();
}
// Modification du DOM :
// On enveloppe 'f' (Filter) dans une div avec 'ms-auto' pour le pousser à droite
var domStructure = hasGlobalSearch
? '<"d-flex align-items-center justify-content-start p-3 border-bottom"B>t<"d-flex justify-content-between align-items-center p-3 bg-light"ip>'
: '<"d-flex align-items-center justify-content-between p-3 border-bottom"Bf>t<"d-flex justify-content-between align-items-center p-3 bg-light"ip>';
: '<"d-flex align-items-center p-3 border-bottom"B<"ms-auto"f>>t<"d-flex justify-content-between align-items-center p-3 bg-light"ip>';
// Détermination de l'option "order" :
// Si defaultOrder est explicitement false, on passe un tableau vide pour désactiver le tri auto
var orderConfig = (defaultOrder === false) ? [] : defaultOrder;
var table = $(selector).DataTable({
"dom": domStructure,
"order": orderConfig, // <--- AJOUT ICI
"order": orderConfig,
"buttons": [
{
extend: 'excelHtml5',
@ -92304,14 +92304,21 @@ function initSmartTable(selector = '.datatable-inter', pageTitle = 'Export Donn
],
"language": {
"url": "//cdn.datatables.net/plug-ins/1.13.6/i18n/fr-FR.json",
"search": "Rechercher : ",
"searchPlaceholder": "Filtrer..."
"search": "", // On vide le texte "Rechercher :" pour un look plus moderne
"searchPlaceholder": "Rechercher..."
},
"pageLength": 10,
"autoWidth": false,
"drawCallback": function() {
if (!hasGlobalSearch) {
$('.dataTables_filter input').addClass('form-control form-control-sm d-inline-block ms-2 rounded-pill border-2 shadow-none').css('width', '200px');
// Style de l'input de recherche
$('.dataTables_filter input')
.addClass('form-control form-control-sm shadow-none border-primary-subtle')
.css({
'width': '250px',
'border-radius': '20px',
'padding-left': '15px'
});
}
$('.dataTables_paginate .paginate_button').addClass('btn btn-xs mx-1');
}