Controlling output order: Difference between revisions

Content added Content deleted
No edit summary
Line 18: Line 18:
ts_resortTable(lnk);
ts_resortTable(lnk);


The ''wikibits.js'' usually is called at the end of a page and performs ''sortables_init()''. If we call it ourselves it will not recognize this and therefore it will add its sort link buttons a second time (which looks quite funny...). You can teach wikibits.js to be aware of initialized sortable tables by adding the following if-statement around the line where it inserts the href for the sort button (near line 550 in MW 1.13):
Prior to version 1.16 of MediaWiki, ''wikibits.js'' was usually called at the end of a page and performed ''sortables_init()''. Calling explicitly did not result in it being recognized and adding a second set of sort link buttons.
if (cell.innerHTML.indexOf("sortheader") < 0) { ... place the original code line here ... }


==ordermethod==
==ordermethod==