This commit is contained in:
KONE SOREL 2026-04-08 08:41:39 +00:00
parent 7048ee2f00
commit be94c3316e
3 changed files with 57 additions and 5 deletions

View File

@ -1999,4 +1999,10 @@ select[class*="selectpicker"],
.border-primary{border-color: #212e53 !important;}
.text-primary { color: #212e53 !important; }
.shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.bg-primary {background-color: #212e53 !important;}
.bg-primary {background-color: #212e53 !important;}
/* Force SweetAlert au premier plan absolu (Bootstrap modals sont à 1055) */
.swal2-container.swal2-high-zindex {z-index: 10000 !important;}
/* Amélioration de la visibilité sur les fonds sombres de l'ERP */
.swal2-popup {border: 1px solid rgba(255, 255, 255, 0.1);box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;}

View File

@ -68,9 +68,53 @@ function confirm_ebene(p_msg, p_msg_eng) {
}
/**
* ALERTE SIMPLE
*/
function alert_ebene(p_msg, p_msg_eng) {
let codeLangue = $("#codeLangue").val();
let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
// Détection de la modale active pour le focus
let targetNode = document.querySelector('.modal.show') || document.body;
Swal.fire({
title: message,
icon: 'info',
confirmButtonText: codeLangue === "en_US" ? 'OK' : 'D\'accord',
target: targetNode, // Se fixe sur la modale si elle existe
customClass: { container: 'swal2-high-zindex' } // Classe pour le CSS
});
}
/**
* CONFIRMATION (Promesse)
*/
function confirm_ebene(p_msg, p_msg_eng) {
let codeLangue = $("#codeLangue").val();
let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
let targetNode = document.querySelector('.modal.show') || document.body;
return Swal.fire({
title: message,
icon: 'warning',
showCancelButton: true,
confirmButtonText: codeLangue === "en_US" ? 'Yes' : 'Oui',
cancelButtonText: codeLangue === "en_US" ? 'No' : 'Non',
target: targetNode,
customClass: { container: 'swal2-high-zindex' }
}).then((result) => {
return result.isConfirmed;
});
}
/**
* PROMPT (Saisie de texte)
*/
function prompt_ebene(p_msg, p_msg_eng, p_retour, callback) {
let codeLangue = $("#codeLangue").val();
let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
let targetNode = document.querySelector('.modal.show') || document.body;
Swal.fire({
title: message,
@ -78,12 +122,14 @@ function prompt_ebene(p_msg, p_msg_eng, p_retour, callback) {
inputValue: p_retour,
showCancelButton: true,
confirmButtonText: 'OK',
cancelButtonText: 'Annuler'
cancelButtonText: codeLangue === "en_US" ? 'Cancel' : 'Annuler',
target: targetNode,
customClass: { container: 'swal2-high-zindex' }
}).then((result) => {
if (result.isConfirmed) {
callback(result.value); // Exécute la fonction callback avec la valeur saisie
callback(result.value);
} else {
callback(null); // Annule l'opération
callback(null);
}
});
}

View File

@ -346,7 +346,7 @@
<div class="col-12 mt-3">
<button id="btn_familleacteLienParente" name="btn_familleacteLienParente" type="button"
class="btn btn-primary w-100 py-2 fw-bold shadow-sm"
class="btn btn-primary py-2 fw-bold shadow-sm"
onclick="javascript:validiteDateEffetGarantieLienParente();">
<i class="fas fa-plus-circle me-2"></i><?= _("Valider et insérer la règle par lien de parenté") ?>
</button>