diff options
Diffstat (limited to 'public/js/calendar.js')
-rw-r--r-- | public/js/calendar.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/public/js/calendar.js b/public/js/calendar.js index fb26e80..af9ffb4 100644 --- a/public/js/calendar.js +++ b/public/js/calendar.js | |||
@@ -52,15 +52,21 @@ document.addEventListener('DOMContentLoaded', function(){ | |||
52 | return date; | 52 | return date; |
53 | } | 53 | } |
54 | 54 | ||
55 | const formated_start = formatDate(info.event.start); | 55 | const start = formatDate(info.event.start); |
56 | const formated_end = formatDate(info.event.allDay ? getEndMinusOneDay(info.event.end) : info.event.end, info.event.allDay); | 56 | const start_date = start.split('T')[0]; |
57 | 57 | const start_hour = (info.event.allDay ? '' : '<br>à ' + start.split('T')[1]).replace(":", "h"); | |
58 | const formated_start = 'le ' + start_date.split('-')[2] + '/' + start_date.split('-')[1] + '/' + start_date.split('-')[0] + start_hour; | ||
59 | const end = formatDate(info.event.allDay ? getEndMinusOneDay(info.event.end) : info.event.end, info.event.allDay); | ||
60 | const end_date = end.split('T')[0]; | ||
61 | const end_hour = (info.event.allDay ? '' : '<br>à ' + end.split('T')[1]).replace(":", "h"); | ||
62 | const formated_end = 'le ' + end_date.split('-')[2] + '/' + end_date.split('-')[1] + '/' + end_date.split('-')[0] + end_hour; | ||
63 | |||
58 | const aside_content = `<div class="event" style="border-color: ` + info.event.backgroundColor +`;"> | 64 | const aside_content = `<div class="event" style="border-color: ` + info.event.backgroundColor +`;"> |
59 | <h3>` + info.event.title + `</h3> | 65 | <h3>` + info.event.title + `</h3> |
60 | <p><i>` + info.event.extendedProps.description + `</i></p> | 66 | <p><i>` + info.event.extendedProps.description + `</i></p> |
61 | <p>Journée entière: ` + (checked ? 'oui' : 'non') + `</p> | 67 | <p>Journée entière: <br>` + (checked ? 'oui' : 'non') + `</p> |
62 | <p>Début: ` + formated_start + `</p> | 68 | <p>Début: <br>` + formated_start + `</p> |
63 | <p>Fin: ` + formated_end + `</p> | 69 | <p>Fin: <br> ` + formated_end + `</p> |
64 | </div>`; | 70 | </div>`; |
65 | 71 | ||
66 | aside.innerHTML = aside_content; | 72 | aside.innerHTML = aside_content; |