1.1 --- a/imip_manager.py Wed Jan 28 17:22:40 2015 +0100
1.2 +++ b/imip_manager.py Wed Jan 28 18:45:19 2015 +0100
1.3 @@ -264,7 +264,7 @@
1.4 # Presentation methods.
1.5
1.6 def new_page(self, title):
1.7 - self.page.init(title=title, charset=self.encoding)
1.8 + self.page.init(title=title, charset=self.encoding, css="styles.css")
1.9
1.10 def status(self, code, message):
1.11 self.header("Status", "%s %s" % (code, message))
1.12 @@ -650,24 +650,24 @@
1.13 partitioned_group_types.append(group_type)
1.14 partitioned_group_sources.append(group_source)
1.15
1.16 - page.table(border=1, cellspacing=0, cellpadding=5)
1.17 - self.show_calendar_participant_headings(partitioned_group_sources, group_columns)
1.18 + page.table(cellspacing=5, cellpadding=5, id="calendar")
1.19 + self.show_calendar_participant_headings(partitioned_group_types, partitioned_group_sources, group_columns)
1.20 self.show_calendar_days(days, partitioned_groups, partitioned_group_types, group_columns)
1.21 page.table.close()
1.22
1.23 - def show_calendar_participant_headings(self, group_sources, group_columns):
1.24 + def show_calendar_participant_headings(self, group_types, group_sources, group_columns):
1.25
1.26 """
1.27 Show headings for the participants and other scheduling contributors,
1.28 - defined by 'group_sources' and 'group_columns'.
1.29 + defined by 'group_types', 'group_sources' and 'group_columns'.
1.30 """
1.31
1.32 page = self.page
1.33
1.34 - page.colgroup(span=1) # for datetime information
1.35 + page.colgroup(span=1, id="columns-timeslot")
1.36
1.37 - for columns in group_columns:
1.38 - page.colgroup(span=columns)
1.39 + for group_type, columns in zip(group_types, group_columns):
1.40 + page.colgroup(span=columns, id="columns-%s" % group_type)
1.41
1.42 page.thead()
1.43 page.tr()
1.44 @@ -743,8 +743,7 @@
1.45 active = slots and slots.get(point)
1.46
1.47 if not active:
1.48 - page.td(class_="empty", colspan=columns)
1.49 - page.td.close()
1.50 + page.td("", class_="empty", colspan=columns)
1.51 continue
1.52
1.53 slots = slots.items()
1.54 @@ -790,16 +789,14 @@
1.55
1.56 page.td.close()
1.57 else:
1.58 - page.td(class_="empty")
1.59 - page.td.close()
1.60 + page.td("", class_="empty")
1.61
1.62 # Pad with empty columns.
1.63
1.64 i = columns - len(active)
1.65 while i > 0:
1.66 i -= 1
1.67 - page.td(class_="empty")
1.68 - page.td.close()
1.69 + page.td("", class_="empty")
1.70
1.71 page.tr.close()
1.72