From 2a3e63f1a1d65b4ba788ddb620a6b229884509dc Mon Sep 17 00:00:00 2001 From: "pascal.bouron" <pascal.bouron@noreply@scodoc.org> Date: Wed, 5 Feb 2025 16:07:12 +0100 Subject: [PATCH] Actualiser app/static/js/jury_but.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout de l'écoute des évènements KeyDown sur ArrowRight et ArrowLeft pour gérer le passage à l'étudiant suivant/précédent sur page Jury --- app/static/js/jury_but.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/static/js/jury_but.js b/app/static/js/jury_but.js index 945e93333..11be4de7a 100644 --- a/app/static/js/jury_but.js +++ b/app/static/js/jury_but.js @@ -85,6 +85,19 @@ $(function () { document.querySelector("div.prev").innerHTML = ""; document.querySelector("div.next").innerHTML = ""; } + $(document).keydown(function(event) { + if (event.key === "ArrowRight") { + let nextLink = $(".next a").attr("href"); + if (nextLink) { + window.location.href = nextLink; + } + } else if (event.key === "ArrowLeft") { + let prevLink = $(".prev a").attr("href"); + if (prevLink) { + window.location.href = prevLink; + } + } + }); }); // ----- Etat du formulaire jury pour éviter sortie sans enregistrer -- GitLab