mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: add "emptyMin" & "emptyMax" settings to emptyTo option. Fixes #577
This commit is contained in:
parent
03ab6d638b
commit
d257a015cc
@ -827,12 +827,14 @@
|
||||
<td>String</td>
|
||||
<td>"bottom"</td>
|
||||
<td>
|
||||
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, <span class="version updated">v2.16.2</span>).
|
||||
<div class="collapsible">
|
||||
<ul>
|
||||
<li><code>bottom</code> - sort empty table cells to the bottom.</li>
|
||||
<li><code>top</code> - sort empty table cells to the top.</li>
|
||||
<li><code>none</code> or <code>zero</code> - sort empty table cells as if the cell has the value equal to zero.</li>
|
||||
<li><code>emptyMax</code> - sort empty table cells as having a value greater than the <em>max</em> (more positive) value (added <span class="version">v2.16.2</span>).</li>
|
||||
<li><code>emptyMin</code> - sort empty table cells as having a value greater than the <em>min</em> (more negative) value (added <span class="version">v2.16.2</span>).</li>
|
||||
</ul>
|
||||
Individual columns can be modified by adding the following (they all do the same thing), set in order of priority:
|
||||
<ul>
|
||||
@ -3525,7 +3527,9 @@ This ajaxProcessing function must return an object with "total", "headers" and "
|
||||
<td><a href="#" class="permalink">addRows</a></td>
|
||||
<td>Use this method to add table rows (v2.0.16; <span class="version updated">v2.16.1</span>).
|
||||
<div class="collapsible">
|
||||
<br>
|
||||
It does not work the same as "update" in that it only adds rows, it does not remove them.<br>
|
||||
<br>
|
||||
Also, use this method to add table rows while using the pager plugin. If the "update" method is used, only the visible table rows continue to exist.
|
||||
<pre class="prettyprint lang-js">// Add multiple rows to the table
|
||||
var row = '<tr><td>Inigo</td><td>Montoya</td><td>34</td>' +
|
||||
@ -3540,7 +3544,9 @@ This ajaxProcessing function must return an object with "total", "headers" and "
|
||||
};
|
||||
$('table')
|
||||
.find('tbody').append($row)
|
||||
.trigger('addRows', [$row, resort, callback]);</pre></div>
|
||||
.trigger('addRows', [$row, resort, callback]);</pre>
|
||||
In <span class="version">v2.16.1</span>, the <code>$row</code> parameter can be an HTML string, row DOM element or jQuery object.
|
||||
</div>
|
||||
</td>
|
||||
<td><a href="example-add-rows.html">Example</a></td>
|
||||
</tr>
|
||||
|
@ -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 : '');
|
||||
|
Loading…
Reference in New Issue
Block a user