Closed hodefoting closed 9 years ago
file replaced with some comments added to explain what the script does.
there are is probably some duplicated code ("+/- details" seems to be set twice) and i don't understand why it's using ## instead of # for the anchors (and i would have preferred the anchor being removed when closing the details...). but let's keep those changes for next year, if we will still be using this script.
Thanks for putting it there, the script was written to be a drop-in replacement without restructuring the XHTML.
It is using ## because the "name" of the a elements in the document has a leading # which shouldn't be there. The code would have been simpler if the anchor enclosed the whole item in the schedule; or instead of an anchor an id attribute was on the top-most ancestor of the summary being manipulated (less prev/parent relative DOM hackery).
When it comes to open/closing - how would one deal with two open items? (one could close items upon opening another one - though then I'd change the whole thing and just make clicking the titles of the talks show the summary of that talk, as well as changing the fragment in the URL.
The single huge HTML schedule is nice since it collects all information on a single page. It currently is hard to linkto individual talks or parts of the program. At http://pippin.gimp.org/tmp/2015_schedule.js is a replacement for the existing 2015_schedule.js with one that updates the url#fragment when expanding details sections, and opens and scrolls to the specified one when opening the page.