[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread Rodent of Unusual Size

On Nov 11, 9:37 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Here's an example if my question above is answered by "yes, that's
> correct"
>
> http://paste.pocoo.org/show/90863/

That only handles the aspect of ignoring the alpha characters.  It
does
*not* appear to handle the issue of sorting 40125 before 7400..


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread Mike Nichols

> Yuck, why "patch" the js file when a custom parser could just be
> built?

IIRC, the custom parser changed from being able to sort as a set to go
an item by item comparison, which eliminated being able to do a
natural sorting algorithm. This is a bit different from Rodent's
requirements but remains a difficulty nonetheless.
How would you propose an custom parser for sorting naturally the
following and retaining this order?

z1.txt
z2.txt
z9.txt
z10.txt
z11.txt
z12.txt
z20.txt
z100.txt




On Nov 11, 7:37 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Here's an example if my question above is answered by "yes, that's
> correct"
>
> http://paste.pocoo.org/show/90863/
>
> Remove the "console.log" if you aren't using FireFox and Firebug
> (which you should be as a JavaScript developer!)
>
> On Nov 11, 8:33 am, MorningZ <[EMAIL PROTECTED]> wrote:
>
> > Yuck, why "patch" the js file when a custom parser could just be
> > built?
>
> > before that can happen though, something needs to be made more clear
>
> > in the examples above, you pretty much are just ignoring letters for
> > sorting purposes?
>
> > On Nov 11, 2:51 am, Rodent of Unusual Size <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 11, 12:29 am, Mike Nichols <[EMAIL PROTECTED]> wrote:
>
> > > > I submitted a patch a long time ago to do this that implemented a
> > > > natural sorting algorithm for this but it would never get applied and
> > > > I couldn't get a response..I assumed the project was light or dead.
> > > > I can send you the patched .js i had if you like.
>
> > > Sure.  To what file(s) is it a patch, and does it still apply?
>
> > > Thanks!


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread MorningZ

Here's an example if my question above is answered by "yes, that's
correct"

http://paste.pocoo.org/show/90863/

Remove the "console.log" if you aren't using FireFox and Firebug
(which you should be as a JavaScript developer!)



On Nov 11, 8:33 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Yuck, why "patch" the js file when a custom parser could just be
> built?
>
> before that can happen though, something needs to be made more clear
>
> in the examples above, you pretty much are just ignoring letters for
> sorting purposes?
>
> On Nov 11, 2:51 am, Rodent of Unusual Size <[EMAIL PROTECTED]> wrote:
>
> > On Nov 11, 12:29 am, Mike Nichols <[EMAIL PROTECTED]> wrote:
>
> > > I submitted a patch a long time ago to do this that implemented a
> > > natural sorting algorithm for this but it would never get applied and
> > > I couldn't get a response..I assumed the project was light or dead.
> > > I can send you the patched .js i had if you like.
>
> > Sure.  To what file(s) is it a patch, and does it still apply?
>
> > Thanks!


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread Rodent of Unusual Size

On Nov 11, 8:33 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Yuck, why "patch" the js file when a custom parser could just be
> built?
>
> before that can happen though, something needs to be made more clear
>
> in the examples above, you pretty much are just ignoring letters for
> sorting purposes?

Yup, as I said.  And 40123 should sort lower than 7400.


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-11 Thread MorningZ

Yuck, why "patch" the js file when a custom parser could just be
built?

before that can happen though, something needs to be made more clear

in the examples above, you pretty much are just ignoring letters for
sorting purposes?



On Nov 11, 2:51 am, Rodent of Unusual Size <[EMAIL PROTECTED]> wrote:
> On Nov 11, 12:29 am, Mike Nichols <[EMAIL PROTECTED]> wrote:
>
> > I submitted a patch a long time ago to do this that implemented a
> > natural sorting algorithm for this but it would never get applied and
> > I couldn't get a response..I assumed the project was light or dead.
> > I can send you the patched .js i had if you like.
>
> Sure.  To what file(s) is it a patch, and does it still apply?
>
> Thanks!


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-10 Thread Rodent of Unusual Size

On Nov 11, 12:29 am, Mike Nichols <[EMAIL PROTECTED]> wrote:
> I submitted a patch a long time ago to do this that implemented a
> natural sorting algorithm for this but it would never get applied and
> I couldn't get a response..I assumed the project was light or dead.
> I can send you the patched .js i had if you like.

Sure.  To what file(s) is it a patch, and does it still apply?

Thanks!


[jQuery] Re: Custom sorter/parser for tablesorter

2008-11-10 Thread Mike Nichols

I submitted a patch a long time ago to do this that implemented a
natural sorting algorithm for this but it would never get applied and
I couldn't get a response..I assumed the project was light or dead.
I can send you the patched .js i had if you like.


On Nov 10, 9:56 pm, Rodent of Unusual Size <[EMAIL PROTECTED]> wrote:
> I'm just discovering jQuery and finding it really interesting.
> Usual sort of 'learn by doing' thing.  I've been playing with
> the tablesorter plugin, but I've run into a wall.  Particularly
> since I'm far from expert in Javascript. :-)
>
> I want to be able to sort a table on a column containing
> integrated circuit numbers (such as 7400, LM555, 74LS50
> 4026, et cetera).  I want the technology (i.e., the 'LS'
> in '74LS50') to be ignored for sorting purposes, so 74LS50
> and 74H50 would be juxtaposed.  I also want the series
> to be grouped together (e.g., 7400 series together,
> 4000 series together, et cetera).
>
> Unfortunately, this is possibly a little more complex than
> it might seem.  Given the following part numbers,
>
> 7400
> 4010
> 74C10
> 4026
> 74257
> 4012
> 74LS174
> 40257
>
> the correct ascending order should be
>
> 4010
> 4012
> 4026
> 40257
> 7400
> 74C10
> 74LS174
> 74257
>
> I'm used to custom sorting callbacks that are given two arguments
> and return whether ab -- but I'm not finding how
> to do the equivalent with tablesorter.
>
> Is it even possible?
>
> Thanks!
> --
> #ken    P-)}
>
> Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
> Author, developer, opinionist      http://Apache-Server.Com/
>
> "Millennium hand and shrimp!"