From d257a015cc897bf61f957192da9004e28b497d31 Mon Sep 17 00:00:00 2001 From: Mottie Date: Fri, 25 Apr 2014 23:16:28 -0500 Subject: [PATCH] Core: add "emptyMin" & "emptyMax" settings to emptyTo option. Fixes #577 --- docs/index.html | 10 ++++++++-- js/jquery.tablesorter.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/index.html b/docs/index.html index 452335f7..f8e449d7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -827,12 +827,14 @@ String "bottom" - Boolean flag indicating how tablesorter should deal with empty table cells. (Modified v2.1.16). + Boolean flag indicating how tablesorter should deal with empty table cells. (Modified v2.1.16, v2.16.2).
Individual columns can be modified by adding the following (they all do the same thing), set in order of priority:
Example diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 1d5c64e6..3b8d1322 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -963,7 +963,7 @@ return (version[0] > 1) || (version[0] === 1 && parseInt(version[1], 10) >= 4); })($.fn.jquery.split(".")); // digit sort text location; keeping max+/- for backwards compatibility - c.string = { 'max': 1, 'min': -1, 'max+': 1, 'max-': -1, 'zero': 0, 'none': 0, 'null': 0, 'top': true, 'bottom': false }; + c.string = { 'max': 1, 'min': -1, 'emptyMin': 1, 'emptyMax': -1, 'zero': 0, 'none': 0, 'null': 0, 'top': true, 'bottom': false }; // add table theme class only if there isn't already one there if (!/tablesorter\-/.test($table.attr('class'))) { k = (c.theme !== '' ? ' tablesorter-' + c.theme : '');