# HG changeset patch # User Paul Boddie # Date 1422898698 -3600 # Node ID 557dc4696487090b9b618bd8f38fde8495f28767 # Parent c60f358ebe0ba0372835fdaf99382f34d95359cb Replaced calendar and object identifiers with classes, making the rules more general. Added label styling for the show/hide functionality. diff -r c60f358ebe0b -r 557dc4696487 htdocs/styles.css --- a/htdocs/styles.css Mon Feb 02 18:16:49 2015 +0100 +++ b/htdocs/styles.css Mon Feb 02 18:38:18 2015 +0100 @@ -1,7 +1,7 @@ /* Table styling. */ -table#calendar, -table#object { +table.calendar, +table.object { border: 2px solid #000; } @@ -94,14 +94,20 @@ display: none; } -input#hideslots:checked ~ p label.enable[for=hideslots] { +input#hideslots:checked ~ .controls label.enable[for=hideslots] { + display: none; +} + +input#hideslots:not(:checked) ~ .controls label.disable[for=hideslots] { display: none; } -input#hideslots:not(:checked) ~ p label.disable[for=hideslots] { +input#hideslots:checked ~ .calendar tr.slot.daystart.empty { display: none; } -input#hideslots:checked ~ table tr.slot.daystart.empty { - display: none; +label.enable, +label.disable { + border-left: 1em solid #faa; /* th.participantheading background-color */ + padding-left: 0.25em; } diff -r c60f358ebe0b -r 557dc4696487 imip_manager.py --- a/imip_manager.py Mon Feb 02 18:16:49 2015 +0100 +++ b/imip_manager.py Mon Feb 02 18:38:18 2015 +0100 @@ -525,7 +525,7 @@ # Provide a summary of the object. - page.table(id="object", cellspacing=5, cellpadding=5) + page.table(class_="object", cellspacing=5, cellpadding=5) page.thead() page.tr() page.th("Event", class_="mainheading", colspan=2) @@ -735,7 +735,7 @@ # Show a button for scheduling a new event. - page.p() + page.p(class_="controls") page.input(name="newevent", type="submit", value="New event", id="newevent") page.p.close() @@ -744,7 +744,7 @@ page.input(name="hideslots", type="checkbox", value="hide", id="hideslots") - page.p() + page.p(class_="controls") page.label("Hide unused time periods", for_="hideslots", class_="enable") page.label("Show unused time periods", for_="hideslots", class_="disable") page.p.close() @@ -864,7 +864,7 @@ partitioned_group_types.append(group_type) partitioned_group_sources.append(group_source) - page.table(cellspacing=5, cellpadding=5, id="calendar") + page.table(cellspacing=5, cellpadding=5, class_="calendar") self.show_calendar_participant_headings(partitioned_group_types, partitioned_group_sources, group_columns) self.show_calendar_days(days, partitioned_groups, partitioned_group_types, group_columns) page.table.close()