# HG changeset patch # User Paul Boddie # Date 1445544471 -7200 # Node ID dc1e066864f9d4290224400c32bdbe410e5db2b4 # Parent 7bb8895edf70790e9f86ea84d69cca9572c7e952 Adjusted empty cell widths in the calendar view so that padding cells may occupy the remaining space on a row, whereas other empty cells may occupy the same space as event cells. diff -r 7bb8895edf70 -r dc1e066864f9 htdocs/styles.css --- a/htdocs/styles.css Thu Oct 22 18:59:57 2015 +0200 +++ b/htdocs/styles.css Thu Oct 22 22:07:51 2015 +0200 @@ -79,10 +79,14 @@ td.event { background-color: #ff8; border: 2px solid #000; +} + +td.empty:not(.padding), +td.event { width: 10em; } -td.empty { +td.empty.padding { min-width: 10em; } diff -r 7bb8895edf70 -r dc1e066864f9 imipweb/calendar.py --- a/imipweb/calendar.py Thu Oct 22 18:59:57 2015 +0200 +++ b/imipweb/calendar.py Thu Oct 22 22:07:51 2015 +0200 @@ -917,7 +917,7 @@ empty = columns - len(active) if empty: - self._empty_slot(point, endpoint, empty) + self._empty_slot(point, endpoint, empty, True) page.tr.close() @@ -965,7 +965,7 @@ else: page.input(name="slot", type="checkbox", value=value, id=identifier, class_="newevent selector") - def _empty_slot(self, point, endpoint, colspan): + def _empty_slot(self, point, endpoint, colspan, at_end=False): """ Show an empty slot cell for the given 'point' and 'endpoint', with the @@ -973,7 +973,7 @@ """ page = self.page - page.td(class_="empty%s" % (point.indicator == Point.PRINCIPAL and " container" or ""), colspan=colspan) + page.td(class_="empty%s%s" % (point.indicator == Point.PRINCIPAL and " container" or "", at_end and " padding" or ""), colspan=colspan) if point.indicator == Point.PRINCIPAL: value, identifier = self._slot_value_and_identifier(point, endpoint) page.label("Select/deselect period", class_="newevent popup", for_=identifier)