From 4e1c96d4378fd2dbb65ad3c07c17d519517fd4de Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 12 Dec 2015 20:41:27 -0600 Subject: [PATCH] Math: lots of tweaks. See #1083 - Initial calculation performed once - changed binding to either "filterEnd" or "pagerComplete", not both. - Added change flag so a cache update is only performed when cell content inside of a sortable tbody was modified. - Fix data-math-filter on "all" cell calculation with fixes to getRow & getColumn functions so that filters get priority over the "filtered" row check. --- docs/example-widget-math.html | 70 ++++++++++----- js/widgets/widget-math.js | 160 +++++++++++++++++++++------------- 2 files changed, 150 insertions(+), 80 deletions(-) diff --git a/docs/example-widget-math.html b/docs/example-widget-math.html index a51614b4..86e5ffb8 100644 --- a/docs/example-widget-math.html +++ b/docs/example-widget-math.html @@ -18,7 +18,7 @@ - + @@ -182,7 +182,15 @@
  • In v2.24.7
  • In v2.24.6, added math_rowFilter option.
  • @@ -192,25 +200,36 @@
  • Added math_none option which allows customizing the text added to a cell when there are no matching math elements (.
  • -
  • In v2.22.0, + + +
    +

    Older Notes

    +
      -
    • Fixed an issue with a sum column encountering a cell without a defined "data-math" attribute returning an empty string instead of zero. See issue #873.
    • -
    • Fixed a javascript error occurring on empty tables & now all updates will reapply column indexing to tbody cells - I know this isn't ideal as it would be slow on larger tables.
    • +
    • In v2.22.0, +
        +
      • Fixed an issue with a sum column encountering a cell without a defined "data-math" attribute returning an empty string instead of zero. See issue #873.
      • +
      • Fixed a javascript error occurring on empty tables & now all updates will reapply column indexing to tbody cells - I know this isn't ideal as it would be slow on larger tables.
      • +
      +
    • +
    • In v2.19.1, added math_event option & fixed an issue with event unbinding in jQuery version < 1.9.
    • +
    • In v2.17.1, +
        +
      • Values added to the data-attribute set by the textAttribute option will now be used in the calculation instead of the actual cell content.
      • +
      • The Grand Total cells now shows a higher precision value to emphasize this point.
      • +
      +
    • +
    • In v2.16.4, added: +
        +
      • Two new options: math_prefix and math_suffix, which will be added before or after the prefix or suffix, respectively.
      • +
      • Added "Mask Examples" section with examples, and how to use the $.tablesorter.formatMask function.
      • +
      +
    -
  • -
  • In v2.19.1, added math_event option & fixed an issue with event unbinding in jQuery version < 1.9.
  • -
  • In v2.17.1, - -
  • -
  • In v2.16.4, added: -
    -
  • + + + +