Maj
This commit is contained in:
parent
f002b5652d
commit
b2b05daf76
|
|
@ -1,6 +1,55 @@
|
||||||
/**
|
/**
|
||||||
* INITIALISATION GÉNÉRALE
|
* INITIALISATION GÉNÉRALE
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Gère la pré-connexion via cookie (chargement du formulaire et focus intelligent).
|
||||||
|
* Récupère le login mémorisé et place le curseur dans le champ approprié.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function connexion_cookie() {
|
||||||
|
const racine = $("#racineWeb").val() || "";
|
||||||
|
const msgErreur = $("#msgErreur").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: racine + "Ajaxconnexioncookie/",
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
// Utilisation d'un objet pour un encodage automatique sécurisé
|
||||||
|
data: { msgErreur: msgErreur },
|
||||||
|
success: function(data) {
|
||||||
|
// Injection du formulaire de connexion
|
||||||
|
$("#div_ajaxconnexion").html(data);
|
||||||
|
|
||||||
|
// Initialisation des composants stylisés
|
||||||
|
if ($.isFunction($.fn.selectpicker)) {
|
||||||
|
$(".selectpicker").selectpicker('refresh');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error("Erreur lors du chargement des cookies de connexion:", error);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
// Gestion intelligente du focus
|
||||||
|
const $loginField = $("#login");
|
||||||
|
const $mdpField = $("#mdp");
|
||||||
|
const $codeSocieteField = $("#codeSociete");
|
||||||
|
|
||||||
|
// Si un login est déjà présent (issu du cookie)
|
||||||
|
if ($loginField.val() && $loginField.val().trim() !== "") {
|
||||||
|
// On place le curseur sur le mot de passe
|
||||||
|
$mdpField.focus();
|
||||||
|
} else {
|
||||||
|
// Sinon, on commence par le début (Code Société ou Login)
|
||||||
|
if ($codeSocieteField.length > 0) {
|
||||||
|
$codeSocieteField.focus();
|
||||||
|
} else {
|
||||||
|
$loginField.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// 1. Initialisation des composants au chargement de la page
|
// 1. Initialisation des composants au chargement de la page
|
||||||
appliquerDataTable();
|
appliquerDataTable();
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<script src="Bootstrap/js/jquery-ui.js"></script>
|
<script src="Bootstrap/js/jquery-ui.js"></script>
|
||||||
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="Js/datepicker-fr.js"></script>
|
<script src="Js/datepicker-fr.js"></script>
|
||||||
<script src="Js/fonctions.js?ver=connexion_2025.09.25.04"></script>
|
<script src="Js/fonctions.js?ver=connexion_2025.12.26.00"></script>
|
||||||
<script src="Bootstrap/js/timer.jquery.js"></script>
|
<script src="Bootstrap/js/timer.jquery.js"></script>
|
||||||
<script src="Bootstrap/js/jquery.timer.js"></script>
|
<script src="Bootstrap/js/jquery.timer.js"></script>
|
||||||
<script src="Bootstrap/js/ajaxmask.js"></script>
|
<script src="Bootstrap/js/ajaxmask.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -628,7 +628,7 @@ console.groupEnd();
|
||||||
<script src="/Bootstrap_new/js/ux-manager.js?ver=2025.12.23.01"></script>
|
<script src="/Bootstrap_new/js/ux-manager.js?ver=2025.12.23.01"></script>
|
||||||
|
|
||||||
<!-- Service Worker Registration -->
|
<!-- Service Worker Registration -->
|
||||||
<script src="/Js/sw-register.js?ver=2025.12.22.00"></script>
|
<script src="/Js/sw-register.js?ver=2025.12.26.00"></script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user