Thanks to Colin for the pointer for a solution.
This is what I have done to get the results table so that clicking on the column headings sorts by that column. The below uses the sorttable.js file, but you can replace that file with your own favorite table sorting js and it should work.
Method 1:
- Step one: add this .js file http://www.kryogenix.org/code/browser/sorttable/sorttable.js to the web folder where the results will uploaded.
- Step two: add the below line to the Sailwave/Templates/header.txt file between in the “” and “” lines.
- Step 4: When you publish - it should just work (i.e., the table should be sortable)
Method 2 (note Steps 2 and 3 are identical for Method 1 and Method 2):
- Step one: add this .js file http://www.kryogenix.org/code/browser/sorttable/sorttable.js to the sailwave javascript folder (note, you should remove the comments that contain quotes, if any, from the javascript file as that caused problems for me).
- Step two: add the below line to the Sailwave/Templates/header.txt file between in the “” and “” lines.
- Step 4: When you publish - you have to enable the effect sorttable in the final publish pop up.
Method 1 keeps the results html files small, but the sorting will only work if the sorttable.js file is located in the right place.
Method 2 results in the sorting code being placed inside the html file, so the file is larger, but the sorting should always work (i.e., does not depend on the .js file).