/* ============ JS Load - end ============ Creé par : Sigfrido Gonzalez Puga Projet: EMICA | ANNEXE | 462166 | Connâitre Raspberry Pi Date : Juin 2022 */ /* ============ Loader-page ============ */ $(window).on('load', function () { setTimeout(function () { $(".loader-page").css({ visibility: "hidden", opacity: "0" }) }, 50); }); /* ============ Loader-page ============ */ /* ============ SweetAlert2 ============ */ document.querySelector(".sweetalert2_login").addEventListener('click', function () { Swal.fire({ title: 'Formulaire de connexion', html: `Démonstration, aucune fonctionnalité `, confirmButtonText: 'Valider', focusConfirm: false, preConfirm: () => { const login = Swal.getPopup().querySelector('#login').value const password = Swal.getPopup().querySelector('#password').value if (!login || !password) { Swal.showValidationMessage(`Veuillez entrer le login et le mot de passe`) } return { login: login, password: password } } }).then((result) => { Swal.fire(` Login: ${result.value.login} Password: ${result.value.password} `.trim()) }) }); /* document.querySelector(".sweetalert2_video_player").addEventListener('click', function () { swal.fire( '
', 'success' ); }); document.querySelector(".second").addEventListener('click', function () { Swal.fire("Our second Alert", "With some body text!"); }); document.querySelector(".third").addEventListener('click', function () { Swal.fire("Our third Alert", "With some body text and success icon!", "success"); }); */ /* ============ SweetAlert2 ============ */