# HG changeset patch # User Paul Boddie # Date 1422899219 -3600 # Node ID 6d8045a9b66e4a88d60ae005929b40cd11dd1800 # Parent 557dc4696487090b9b618bd8f38fde8495f28767 Added controls for showing/hiding busy time slots. diff -r 557dc4696487 -r 6d8045a9b66e htdocs/styles.css --- a/htdocs/styles.css Mon Feb 02 18:38:18 2015 +0100 +++ b/htdocs/styles.css Mon Feb 02 18:46:59 2015 +0100 @@ -106,6 +106,24 @@ display: none; } +/* Hiding/showing busy slots/periods. */ + +input#hidebusy { + display: none; +} + +input#hidebusy:checked ~ .controls label.enable[for=hidebusy] { + display: none; +} + +input#hidebusy:not(:checked) ~ .controls label.disable[for=hidebusy] { + display: none; +} + +input#hidebusy:checked ~ .calendar tr.slot.busy { + display: none; +} + label.enable, label.disable { border-left: 1em solid #faa; /* th.participantheading background-color */ diff -r 557dc4696487 -r 6d8045a9b66e imip_manager.py --- a/imip_manager.py Mon Feb 02 18:38:18 2015 +0100 +++ b/imip_manager.py Mon Feb 02 18:46:59 2015 +0100 @@ -739,12 +739,15 @@ page.input(name="newevent", type="submit", value="New event", id="newevent") page.p.close() - # Show a control for hiding empty slots. + # Show controls for hiding empty and busy slots. # The positioning of the control, paragraph and table are important here. page.input(name="hideslots", type="checkbox", value="hide", id="hideslots") + page.input(name="hidebusy", type="checkbox", value="hide", id="hidebusy") page.p(class_="controls") + page.label("Hide busy time periods", for_="hidebusy", class_="enable") + page.label("Show busy time periods", for_="hidebusy", class_="disable") page.label("Hide unused time periods", for_="hideslots", class_="enable") page.label("Show unused time periods", for_="hideslots", class_="disable") page.p.close() @@ -962,7 +965,7 @@ css = " ".join( ["slot"] + - (not have_active and ["empty"] or []) + + (have_active and ["busy"] or ["empty"]) + (continuation and ["daystart"] or []) )