diff --git a/app/static/css/releve-but.css b/app/static/css/releve-but.css index 2f9766ded..60d4f01c1 100644 --- a/app/static/css/releve-but.css +++ b/app/static/css/releve-but.css @@ -98,6 +98,10 @@ section>div:nth-child(1){ /************/ /* Etudiant */ /************/ +.info_etudiant{ + color: #000; + text-decoration: none; +} .etudiant{ display: flex; align-items: center; @@ -194,6 +198,9 @@ h3{ .info{ opacity: 0.9; } +.syntheseModule{ + cursor: pointer; +} .eval, .syntheseModule{ position: relative; display: flex; diff --git a/app/static/js/releve-but.js b/app/static/js/releve-but.js index 9b974fe6f..126cb219e 100644 --- a/app/static/js/releve-but.js +++ b/app/static/js/releve-but.js @@ -27,6 +27,10 @@ class releveBUT extends HTMLElement { moduleOnOff(){ this.parentElement.classList.toggle("moduleOnOff"); } + goTo(){ + let module = this.dataset.module; + this.parentElement.parentElement.parentElement.parentElement.querySelector("#Module_" + module).scrollIntoView(); + } set setConfig(config){ this.config.showURL = config.showURL ?? this.config.showURL; @@ -46,6 +50,9 @@ class releveBUT extends HTMLElement { this.shadow.querySelectorAll(".ue, .module").forEach(e => { e.addEventListener("click", this.moduleOnOff) }) + this.shadow.querySelectorAll(".syntheseModule").forEach(e => { + e.addEventListener("click", this.goTo) + }) this.shadow.children[0].classList.add("ready"); } @@ -132,8 +139,15 @@ class releveBUT extends HTMLElement { showInformations(data) { this.shadow.querySelector(".studentPic").src = data.etudiant.photo_url || "default_Student.svg"; - let output = ` -