Attached is a diff for 2 and 3. I'm still looking for input on issue 1:
remember initial order.
Kia wrote:
>
> I love the official table sorter plugin, but I'm missing some
> functionality. Would it be possible to add
>
> 1) A new sorter "keep" that will remember the initial order. Why?
> Often I find myself in a situation where I get the table data from a
> database and let the database sort the first column. I get these kind
> of data
>
> Y2006
> Y2005
> Y1983
> Y1982
>
> or
>
> Q4 1988
> Q1 2003
> Q2 2003
> Q2 2006
>
> All I want is an option to make the initial order to be remembered on
> the first column. That way I don't have to write my own parsers.
>
> This should be simple to implement, but I'm not sure how... Any ideas?
>
> 2) Could the currency parser be modified to handle NOK/FIN etc. Like
> this:
> return s.match(new RegExp(/^[£$?.]/g)) || s.match(new RegExp(/ [A-Z]
> {3}$/g));
>
> 3) I would like to introduce a new percent parser:
> return s.match(new RegExp(/%$/g));
>
> Kia
>
>
440c440,450
< return s.match(new RegExp(/^[£$?.]/g));
---
> return s.match(new RegExp(/^[£$?.]/g)) || s.match(new
> RegExp(/ [A-Z]{3}$/g));
> },
> format: function(s) {
> return $.tableSorter.utils.formatFloat(s.replace(new
> RegExp(/[^0-9.]/g),''));
> },
> sorter: $.tableSorter.sorters.numeric
> };
> $.tableSorter.parsers.percent = {
> id: 'percent',
> is: function(s) {
> return s.match(new RegExp(/%$/g));
547a558
> $.tableSorter.analyzer.add($.tableSorter.parsers.percent);