Closed JackWilton1594 closed 5 months ago
@martindholmes: I would like to learn how to make tables sortable. Would you please teach me?
We need to add the little sorttable.js file to the lemdo-dev repo and then devise a method for an encoder to specify that it should be invoked. Not difficult.
Question: should all tables in specific types of documents be sortable by default, or should this always be invoked using a specific encoding mechanism? For example, we could make all tables in documentation sortable by default, rather than confronting the reader with puzzling situations where one table is sortable but the next one isn't. Are there contexts in which tables should not be sortable?
I can't think of any reason why all tables shouldn't be sortable.
OK, I'll implement that.
Tables can't be sortable unless they have column headings (meaning that in the TEI their first row has to have @role="label"
). So for instance this table can't be sortable:
dre_eg_emendation.html
whereas this one can:
dre_editionsProgress.html
I also wonder whether chronological tables like this:
emdJC_Chronology.html
should be sortable, but I've gone ahead and made all viable tables sortable in rev 18173.
@JanelleJenstad All you need to do to make a table sortable, then, is to ensure it starts with a row with @role="label"
.
Thank you!
I think this can be closed now.
Please add table sorting to dre_editionsProgress