improve calendar portlet: background color for days with events
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3769 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c27eb6deee
commit
6436728892
2 changed files with 7 additions and 3 deletions
|
@ -477,8 +477,9 @@ div.comment {
|
|||
font-weight: normal;
|
||||
}
|
||||
|
||||
.calendar a.has_events {
|
||||
.calendar .has_events {
|
||||
font-weight: bold;
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
/* dojo stuff */
|
||||
|
|
|
@ -196,10 +196,13 @@ class CalendarInfo(NodeView):
|
|||
return '?'.join((baseUrl, urlencode(params)))
|
||||
|
||||
def getCssClass(self, day, tag='td'):
|
||||
classes = []
|
||||
if tag == 'td':
|
||||
if self.isToday(day):
|
||||
return 'today'
|
||||
return ''
|
||||
classes.append('today')
|
||||
if self.events[day-1]:
|
||||
classes.append('has_events')
|
||||
return ' '.join(classes)
|
||||
|
||||
def getEventTitles(self, day):
|
||||
events = self.events[day-1]
|
||||
|
|
Loading…
Add table
Reference in a new issue