Hello world,
i've tried to include http://www.kryogenix.org/code/browser/sorttable/ into SARG reports, it's great.
With this js file you can sort any HTML table ... here is a topsite.c with sorttable include. You have to download sorttable.js and put it in SARG wwwroot ... please send me an email if you're interrested in a full patch for SARG + SORTTABLE.
Éric
tomsite with
The sample file you provide is from a version of sarg I could not identify. I could not extract a proper diff with just the changes you made.
Nevertheless, this is an excellent suggestion and I'm going to add it to sarg 2.4 (that is, once I start working on it :-) ).
Thanks for the link.
Frederic
I've not verified the content of sorttable.js, but it worked as expected. I've made some changes in and the corresponding reports are now sortable. Some improvements have to be done like not sort TOTAL and AVERAGE lines, but the result is good for now. Follow patch files for sarg 2.3.1.
The sorttable.js script was saved in my web root directory (DocumentRoot parameter in apache conf). The www_document_root parameter in sarg.conf was changed to http://MY_WEB_SERVER_ROOT_ADDRESS.
How can I attach my patch files to this issue?
The support for sorttable.js is available since November 20, 2010. What issue do you want to provide a patch for ?
The current svn source can be fetched from svn with this command: [code]svn co https://sarg.svn.sourceforge.net/svnroot/sarg/branches/v2.3 .[/code] If you provide a patch, be sure to build it against that version.
I still haven't decided whether I'll distribute a patched version of sorttable.js along with sarg or not. The original project looks dead.
Frederic
I didn't know that sarg supported sorttable.js (your post in 2010-11-04 doesn't say this). The patch files I've created are for last sarg stable version (2.3.1). The changed files are util.c, siteuser.c, topuser.c and siteuser.c. A side effect, as I said, is the incorrect sort of TOTAL and AVERAGE lines. Columns with values with different suffixes ("Kilo", "Mega", ie) are incorrectly sorted too. As I don't have permission to attach files to this issue, I can send you the patch files by e-mail, if you want.
I see. Considering the "Sortable Project" status, I think that would be interesting sarg provides a patched version of sorttable.js.
At last, I would like to ask, please add to sarg the ability of dynamically sort columns. This is a very desired functionality in sarg reports. Thanks for everything.
On November 4th, I said I would add support for sorttable to sarg 2.4 but the feature was so exciting and easy to implement that I programmed it almost immediately. It will be available in sarg 2.3.2.
Don't waste your time reimplementing it. The feature is fully functional now. If you can't wait for sarg 2.3.2, you can check out the source from svn. It is development code but it should be quite stable. I'm using it on a production server.
Thank you for pointing to sorttable by the way.
I'll test the svn version. All the best.
it's failing for Table columns with textbox.
<td><input type="text" name="some name"></td>
I haven't released a patched sorttable.js yet. If you are using the original one, you should try to report the bug to the official author first.
Where does sarg produce such a table in conjunction with sorttable?