Calendar item styles for public or private

merge-requests/21/head
Bob Mottram 2021-03-07 17:08:43 +00:00
parent 9c63658aa7
commit 71dff77f20
2 changed files with 20 additions and 5 deletions

View File

@ -138,6 +138,14 @@ a:focus {
font-size: 30px;
}
.calItem {
background-color: var(--event-background-private);
}
.calItemPublic {
background-color: var(--event-background);
}
.calendar__day__event {
color: var(--event-color);
background-color: var(--event-background-private);

View File

@ -193,34 +193,41 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {},
'icons/delete.png" /></a></td>\n'
eventClass = 'calendar__day__event'
calItemClass = 'calItem'
if eventIsPublic:
eventClass = 'calendar__day__event__public'
calItemClass = 'calItemPublic'
if eventTime and eventDescription and eventPlace:
calendarStr += \
'<tr><td class="calendar__day__time"><b>' + eventTime + \
'<tr class="' + calItemClass + '">' + \
'<td class="calendar__day__time"><b>' + eventTime + \
'</b></td><td class="' + eventClass + '">' + \
'<span class="place">' + \
eventPlace + '</span><br>' + eventDescription + \
'</td>' + deleteButtonStr + '</tr>\n'
elif eventTime and eventDescription and not eventPlace:
calendarStr += \
'<tr><td class="calendar__day__time"><b>' + eventTime + \
'<tr class="' + calItemClass + '">' + \
'<td class="calendar__day__time"><b>' + eventTime + \
'</b></td><td class="' + eventClass + '">' + \
eventDescription + '</td>' + deleteButtonStr + '</tr>\n'
elif not eventTime and eventDescription and not eventPlace:
calendarStr += \
'<tr><td class="calendar__day__time">' + \
'<tr class="' + calItemClass + '">' + \
'<td class="calendar__day__time">' + \
'</td><td class="' + eventClass + '">' + \
eventDescription + '</td>' + deleteButtonStr + '</tr>\n'
elif not eventTime and eventDescription and eventPlace:
calendarStr += \
'<tr><td class="calendar__day__time"></td>' + \
'<tr class="' + calItemClass + '">' + \
'<td class="calendar__day__time"></td>' + \
'<td class="' + eventClass + '"><span class="place">' + \
eventPlace + '</span><br>' + eventDescription + \
'</td>' + deleteButtonStr + '</tr>\n'
elif eventTime and not eventDescription and eventPlace:
calendarStr += \
'<tr><td class="calendar__day__time"><b>' + eventTime + \
'<tr class="' + calItemClass + '">' + \
'<td class="calendar__day__time"><b>' + eventTime + \
'</b></td><td class="' + eventClass + '">' + \
'<span class="place">' + \
eventPlace + '</span></td>' + \