# HG changeset patch # User Paul Boddie # Date 1423326811 -3600 # Node ID 8787b25d05858ecfb6bcda8d3afc410fc3d34d45 # Parent 5c2589a788267e1de7b1e497043db9babadc4f7e Changed the display property of thead and tbody elements so that hidden days occupy no space. Added accesskeys for the controls. diff -r 5c2589a78826 -r 8787b25d0585 htdocs/styles.css --- a/htdocs/styles.css Sat Feb 07 17:23:05 2015 +0100 +++ b/htdocs/styles.css Sat Feb 07 17:33:31 2015 +0100 @@ -128,8 +128,8 @@ /* Hide calendar rows depending on the selected controls. */ input#hidebusy:checked ~ .calendar tr.slot.busy, -input#showdays:not(:checked) ~ .calendar tr.separator.empty, -input#showdays:not(:checked) ~ .calendar tr.slot.onlyslot.daystart.empty { +input#showdays:not(:checked) ~ .calendar thead.separator.empty, +input#showdays:not(:checked) ~ .calendar tbody.points.empty { display: none; } diff -r 5c2589a78826 -r 8787b25d0585 imip_manager.py --- a/imip_manager.py Sat Feb 07 17:23:05 2015 +0100 +++ b/imip_manager.py Sat Feb 07 17:33:31 2015 +0100 @@ -853,8 +853,8 @@ # Show controls for hiding empty days and busy slots. # The positioning of the control, paragraph and table are important here. - page.input(name="showdays", type="checkbox", value="hide", id="showdays") - page.input(name="hidebusy", type="checkbox", value="hide", id="hidebusy") + page.input(name="showdays", type="checkbox", value="hide", id="showdays", accesskey="D") + page.input(name="hidebusy", type="checkbox", value="hide", id="hidebusy", accesskey="B") page.p(class_="controls") page.label("Hide busy time periods", for_="hidebusy", class_="hidebusy enable") @@ -1091,15 +1091,15 @@ is_empty = False break - page.thead() - page.tr(class_="separator%s" % (is_empty and " empty" or "")) + page.thead(class_="separator%s" % (is_empty and " empty" or "")) + page.tr() page.th(class_="dayheading container", colspan=all_columns+1) self._day_heading(day) page.th.close() page.tr.close() page.thead.close() - page.tbody() + page.tbody(class_="points%s" % (is_empty and " empty" or "")) self.show_calendar_points(intervals, groups_for_day, partitioned_group_types, group_columns) page.tbody.close() @@ -1131,7 +1131,6 @@ css = " ".join( ["slot"] + - (len(intervals) == 1 and ["onlyslot"] or []) + (have_active and ["busy"] or ["empty"]) + (continuation and ["daystart"] or []) )