I'd like the ability to have tables where the user can click the column headers to sort the table by each column. While this may sound complex, it's actually pretty simple to accomplish using a little Java Script.
"This example":http://omnichron.net/external/op/dhtml_examples.html I created defines what this would look like, and demonstrates it in use. The functionality is automatically applied to each table as long as it has a header row, just by running a simple function on page load.
Implementing this feature is as simple as adding the two functions there into your existing java script files, and calling the setup function on load.
It's not a bad idea, and like you say, not too hard to implement. Heck, there may already be a jQuery plugin that does exactly this, meaning we end up writing 0 lines of code. Always a good thing :)
I essentially have 2 concerns:
1) My main concern is that of course some people are going to want it and some won't. So, it has to be configurable in some sense. We could do it by only applying the javascript to tables with a special class (say, "self-sorting"). Not a big deal.
2) It's one of those things that only maybe 0.01% of people will use. Some of these features are cool, and I like supporting them, but it always makes me a little sad to know I'm writing something that so few will ever use. The solution here is that if we program it, then you guys need to use and evangelize it. If anyone comments, "Hey, that's cool!" then please tell them how you did it and how they can do it in their own stuff.
I'll find a spot for it on the TODO list. It should only take about an hour. So, if I have a little downtime, I'll see if I can stuff it in.
If you do this, I will TOTALLY use it! especially for my party's loot tables. I currently keep an Excel spreadsheet that allows me to sort by who is carrying what, or which items need to be Identified and I try to include tables on a session by session basis on the site. If I could have something on here with sorting capability, I could quickly set up a master loot page and perhaps a "how much crap is in our bag of holding?" page without having to hand sort the ordering.
For what it's worth, since the forum view for campaigns ("example":http://www.obsidianportal.com/campaigns/sanction/forum) is set up in a table with a table header row, this would also make it possible to sort the forums by the various columns, which is always nice.
If jQuery doesn't have what you need already built in, you can feel free to snag the code I wrote for the example linked above.
Comments
"This example":http://omnichron.net/external/op/dhtml_examples.html I created defines what this would look like, and demonstrates it in use. The functionality is automatically applied to each table as long as it has a header row, just by running a simple function on page load.
Implementing this feature is as simple as adding the two functions there into your existing java script files, and calling the setup function on load.
It's not a bad idea, and like you say, not too hard to implement. Heck, there may already be a jQuery plugin that does exactly this, meaning we end up writing 0 lines of code. Always a good thing :)
I essentially have 2 concerns:
1) My main concern is that of course some people are going to want it and some won't. So, it has to be configurable in some sense. We could do it by only applying the javascript to tables with a special class (say, "self-sorting"). Not a big deal.
2) It's one of those things that only maybe 0.01% of people will use. Some of these features are cool, and I like supporting them, but it always makes me a little sad to know I'm writing something that so few will ever use. The solution here is that if we program it, then you guys need to use and evangelize it. If anyone comments, "Hey, that's cool!" then please tell them how you did it and how they can do it in their own stuff.
I'll find a spot for it on the TODO list. It should only take about an hour. So, if I have a little downtime, I'll see if I can stuff it in.
If jQuery doesn't have what you need already built in, you can feel free to snag the code I wrote for the example linked above.