From 83ccdb2bde48ad9d6cdfbe12141edfc75c848ad2 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 19 May 2012 15:46:14 -0500 Subject: [PATCH] data fixes & performance improvements --- README.markdown | Bin 33054 -> 35984 bytes docs/example-option-date-format.html | 19 +++++-- docs/example-options-headers-locked.html | 28 +++++---- docs/example-options-headers-order.html | 26 ++++++--- docs/example-options-headers.html | 39 +++++++++---- docs/example-parsers-class-name.html | 14 ++++- docs/example-widget-filter.html | 14 +++-- docs/index.html | 6 +- js/jquery.tablesorter.js | 69 ++++++++++++++--------- js/jquery.tablesorter.min.js | 4 +- js/jquery.tablesorter.widgets.js | 37 ++++++++---- js/jquery.tablesorter.widgets.min.js | 16 +++--- package.json | 2 +- 13 files changed, 182 insertions(+), 92 deletions(-) diff --git a/README.markdown b/README.markdown index 905f0cf494e1460dce54d549078282a7c83ea6a5..7e6eff95b81aa2b174730a87e3b2af0ed6ef0afd 100644 GIT binary patch delta 1336 zcmaJ>O;1xn6ure5jT9p`p%!A8k`S!6d=#;?>45LLzGu zGM$eg{1kjL|zSp^P=bUrzoSAoIYGp64Y;ao$Oq=1RHXR#J zV(iv)rj^4eu{}fz$TrAd!Rj);Rp4`6*S&OqD9}{8XNugbvTRw4$a;#5mbyOhl`+?_ zNGXgwjHs~>Su0k{A|eGS3Kp)N%E+j`$~=nWD+x(Thnz#6k*oN5U}t5PLqpj}D5F~$ zZ!9C%k!z$0Ch{7K->{0S=m2>bigBG9Ivv#h?%Fq!q+1vhqT8ScA0tuSnN3DoJ+A=8$I2pDD*3qnDu-i6rh&$&4}<|=7*t)8 zlICi$)9h_U_lBY~b<5g>0_x=9sFOJBtr16lshQ0@q(C3$W z;*Qz*asg2~qYjKo=%um+&2>f3;IY-~ST({TG&5ZIkG5WJV Ns+%VH$?yD9`wJIn5*`2m delta 14 WcmbO*lWATP(}onm&DUghThe dateFormat option will ONLY work with the shortDate parser.
  • The date can be separated by any of the following: slash, dash, period, comma, space(s) or tab (/-., ).
  • This date format parser will only work with a four digit year. You can write your own if you need a two digit year parser. +
  • In versions 2.3+, columns can be disabled using any of the following methods, in order of priority: +
      +
    • jQuery data data-sorter="false" (see the Javascript block below on how to set it directly).
    • +
    • metadata class="{ sorter: false }". This requires the metadata plugin.
    • +
    • headers option headers : { 0 : { sorter: false } }.
    • +
    • header class name class="sorter-false".
    • +
    • overall dateFormat option setting.
    • +
    +
  • @@ -57,8 +66,8 @@ Date MMDDYYYY - Date DDMMYYYY - Date YYYYMMDD + Date DDMMYYYY + Date YYYYMMDD diff --git a/docs/example-options-headers-locked.html b/docs/example-options-headers-locked.html index 15ca6ff3..d140ef1b 100644 --- a/docs/example-options-headers-locked.html +++ b/docs/example-options-headers-locked.html @@ -2,7 +2,7 @@ - jQuery plugin: Tablesorter 2.0 - Lock sort order using header options + jQuery plugin: Tablesorter 2.0 - Lock sort order @@ -24,10 +24,6 @@ 0: { // lock the sort order of the first column to ascending (always Bruce to Peter when sorting on that column) lockedOrder: 'asc' - }, - 2: { - // lock the sort order of the third column to descending (always 45 to 18 when sorting on that column) - lockedOrder: 'desc' } } }); @@ -36,27 +32,37 @@

    - TIP! Sort the first and third columns to see how the sort is locked. Override this by using the multisort key (shift) while clicking on the header.
    - NOTE! This option was part of the original plugin, but it was broken. + NOTE! +

      +
    • This option was part of the original plugin, but it was broken.
    • +
    • Sort the first, third and fifth columns to see how the sort is locked.
    • +
    • Columns can be locked using any of the following methods, in order of priority (v2.3+): +
        +
      • jQuery data data-lockedorder="asc". (equivalent to data-locked-order="asc").
      • +
      • metadata class="{ lockedOrder: 'asc'}". This requires the metadata plugin.
      • +
      • headers option headers : { 0 : { lockedOrder: 'asc' } }.
      • +
      • header class name class="lockedOrder-asc".
      • +
      +
    • +

    -

    Demo

    - + - + diff --git a/docs/example-options-headers-order.html b/docs/example-options-headers-order.html index a5e8a8f6..407b7904 100644 --- a/docs/example-options-headers-order.html +++ b/docs/example-options-headers-order.html @@ -2,7 +2,7 @@ - jQuery plugin: Tablesorter 2.0 - Set initial sort order using header options + jQuery plugin: Tablesorter 2.0 - Set initial sort order @@ -26,9 +26,7 @@ // pass the headers argument and passing a object headers: { // set initial sort order by column, this headers option setting overrides the sortInitialOrder option - 0: { sortInitialOrder: 'desc' }, - 2: { sortInitialOrder: 'desc' }, - 4: { sortInitialOrder: 'desc' } + 0: { sortInitialOrder: 'desc' } } }); @@ -37,14 +35,26 @@

    - NOTE! The functionality to add a "sortInitialOrder" inside of the "headers" option was added in version 2.0.8 (not part of the original plugin). + NOTE! +

      +
    • Adding "sortInitialOrder" inside of the "headers" option was added in version 2.0.8 (not part of the original plugin).
    • +
    • In versions 2.3+, the initial sort order of the columns can be set using any of the following methods, in order of priority: +
        +
      • jQuery data data-sort-initial-order="desc" (equivalent to data-sortinitialorder="desc").
      • +
      • metadata class="{ sortInitialOrder: "desc" }". This requires the metadata plugin.
      • +
      • headers option headers : { 0 : { sortInitialOrder: "desc" } }.
      • +
      • header class name class="sortInitialOrder-desc".
      • +
      • overall sortInitialOrder option setting.
      • +
      +
    • +

    Demo

    @@ -53,9 +63,9 @@
    - + - + diff --git a/docs/example-options-headers.html b/docs/example-options-headers.html index 60d2584e..a696dcd1 100644 --- a/docs/example-options-headers.html +++ b/docs/example-options-headers.html @@ -2,7 +2,7 @@ - jQuery plugin: Tablesorter 2.0 - Disable sort using headers options + jQuery plugin: Tablesorter 2.0 - Disable sort @@ -18,16 +18,15 @@
    First Name Last NameAgeAge TotalDiscountDiscount Date
    First Name Last NameAgeAge TotalDiscountDiscount Date