# HG changeset patch # User Paul Boddie # Date 1445120481 -7200 # Node ID c865d7fc0eed0a41b16f29c65ae76d46ba4a0452 # Parent a15f4aa9f1fc2da50ab333cc09f1209b896ad9a1 Attempted to make the calendar table layout more regular. diff -r a15f4aa9f1fc -r c865d7fc0eed htdocs/styles.css --- a/htdocs/styles.css Sat Oct 17 23:49:28 2015 +0200 +++ b/htdocs/styles.css Sun Oct 18 00:21:21 2015 +0200 @@ -1,5 +1,10 @@ /* Table styling. */ +table.calendar { + min-width: 100%; + table-layout: fixed; +} + table.conflicts, table.counters, table.recurrence, @@ -41,6 +46,7 @@ th.timeslot { padding-top: 0; vertical-align: top; + width: 10em; } th.timeslot span.endpoint { @@ -54,6 +60,10 @@ width: 10em; } +td.empty { + min-width: 10em; +} + td.event.only-organising { background-color: #afd; } diff -r a15f4aa9f1fc -r c865d7fc0eed imipweb/calendar.py --- a/imipweb/calendar.py Sat Oct 17 23:49:28 2015 +0200 +++ b/imipweb/calendar.py Sun Oct 18 00:21:21 2015 +0200 @@ -383,6 +383,8 @@ # Only include the requests column if it provides objects. if group_type != "request" or columns: + if group_type != "request": + columns += 1 group_columns.append(columns) partitioned_groups.append(partitioned) partitioned_group_types.append(group_type) @@ -691,7 +693,8 @@ # Where no periods exist for the given time interval, generate # an empty cell. Where a participant provides no periods at all, - # the colspan is adjusted to be 1, not 0. + # one column is provided; otherwise, one more column than the + # number required is provided. if not active: self._empty_slot(point, endpoint, max(columns, 1))