Enhanced TablePlugin Sorting Features
I have added a few enhancements to the sorting capabilities on the
TablePlugin code.
I have included an initial sort and an initial sort direction. This is very helpful in setting up the page such that it appears as you want it when a user first looks at it. You will need to read the specifics to get an idea of the full functionality, but here are the enhancements.
To specify the column you wish to sort by you need to us the keyword
initsort .
initsort is set to the column you wish to sort by starting with 1. Example:
%TABLE{initsort="1" initdirection="up"}%
To specify the direction you want the sort to go you use the keyword
initdirection . The acceptable arguments to this parameter are
up or
down.
I have also added some code that will place small gif images to indicate the sorting directions. These need to be placed in the following directory
https://twiki.org/p/pub/icn/ in order for the code to see the images.
The code is attached as well as the small gifs.
--
ShawnBradford - 09 Nov 2001
I have fixed a bug in my current release so that multiple tables are rendered correctly on one page.
--
ShawnBradford - 12 Nov 2001
Added the above capability with the new TWiki20011201 release of the
TablePlugin module. Only a couple modifications. It is attached below.
--
ShawnBradford - 22 Feb 2002
This is now in the latest
TablePlugin release, so this patch is now obsolete. (I did fix a problem where initsort did not switch off for subsequent tables)
--
PeterThoeny - 12 Mar 2002