1.1 --- a/imipweb/calendar.py Sun Sep 27 01:26:05 2015 +0200
1.2 +++ b/imipweb/calendar.py Sun Sep 27 17:53:46 2015 +0200
1.3 @@ -409,10 +409,7 @@
1.4
1.5 # Show the calendar itself.
1.6
1.7 - page.table(cellspacing=5, cellpadding=5, class_="calendar")
1.8 - self.show_calendar_participant_headings(partitioned_group_types, partitioned_group_sources, group_columns)
1.9 - self.show_calendar_days(days, partitioned_groups, partitioned_group_types, group_columns)
1.10 - page.table.close()
1.11 + self.show_calendar_days(days, partitioned_groups, partitioned_group_types, partitioned_group_sources, group_columns)
1.12
1.13 # End the form region.
1.14
1.15 @@ -443,8 +440,8 @@
1.16 for day in days:
1.17 daystr, dayid = self._day_value_and_identifier(day)
1.18 l.append("""\
1.19 -input.newevent.selector#%s:checked ~ table thead#region-%s label.day,
1.20 -input.newevent.selector#%s:checked ~ table tbody#region-%s label.timepoint""" % (dayid, dayid, dayid, dayid))
1.21 +input.newevent.selector#%s:checked ~ table#region-%s label.day,
1.22 +input.newevent.selector#%s:checked ~ table#region-%s label.timepoint""" % (dayid, dayid, dayid, dayid))
1.23
1.24 page.add(",\n".join(l))
1.25 page.add(""" {
1.26 @@ -477,10 +474,11 @@
1.27 l = []
1.28
1.29 for day, intervals in days.items():
1.30 + daystr, dayid = self._day_value_and_identifier(day)
1.31 for point, endpoint in intervals:
1.32 timestr, timeid = self._slot_value_and_identifier(point, endpoint)
1.33 l.append("""\
1.34 -input.newevent.selector#%s:checked ~ table th#region-%s label.timepoint""" % (timeid, timeid))
1.35 +input.newevent.selector#%s:checked ~ table#region-%s th#region-%s""" % (timeid, dayid, timeid))
1.36
1.37 page.add(",\n".join(l))
1.38 page.add(""" {
1.39 @@ -517,13 +515,15 @@
1.40 page.tr.close()
1.41 page.thead.close()
1.42
1.43 - def show_calendar_days(self, days, partitioned_groups, partitioned_group_types, group_columns):
1.44 + def show_calendar_days(self, days, partitioned_groups, partitioned_group_types,
1.45 + partitioned_group_sources, group_columns):
1.46
1.47 """
1.48 Show calendar days, defined by a collection of 'days', the contributing
1.49 period information as 'partitioned_groups' (partitioned by day), the
1.50 'partitioned_group_types' indicating the kind of contribution involved,
1.51 - and the 'group_columns' defining the number of columns in each group.
1.52 + the 'partitioned_group_sources' indicating the origin of each group, and
1.53 + the 'group_columns' defining the number of columns in each group.
1.54 """
1.55
1.56 page = self.page
1.57 @@ -556,18 +556,20 @@
1.58
1.59 daystr, dayid = self._day_value_and_identifier(day)
1.60
1.61 - page.thead(class_="separator%s" % (is_empty and " empty" or ""), id="region-%s" % dayid)
1.62 - page.tr()
1.63 - page.th(class_="dayheading container", colspan=all_columns+1)
1.64 + page.table(cellspacing=5, cellpadding=5, class_="calendar %s" % (is_empty and " empty" or ""), id="region-%s" % dayid)
1.65 +
1.66 + page.caption(class_="dayheading container separator")
1.67 self._day_heading(day)
1.68 - page.th.close()
1.69 - page.tr.close()
1.70 - page.thead.close()
1.71 + page.caption.close()
1.72
1.73 - page.tbody(class_="points%s" % (is_empty and " empty" or ""), id="region-%s" % dayid)
1.74 + self.show_calendar_participant_headings(partitioned_group_types, partitioned_group_sources, group_columns)
1.75 +
1.76 + page.tbody(class_="points")
1.77 self.show_calendar_points(intervals, groups_for_day, partitioned_group_types, group_columns)
1.78 page.tbody.close()
1.79
1.80 + page.table.close()
1.81 +
1.82 def show_calendar_points(self, intervals, groups, group_types, group_columns):
1.83
1.84 """