TEST Portail
This commit is contained in:
parent
43b7611b25
commit
f0ee7084f0
|
|
@ -554,40 +554,78 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contrôle de l'affichage du footer selon le focus du mot de passe
|
// Contrôle de l'affichage du footer selon le focus du mot de passe
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
|
function setupFooterBehavior() {
|
||||||
const mdpField = document.getElementById('mdp');
|
const mdpField = document.getElementById('mdp');
|
||||||
const footer = document.querySelector('.footer');
|
const footer = document.querySelector('.footer');
|
||||||
|
|
||||||
|
console.log('mdpField:', mdpField); // Pour debug
|
||||||
|
console.log('footer:', footer); // Pour debug
|
||||||
|
|
||||||
if (mdpField && footer) {
|
if (mdpField && footer) {
|
||||||
// Quand le champ mot de passe prend le focus
|
console.log('Éléments trouvés, configuration du comportement...');
|
||||||
|
|
||||||
|
// Focus sur le mot de passe
|
||||||
mdpField.addEventListener('focus', function() {
|
mdpField.addEventListener('focus', function() {
|
||||||
|
console.log('Focus sur mdp');
|
||||||
footer.style.opacity = '0';
|
footer.style.opacity = '0';
|
||||||
footer.style.visibility = 'hidden';
|
footer.style.visibility = 'hidden';
|
||||||
footer.style.transition = 'opacity 0.3s ease, visibility 0.3s ease';
|
footer.style.pointerEvents = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Quand le champ mot de passe perd le focus
|
// Perte de focus sur le mot de passe
|
||||||
mdpField.addEventListener('blur', function() {
|
mdpField.addEventListener('blur', function() {
|
||||||
|
console.log('Blur sur mdp');
|
||||||
footer.style.opacity = '1';
|
footer.style.opacity = '1';
|
||||||
footer.style.visibility = 'visible';
|
footer.style.visibility = 'visible';
|
||||||
footer.style.transition = 'opacity 0.3s ease, visibility 0.3s ease';
|
footer.style.pointerEvents = 'auto';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Aussi pour le champ entité si vous le souhaitez
|
// Optionnel : même comportement pour les autres champs
|
||||||
|
const loginField = document.getElementById('login');
|
||||||
const codeSocieteField = document.getElementById('codeSociete');
|
const codeSocieteField = document.getElementById('codeSociete');
|
||||||
|
|
||||||
|
if (loginField) {
|
||||||
|
loginField.addEventListener('focus', function() {
|
||||||
|
footer.style.opacity = '0';
|
||||||
|
footer.style.visibility = 'hidden';
|
||||||
|
footer.style.pointerEvents = 'none';
|
||||||
|
});
|
||||||
|
|
||||||
|
loginField.addEventListener('blur', function() {
|
||||||
|
footer.style.opacity = '1';
|
||||||
|
footer.style.visibility = 'visible';
|
||||||
|
footer.style.pointerEvents = 'auto';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (codeSocieteField) {
|
if (codeSocieteField) {
|
||||||
codeSocieteField.addEventListener('focus', function() {
|
codeSocieteField.addEventListener('focus', function() {
|
||||||
footer.style.opacity = '0';
|
footer.style.opacity = '0';
|
||||||
footer.style.visibility = 'hidden';
|
footer.style.visibility = 'hidden';
|
||||||
|
footer.style.pointerEvents = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
codeSocieteField.addEventListener('blur', function() {
|
codeSocieteField.addEventListener('blur', function() {
|
||||||
footer.style.opacity = '1';
|
footer.style.opacity = '1';
|
||||||
footer.style.visibility = 'visible';
|
footer.style.visibility = 'visible';
|
||||||
|
footer.style.pointerEvents = 'auto';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
console.log('Éléments non trouvés, nouvelle tentative dans 500ms...');
|
||||||
|
setTimeout(setupFooterBehavior, 500);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attendre que tout soit chargé
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
setTimeout(setupFooterBehavior, 100);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
setTimeout(setupFooterBehavior, 100);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user