[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
I would like to request a feature... It would be nice if one could optionally set the sorter to ignore all HTML tags in the table cells. For instance, have a setting in the config, something like: ignoreTags: true, Where if it were set, the sorter would strip out all the HTML tags before sorting. I request this, because I have situations where I would like to sort on row IDs, where the row IDs are links to the specific row's data, but there is no sort type for that situation. If I set it to integer, it fails, if I set it to genericLink, it fails, if I leave it to figure it out on its own, it fails. I have created a custom type for my situation, but would rather have it strip out tags all the time, because the tags are not visible, it makes the sort rather confusing and appear 'broken'. It would also make the sort discover script a little better, where in my situation, instead of sorting as text, it would sort as integer (because once the tags are gone, all that is left is integers). Anywho... great script. And I await the final release.
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Could you also set the debugging output in the console to show what type is being used to do the sorting? e.g.- Sorting as 'currency' on 1 columns and dir 1 time: 2ms or Sorting as 'currency, date' on 2 columns and dir 0 time: 12ms Thanks.
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
2007/7/19, Kia [EMAIL PROTECTED]: Personally I would prefer if the string wasn't lowercased. I think the parser should lowercase it (or use the regexp modifier 'i'), if needed. I will change this in time for the final release. /christian
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
It's a lowercase string of the td value. Personally I would prefer if the string wasn't lowercased. I think the parser should lowercase it (or use the regexp modifier 'i'), if needed. Rick Pasotto wrote: On Wed, Jul 18, 2007 at 03:46:58PM +0200, Christian Bach wrote: Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted There is a set of experimental parser available here: http://lovepeacenukes.com/tablesorter/2.0/jquery.tablesorter.parsers.js Exactly what is it that gets passed to a parser and what should it return? I haven't had the time to test them and there of the experimental status. /christian
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
It's a lowercase string of the td value. Personally I would prefer if the string wasn't lowercased. I think the parser should lowercase it (or use the regexp modifier 'i'), if needed. On Jul 18, 6:12 pm, Rick Pasotto [EMAIL PROTECTED] wrote: On Wed, Jul 18, 2007 at 03:46:58PM +0200, Christian Bach wrote: Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted There is a set of experimental parser available here: http://lovepeacenukes.com/tablesorter/2.0/jquery.tablesorter.parsers.js Exactly what is it that gets passed to a parser and what should it return? I haven't had the time to test them and there of the experimental status. /christian -- I don't need music, lobster or wine. Whenever your eyes look into mine; The things I long for are simple and few: A cup of coffee, a sandwich and you! Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Test Sent from my iPhone On Jul 18, 2007, at 11:28 PM, Kia Niskavaara [EMAIL PROTECTED] wrote: It's a lowercase string of the td value. Personally I would prefer if the string wasn't lowercased. I think the parser should lowercase it (or use the regexp modifier 'i'), if needed. Rick Pasotto wrote: On Wed, Jul 18, 2007 at 03:46:58PM +0200, Christian Bach wrote: Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted There is a set of experimental parser available here: http://lovepeacenukes.com/tablesorter/2.0/jquery.tablesorter.parsers.js Exactly what is it that gets passed to a parser and what should it return? I haven't had the time to test them and there of the experimental status. /christian
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Jul 17, 2:57 pm, Christian Bach [EMAIL PROTECTED] wrote: 2007/7/17, Rick Pasotto [EMAIL PROTECTED]: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) Yeah, packer doesn't always work as expected :) That's not the case for me (the sizes are mixed up on the page). The normal one is 13.15 kb for me and the packed on is 6.73kb. If you pack using the Base62 encode option you can get it even smaller.
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
That's not the case for me (the sizes are mixed up on the page). The normal one is 13.15 kb for me and the packed on is 6.73kb. If you pack using the Base62 encode option you can get it even smaller. Thanks Sam, i repacked it and got down to 5,2 KB. Updated the page to reflect the changes: http://lovepeacenukes.com/tablesorter/2.0/
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
I've tried the encode option, but get this strange error: missing ; before statement [Break on this error] :'sortNumericDesc');var e='e'+i;dynamicExp+='var '+e+' = '+s+'(a['+c+'],b['+c+']... Also, I've created these parsers (might be useful for someone). Maby you should make custom parsers available at your hompepage? $.tablesorter.addParser({ id: 'percent', is: function(s) { return s.match(new RegExp(/%$/g)); }, format: function(s) { return $.tablesorter.formatFloat(s); }, type: 'numeric' }); $.tablesorter.addParser({ id: 'currency', is: function(s) { return s.match(new RegExp(/^[£$?.]/g)) || s.match(new RegExp(/ [A-Z]{3}$/g)); }, format: function(s) { return $.tablesorter.formatFloat(s); }, type: 'numeric' }); Sam Collett wrote: On Jul 17, 2:57 pm, Christian Bach [EMAIL PROTECTED] wrote: 2007/7/17, Rick Pasotto [EMAIL PROTECTED]: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) Yeah, packer doesn't always work as expected :) That's not the case for me (the sizes are mixed up on the page). The normal one is 13.15 kb for me and the packed on is 6.73kb. If you pack using the Base62 encode option you can get it even smaller.
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Christian Bach wrote: Thanks, when the final version is released it will include more parser and contributed parsers as a optional file. Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted it. I also think that I've found a bug. My toggle function doesn't work when using the tablesorter. I'm not sure why. When I remove the tablesorter, the toggle function works as expected: $('#mytable tbody tr').toggle(function() { $(this).addClass(selected); },function(){ $(this).removeClass(selected); }); Kia
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
I´m with a problem to sorter a text column, don´t sorte correctly I have to add a parser? If yes, how? On 7/18/07, Christian Bach [EMAIL PROTECTED] wrote: Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted it. There is a set of experimental parser available here: http://lovepeacenukes.com/tablesorter/2.0/jquery.tablesorter.parsers.js I haven't had the time to test them and there of the experimental status. /christian -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Wed, Jul 18, 2007 at 03:46:58PM +0200, Christian Bach wrote: Could you please post a 'float' parser to the list? I think there was one in the old tablesorter release, but unfortionatley I've deleted There is a set of experimental parser available here: http://lovepeacenukes.com/tablesorter/2.0/jquery.tablesorter.parsers.js Exactly what is it that gets passed to a parser and what should it return? I haven't had the time to test them and there of the experimental status. /christian -- I don't need music, lobster or wine. Whenever your eyes look into mine; The things I long for are simple and few: A cup of coffee, a sandwich and you! Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Christian Bach schreef: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Best regards Christian Just a tiny error on the page. I think the filesize in the links need to be switched. Sorry for the nitpicking :) -- David Duymelinck [EMAIL PROTECTED]
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
2007/7/17, David Duymelinck [EMAIL PROTECTED]: Christian Bach schreef: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Best regards Christian Just a tiny error on the page. I think the filesize in the links need to be switched. Sorry for the nitpicking :) Thanks David, there switched now :)
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) -- When dealing with people, remember you are not dealing with creatures of logic, but creatures of emotion. -- Dale Carnegie Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Christian, After another late night, fixing a few bugs, the code is finally ready for it's first beta release. Looks really good. This seems much more responsive than the previous version. The main new features include: * Multi-column sorting I'm glad to see you made the multi-column sort key configurable. My instinct was to use the [CTRL] key, not the [SHIFT] key (although I know Outlook uses the [SHIFT] key.) -Dan
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
2007/7/17, Rick Pasotto [EMAIL PROTECTED]: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) Yeah, packer doesn't always work as expected :)
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
I'm glad to see you made the multi-column sort key configurable. My instinct was to use the [CTRL] key, not the [SHIFT] key (although I know Outlook uses the [SHIFT] key.) Tablesorter can be configured to use either SHIFT or CTRL, all though SHIFT is default. Here is a example on how to change it to the control key: $(table).tablesorter({ sorting: { // valid values: ctrlKey, altKey, shiftKey multisortKey: 'ctrlKey', } }); /christian
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
excellent job christian, i have one bug to report: consider this html if the tr element contains inline styles such as: tr style=background-color:red once sorted, the style is removed. not a biggie, but can be annoying. cheers! Alexandre _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bach Sent: mardi 17 juillet 2007 14:05 To: jquery-en@googlegroups.com Subject: [jQuery] ANNOUNCE: tablesorter 2.0 beta released! After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: HYPERLINK http://lovepeacenukes.com/tablesorter/2.0/http://lovepeacenukes.com/tables orter/2.0/ Best regards Christian Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.8/904 - Date: 16/07/2007 17:42
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
excellent job christian, Thanks! i have one bug to report: consider this html if the tr element contains inline styles such as: tr style=background-color:red once sorted, the style is removed. I did a quick test, and the style attribute was not removed, perhaps the style is over-written by a css class? Tablesorter by default adds a class by the name .header to all th elements. /christian
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.xrelease. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Also, is it possible to apply a style to the table based on which column is sorted? And one more thing. I'm using cluetip.js on that first column and it no longer works. -- Those words, 'temperate' 'moderate', are words either of political cowardice, or of cunning, or seduction... A thing moderately good is not so good as it ought to be. Moderation in temper is always a virtue, but moderation in principle is a species of vice. -- Thomas Paine Letter to Addressors Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Yeah, you need John's metadata plugin to allow in-line configuration, i totally forgot to mention that. You can grab it from here: http://jquery.com/dev/svn/trunk/plugins/metadata/lib/jQuery/metadata.js?format=txt Also, is it possible to apply a style to the table based on which column is sorted? Not at the moment i will see if i have the time to whip up a widget that could support that. And one more thing. I'm using cluetip.js on that first column and it no longer works. It should work, I'm not familiar with the cluetip plugin, but I'm not removing any thing from the table.
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 11:01:55AM -0400, Rick Pasotto wrote: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.xrelease. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Also, is it possible to apply a style to the table based on which column is sorted? And one more thing. I'm using cluetip.js on that first column and it no longer works. Immediately after sending the above I think I realized what the problem is. Each of the numeric values in that first column is wrapped in a/a and you're probably sorting on that. Do I need to write a parser? If so, what might it be? -- There are 2 fools in every market: one asks too little, one asks too much. -- Russian proverb Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Immediately after sending the above I think I realized what the problem is. Each of the numeric values in that first column is wrapped in a/a and you're probably sorting on that. Do I need to write a parser? If so, what might it be? This should work: $.tablesorter.addParser({ id: 'genericLink', is: function(s) { var exp = /a[^]*(.*)\/a/.test(s.toLowerCase()); if(exp) this.type = (/a[^]*(\d+)\/a/.test(s)) ? 'numeric' : 'text'; return exp; }, format: function(s) { var val = s.toLowerCase().match(/a[^]*(.*)\/a/)[1]; // format your data for normalization return (this.type == 'text') ? $.trim(val) : $.tablesorter.formatFloat(val); }, type: 'text' }); It works for a element with text and numeric values. /christian