forked from ScoDoc/ScoDoc
Actualiser app/static/js/jury_but.js
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
This commit is contained in:
parent
7a59820558
commit
2a3e63f1a1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user