1.1 --- a/imip_manager.py Thu Feb 05 23:18:54 2015 +0100
1.2 +++ b/imip_manager.py Sat Feb 07 00:47:14 2015 +0100
1.3 @@ -1141,10 +1141,21 @@
1.4 slots.sort()
1.5 spans = get_spans(slots)
1.6
1.7 + empty = 0
1.8 +
1.9 # Show a column for each active period.
1.10
1.11 for t in active:
1.12 if t and len(t) >= 2:
1.13 +
1.14 + # Flush empty slots preceding this one.
1.15 +
1.16 + if empty:
1.17 + page.td(class_="empty container", colspan=empty)
1.18 + self._empty_slot(point, endpoint)
1.19 + page.td.close()
1.20 + empty = 0
1.21 +
1.22 start, end, uid, key = get_freebusy_details(t)
1.23 span = spans[key]
1.24
1.25 @@ -1189,16 +1200,14 @@
1.26
1.27 page.td.close()
1.28 else:
1.29 - page.td(class_="empty container")
1.30 - self._empty_slot(point, endpoint)
1.31 - page.td.close()
1.32 + empty += 1
1.33
1.34 # Pad with empty columns.
1.35
1.36 - i = columns - len(active)
1.37 - while i > 0:
1.38 - i -= 1
1.39 - page.td(class_="empty container")
1.40 + empty = columns - len(active)
1.41 +
1.42 + if empty:
1.43 + page.td(class_="empty container", colspan=empty)
1.44 self._empty_slot(point, endpoint)
1.45 page.td.close()
1.46