Merge branch 'main' of git.ebene.ovh:ebene/production

This commit is contained in:
2026-01-31 14:59:15 +00:00
21 changed files with 1580 additions and 107 deletions

View File

@@ -40730,7 +40730,7 @@ function enregistrer_new_repos_medical()
});
}
//
function charger_detail_stat_police_anomalies()
{
$('#div_export_b').html("");
@@ -48852,81 +48852,74 @@ function appliquerDataTable(){
}
function dataTableSpeciale(){
const oTable = $('.tabspeciale');
var codeLangue = $("#codeLangue").val();
// Détruire l'instance existante si elle existe
if ($.fn.DataTable.isDataTable(oTable)) {
table.DataTable().destroy();
table.empty(); // Optionnel : vider le contenu si nécessaire
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
const langOptions = {
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: "►|"
},
infoFiltered: "(filtré de _MAX_ total enregistrements)"
}
};
// Définition des lengthMenu selon la langue
const lengthMenuOptions = (codeLangue === "en_US") ? [50, 100, 150] : [20, 50, 100];
try {
$table.DataTable({
destroy: true,
responsive: true,
lengthMenu: lengthMenuOptions,
scrollX: true,
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
});
// Ajuster les colonnes après init
$table.DataTable().columns.adjust().draw();
} catch (err) {
console.error("Erreur DataTable:", err);
return false;
}
try{
if(codeLangue=="en_US")
{
oTable.DataTable({
destroy: true,
responsive: true,
"lengthMenu": [ 50, 100, 150],
"scrollX": true,
"scrollY": "75vh",
"pagingType": "full_numbers",
"autoWidth": false,
"bFilter": false,
"ordering": false,
"bLengthChange": false,
"orderMulti": true,
"language": {
"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)"
}
});
}else{
oTable.DataTable({
destroy: true,
responsive: true,
"lengthMenu": [ 50, 100, 150],
"scrollX": true,
"scrollY": "75vh",
"pagingType": "full_numbers",
"autoWidth": false,
"bFilter": false,
"ordering": false,
"bLengthChange": false,
"orderMulti": true,
"language": {
"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": "►|"
},
"infoFiltered": "(filtré de _MAX_ total enregistrements)"
}
});
}
//$('.tabspeciale').columns.adjust().draw();
}
catch(err){
return false;
}
}
function dataTableSpecialeMini(){
@@ -91895,6 +91888,26 @@ function afficher_ordonnance_beneficiaire()
});
}
// Fonction globale pour tes notifications AJAX (Wahoo Effect)
function notification(type, message) {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
Toast.fire({
icon: type, // 'success', 'error', 'warning', 'info'
title: message
});
}
function gerer_garant_defaut()
{
codeGcAssureurDefaut=$("#codeGcAssureurDefaut").val();