From 817e360fbae1cf5720f257b331c2b98b6563a4ba Mon Sep 17 00:00:00 2001
From: Jean-Marie Favreau
Date: Sun, 17 Dec 2023 17:03:48 +0100
Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20des=20modaux=20Fix=20#47?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/agenda_culturel/static/js/filters.js | 1 -
src/agenda_culturel/static/js/modal.js | 5 +++++
src/agenda_culturel/static/style.scss | 5 +++++
.../agenda_culturel/single-event/event-modal-inc.html | 2 +-
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/agenda_culturel/static/js/filters.js b/src/agenda_culturel/static/js/filters.js
index fa8ddda..f9b968a 100644
--- a/src/agenda_culturel/static/js/filters.js
+++ b/src/agenda_culturel/static/js/filters.js
@@ -27,7 +27,6 @@ const selectAllFilterElementsFromCheckbox = (checkbox) => {
};
const setFilterClasses = (container) => {
- console.log("set filter");
if (!underToggle) {
underToggle = true;
selectionButtom = document.getElementById(container.getAttribute("data-button"));
diff --git a/src/agenda_culturel/static/js/modal.js b/src/agenda_culturel/static/js/modal.js
index ac82ac9..2837481 100644
--- a/src/agenda_culturel/static/js/modal.js
+++ b/src/agenda_culturel/static/js/modal.js
@@ -20,6 +20,10 @@ const openModal = (modal) => {
document.documentElement.style.setProperty("--scrollbar-width", `${getScrollbarWidth()}px`);
}
modal.setAttribute("open", true);
+ console.log("visible, " + modal);
+ setTimeout(function() {
+ visibleModal = modal;
+ }, 500);
};
// Close modal
@@ -32,6 +36,7 @@ const closeModal = (modal) => {
// Close with a click outside
document.addEventListener("click", (event) => {
if (visibleModal != null) {
+ console.log("bordel");
const modalContent = visibleModal.querySelector("article");
const isClickInside = modalContent.contains(event.target);
!isClickInside && closeModal(visibleModal);
diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss
index 18cb31a..66820b3 100644
--- a/src/agenda_culturel/static/style.scss
+++ b/src/agenda_culturel/static/style.scss
@@ -625,4 +625,9 @@ aside nav a.badge {
float: right;
z-index: 1;
margin-top: -2em;
+}
+
+.body-fixed {
+ max-height: 50vh;
+ overflow-y: scroll;
}
\ No newline at end of file
diff --git a/src/agenda_culturel/templates/agenda_culturel/single-event/event-modal-inc.html b/src/agenda_culturel/templates/agenda_culturel/single-event/event-modal-inc.html
index 632c696..a8e3b86 100644
--- a/src/agenda_culturel/templates/agenda_culturel/single-event/event-modal-inc.html
+++ b/src/agenda_culturel/templates/agenda_culturel/single-event/event-modal-inc.html
@@ -24,7 +24,7 @@
- {{ event.description |truncatewords:20 |linebreaks }}
+ {{ event.description |linebreaks }}