1.1 --- a/imip_manager.py Mon Mar 09 21:33:38 2015 +0100
1.2 +++ b/imip_manager.py Mon Mar 09 21:44:34 2015 +0100
1.3 @@ -336,6 +336,7 @@
1.4
1.5 self.out = self.env.get_output()
1.6 self.page = markup.page()
1.7 + self.html_ids = None
1.8
1.9 self.store = imip_store.FileStore()
1.10 self.objects = {}
1.11 @@ -461,6 +462,7 @@
1.12
1.13 def new_page(self, title):
1.14 self.page.init(title=title, charset=self.encoding, css=self.env.new_url("styles.css"))
1.15 + self.html_ids = set()
1.16
1.17 def status(self, code, message):
1.18 self.header("Status", "%s %s" % (code, message))
1.19 @@ -1488,6 +1490,9 @@
1.20 partitioned = {}
1.21
1.22 for day, day_slots in partition_by_day(slots).items():
1.23 +
1.24 + # Construct a list of time intervals within the day.
1.25 +
1.26 intervals = []
1.27 last = None
1.28
1.29 @@ -1512,6 +1517,8 @@
1.30
1.31 days[day].update(intervals)
1.32
1.33 + # Only include the requests column if it provides objects.
1.34 +
1.35 if group_type != "request" or columns:
1.36 group_columns.append(columns)
1.37 partitioned_groups.append(partitioned)
1.38 @@ -1738,8 +1745,11 @@
1.39 # NOTE: Need to only anchor the first period for a
1.40 # NOTE: recurring event.
1.41
1.42 - if point == start:
1.43 - page.td(class_=css, rowspan=span, id="%s-%s-%s" % (group_type, uid, recurrenceid or ""))
1.44 + html_id = "%s-%s-%s" % (group_type, uid, recurrenceid or "")
1.45 +
1.46 + if point == start and html_id not in self.html_ids:
1.47 + page.td(class_=css, rowspan=span, id=html_id)
1.48 + self.html_ids.add(html_id)
1.49 else:
1.50 page.td(class_=css, rowspan=span)
1.51