I came across this super bit of
JavaScript when looking for something else. It lets you make all tables sortable, in the same way as
TablePlugin but it's entirely client-side. I've tried it with Konqueror and IE and it works flawlessly with both.
With the move to
CSS making all tables have a class is something we should be able to do simply enough. The
JavaScript is light enough to include without great penalty. And maybe we can eliminate
TablePlugin (or at least the sorting bit!).
http://www.kryogenix.org/code/browser/sorttable/
I suggest we adopt this.
--
CrawfordCurrie - 12 Jul 2004
There are, however, those of us who use browsers that do not implement
JavaScript, or who turn it off, or who are just plain suspicious of it. I'd still want to be able to sort my tables!
--
DavidBright - 12 Jul 2004
Indeed, yes, far be it for me to ask people to drive while they can still use horses

Seriously though, you have a good point. Perhaps a global "I use
JavaScript" switch could enable/disable such features. But client side table sorting is
so much faster than waiting for a server refresh.....
--
CrawfordCurrie - 12 Jul 2004
I agree that working client side, but supporting server side if no
JavaScript is a good idea. Can the client side code do as good a job on data type detection as the server side - the implementation looks reasonable? Note that
TablePlugin originally did use client side
JavaScript, but not everyone had this and
TablePlugin ended up with more capabilities than my feeble
JavaScript skills could cope with.
Page can be setup to use server side, with
JavaScript in page init block disabling it. You'll see this already used in
FormFieldsPlugin.
--
JohnTalintyre - 15 Jul 2004
The implementation looks very good - I wouldn't have bothered otherwise, having had too much grief with bad
JavaScript in the past. Data type detection is limited to strings, numbers and dates; not sure what others
TablePlugin does, but I'm sure the JS could easily be extended to match, as the pattern is already there in the code.
--
CrawfordCurrie - 15 Jul 2004