diff --git a/app/static/css/assiduites.css b/app/static/css/assiduites.css index 701cdc9be..c22e38e8a 100644 --- a/app/static/css/assiduites.css +++ b/app/static/css/assiduites.css @@ -278,7 +278,7 @@ padding: 20px; border: 1px solid #888; width: 80%; - height: 30%; + height: 40%; position: relative; border-radius: 10px; diff --git a/app/static/js/assiduites.js b/app/static/js/assiduites.js index d3264bc15..015c52573 100644 --- a/app/static/js/assiduites.js +++ b/app/static/js/assiduites.js @@ -1570,26 +1570,28 @@ function resetSelection() { */ window.onload = () => { modal = document.getElementById("myModal"); - closeBtn = document.querySelector(".close"); - timeline = document.getElementById("timeline"); - deleteBtn = document.getElementById("delete"); - splitBtn = document.getElementById("split"); - editBtn = document.getElementById("edit"); - selectedAssiduite = null; + if (modal) { + closeBtn = document.querySelector(".close"); + timeline = document.getElementById("timeline"); + deleteBtn = document.getElementById("delete"); + splitBtn = document.getElementById("split"); + editBtn = document.getElementById("edit"); + selectedAssiduite = null; - closeBtn?.addEventListener("click", closeModal); + closeBtn?.addEventListener("click", closeModal); - deleteBtn?.addEventListener("click", deleteAssiduiteModal); - splitBtn?.addEventListener("click", () => { - if (selectedAssiduite) { - splitAssiduiteModal(selectedAssiduite); - } - }); - editBtn?.addEventListener("click", () => { - if (selectedAssiduite) { - editAssiduiteModal(selectedAssiduite); - } - }); + deleteBtn?.addEventListener("click", deleteAssiduiteModal); + splitBtn?.addEventListener("click", () => { + if (selectedAssiduite) { + splitAssiduiteModal(selectedAssiduite); + } + }); + editBtn?.addEventListener("click", () => { + if (selectedAssiduite) { + editAssiduiteModal(selectedAssiduite); + } + }); + } }; // <<== Gestion de la récupération d'informations ==>> diff --git a/app/templates/assiduites/minitimeline.j2 b/app/templates/assiduites/minitimeline.j2 index ebde4d0c6..8de471d42 100644 --- a/app/templates/assiduites/minitimeline.j2 +++ b/app/templates/assiduites/minitimeline.j2 @@ -59,18 +59,18 @@ block.style.width = `${widthPercentage}%`; if (assiduité.etat != "CRENEAU") { - if (isSingleEtud()) { - block.addEventListener("click", () => { - let deb = startDate.hours() + startDate.minutes() / 60; - let fin = endDate.hours() + endDate.minutes() / 60; - deb = Math.max(mt_start, deb); - fin = Math.min(mt_end, fin); + block.addEventListener("click", () => { + let deb = startDate.hours() + startDate.minutes() / 60; + let fin = endDate.hours() + endDate.minutes() / 60; + deb = Math.max(mt_start, deb); + fin = Math.min(mt_end, fin); - setPeriodValues(deb, fin); + setPeriodValues(deb, fin); + if (isSingleEtud()) { updateSelectedSelect(getCurrentAssiduiteModuleImplId()); updateJustifyBtn(); - }); - } + } + }); //ajouter affichage assiduites on over setupAssiduiteBuble(block, assiduité); } @@ -272,7 +272,9 @@ position: absolute; text-align: start; top: -40px; - transform: translateX(-50%) + transform: translateX(-50%); + z-index: 50; + } .mini_tick::after { diff --git a/app/templates/assiduites/signal_assiduites_diff.j2 b/app/templates/assiduites/signal_assiduites_diff.j2 index e0061e0b3..cecfe1469 100644 --- a/app/templates/assiduites/signal_assiduites_diff.j2 +++ b/app/templates/assiduites/signal_assiduites_diff.j2 @@ -4,7 +4,7 @@