Browse Source

[fix] modal: do not open without a description + fix ul & links

master
r0 2 years ago
parent
commit
0ba92640eb
  1. 12
      assets/js/programme.js
  2. 8
      programme.css

12
assets/js/programme.js

@ -65,8 +65,10 @@ function fillTimetables(data) {
eventDiv.appendChild(document.createElement('br'));
// add click listener for each day
(function() {
eventDiv.addEventListener('click', function(ev) {
eventDiv.addEventListener('click', function(ev) {
//disable modal for these descriptions
let disabledDescs = ['', '<p>(En attente de confirmation)</p>'];
if (disabledDescs.indexOf(event['description']) === -1) {
let modal = document.querySelector('div#modal');
modal.querySelector('h1').innerHTML = event['title'];
modal.querySelector('span').innerHTML = eventInterval;
@ -78,8 +80,10 @@ function fillTimetables(data) {
document.querySelector('div#overlay').classList.remove('hidden');
modal.classList.add('upfront');
modal.scrollTo(0, 0);
});
})();
} else {
hideModal();
}
});
timetable.appendChild(eventDiv);
}

8
programme.css

@ -190,6 +190,14 @@ div#modal div.description {
text-align: center;
}
div#modal div.description ul {
padding-left: 0;
}
div#modal div.description a {
color: #222222;
}
div#modal button {
display: block;
background-color: #eeeeee;

Loading…
Cancel
Save