From 9c27b43d3bbd17ece53edde92b4ea85334f66d1c Mon Sep 17 00:00:00 2001 From: Yannick Francois Date: Thu, 21 Mar 2019 14:26:56 +0100 Subject: [PATCH] ajoute un bouton pour ajouter des horaires --- public/dates.html | 1 + public/script.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/dates.html b/public/dates.html index 16d542f3..38c12433 100644 --- a/public/dates.html +++ b/public/dates.html @@ -66,6 +66,7 @@ + diff --git a/public/script.js b/public/script.js index ad90a9f5..f9647b9f 100644 --- a/public/script.js +++ b/public/script.js @@ -121,10 +121,14 @@ if($('#ajouterDesHoraires')) { ajouterDesHoraires.addEventListener('change', () => { if (ajouterDesHoraires.value == 'avec des') { identiquesDifferentsPourChaqueJour.style.display = 'inline' - $('.horaire-identique').style.display = 'inline' + $$('.horaire-identique').forEach((e) => { + e.style.display = 'inline' + }); } else { identiquesDifferentsPourChaqueJour.style.display = 'none' - $('.horaire-identique').style.display = 'none' + $$('.horaire-identique').forEach((e) => { + e.style.display = 'none' + }); } }); }