diff --git a/templates/assets/js/index.js b/templates/assets/js/index.js index aefd6e8..4f46bf7 100644 --- a/templates/assets/js/index.js +++ b/templates/assets/js/index.js @@ -88,18 +88,4 @@ document.addEventListener("htmx:afterOnLoad", function (event) { // static/js/spinner.js // Écoute tous les événements HTMX et affiche/masque le spinner global -document.body.addEventListener('htmx:send', () => { - const s = document.getElementById('loading-spinner'); - if (s) s.style.display = 'block'; -}); -document.body.addEventListener('htmx:afterOnLoad', () => { - const s = document.getElementById('loading-spinner'); - if (s) s.style.display = 'none'; -}); -// En cas d’erreur réseau -document.body.addEventListener('htmx:afterRequest', (evt) => { - if (evt.detail.xhr.status >= 400) { - const s = document.getElementById('loading-spinner'); - if (s) s.style.display = 'none'; - } -}); + diff --git a/templates/dashboard.pages.tmpl b/templates/dashboard.pages.tmpl index ee587b1..d86b275 100644 --- a/templates/dashboard.pages.tmpl +++ b/templates/dashboard.pages.tmpl @@ -70,5 +70,25 @@ + \ No newline at end of file