# HG changeset patch # User Paul Boddie # Date 1423326185 -3600 # Node ID 5c2589a788267e1de7b1e497043db9babadc4f7e # Parent 55f9f804c6290dc67b02c1b0836a1e2003e63402 Hide empty days by default. diff -r 55f9f804c629 -r 5c2589a78826 htdocs/styles.css --- a/htdocs/styles.css Sat Feb 07 17:20:29 2015 +0100 +++ b/htdocs/styles.css Sat Feb 07 17:23:05 2015 +0100 @@ -113,23 +113,23 @@ /* Hide the controls. */ input#hidebusy, -input#hidedays, +input#showdays, /* Hide the enable labels when controls are already enabled. */ input#hidebusy:checked ~ .controls label.enable[for=hidebusy], -input#hidedays:checked ~ .controls label.enable[for=hidedays], +input#showdays:checked ~ .controls label.enable[for=showdays], /* Hide the disable labels when controls are already disabled. */ input#hidebusy:not(:checked) ~ .controls label.disable[for=hidebusy], -input#hidedays:not(:checked) ~ .controls label.disable[for=hidedays], +input#showdays:not(:checked) ~ .controls label.disable[for=showdays], /* Hide calendar rows depending on the selected controls. */ input#hidebusy:checked ~ .calendar tr.slot.busy, -input#hidedays:checked ~ .calendar tr.separator.empty, -input#hidedays:checked ~ .calendar tr.slot.onlyslot.daystart.empty { +input#showdays:not(:checked) ~ .calendar tr.separator.empty, +input#showdays:not(:checked) ~ .calendar tr.slot.onlyslot.daystart.empty { display: none; } @@ -146,7 +146,7 @@ padding-left: 0.25em; } -label.hidedays { +label.showdays { border-left: 1em solid #faa; /* th.participantheading background-color */ } diff -r 55f9f804c629 -r 5c2589a78826 imip_manager.py --- a/imip_manager.py Sat Feb 07 17:20:29 2015 +0100 +++ b/imip_manager.py Sat Feb 07 17:23:05 2015 +0100 @@ -853,14 +853,14 @@ # Show controls for hiding empty days and busy slots. # The positioning of the control, paragraph and table are important here. - page.input(name="hidedays", type="checkbox", value="hide", id="hidedays") + page.input(name="showdays", type="checkbox", value="hide", id="showdays") page.input(name="hidebusy", type="checkbox", value="hide", id="hidebusy") page.p(class_="controls") page.label("Hide busy time periods", for_="hidebusy", class_="hidebusy enable") page.label("Show busy time periods", for_="hidebusy", class_="hidebusy disable") - page.label("Hide empty days", for_="hidedays", class_="hidedays enable") - page.label("Show empty days", for_="hidedays", class_="hidedays disable") + page.label("Show empty days", for_="showdays", class_="showdays enable") + page.label("Hide empty days", for_="showdays", class_="showdays disable") page.p.close() freebusy = self.store.get_freebusy(self.user)