From d8ba2070301723dc76c1700a53ef6b59873004c5 Mon Sep 17 00:00:00 2001 From: arussac Date: Sun, 27 Apr 2025 11:10:48 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20styles=20pour=20le=20conteneur=20d?= =?UTF-8?q?e=20boutons=20et=20d'un=20message=20d'explication=20dans=20la?= =?UTF-8?q?=20page=20de=20d=C3=A9tails=20du=20projet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/pages/style_projet.css | 13 +++++++++++++ js/pages/projet_detail.js | 12 ++++++++++-- pages/projet_detail.html | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/css/pages/style_projet.css b/css/pages/style_projet.css index 8c45e48..60c5ac5 100644 --- a/css/pages/style_projet.css +++ b/css/pages/style_projet.css @@ -163,4 +163,17 @@ .highlight{ background-color: red; +} + +.middle-place{ + position: absolute; + top: 45%; + left: 40%; +} +.explaination-text{ + font-size: 1.5em; + color: #ffffff; + text-align: center; + margin-top: 20px; + margin-bottom: 20px; } \ No newline at end of file diff --git a/js/pages/projet_detail.js b/js/pages/projet_detail.js index 6d68b15..88e0c9e 100644 --- a/js/pages/projet_detail.js +++ b/js/pages/projet_detail.js @@ -260,14 +260,14 @@ document.addEventListener("DOMContentLoaded", async () => { firstInput.max = lastValue; lastInput.min = firstValue; } - if (DataMetrics != 404) { - const project = data.find((project) => project.id == projectId); + const project = data.find((project) => project.id == projectId); if (project) { for (obj of document.getElementsByClassName("name_project")) obj.innerHTML = project.name; } else { console.error("Project not found"); } + if (DataMetrics != 404) { choiceSelect.addEventListener("change", toggleContainers); @@ -284,6 +284,14 @@ document.addEventListener("DOMContentLoaded", async () => { for (el of document.querySelectorAll(".box")) { el.style.display = "none"; } + document.getElementById("buttons-container").classList.add("middle-place"); + document.getElementById("toggle-view").style.display = "none"; + // add an explaination to the user + const explaination = document.createElement("p"); + explaination.innerHTML = + "Ce projet est encore vierge, il n'y a pas de données à afficher.
Veuillez configurer la caméra pour commencer à prendre des images."; + explaination.classList.add("explaination-text"); + document.getElementById("title-global").appendChild(explaination); } }); diff --git a/pages/projet_detail.html b/pages/projet_detail.html index 6048967..d062ebc 100644 --- a/pages/projet_detail.html +++ b/pages/projet_detail.html @@ -111,7 +111,7 @@
-
+