mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
emptyToBottom updates
This commit is contained in:
parent
2974c7b8d4
commit
a5607ae960
@ -35,6 +35,12 @@ tablesorter can successfully parse and sort many types of data including linked
|
||||
|
||||
View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change).
|
||||
|
||||
#### Version 2.1.15 (4/18/2012)
|
||||
|
||||
* Modified the `emptyAtBottom` option:
|
||||
* Clarified that setting this option to `null` will treat empty cells as if they had a value of zero. Fix for [issue #48](https://github.com/Mottie/tablesorter/issues/48).
|
||||
* Modified the script so that empty cells do not call their respective parser to keep the `emptyAtBottom` functionality working properly. Fix for [issue #49](https://github.com/Mottie/tablesorter/issues/49).
|
||||
|
||||
#### Version 2.1.14 (4/17/2012)
|
||||
|
||||
* Updated "shortDate" parser to include the time, if provided. I've also updated the [Changing the date format](http://mottie.github.com/tablesorter/docs/example-option-date-format.html) demo with a few times.
|
||||
|
@ -51,7 +51,7 @@ $(function(){
|
||||
<ul>
|
||||
<li>true - sort empty table cells to the bottom.</li>
|
||||
<li>false - sort empty table cells to the top.</li>
|
||||
<li>null - sort empty table cells as if the cell has the lowest value (less than "a" and "0").</li>
|
||||
<li>null - sort empty table cells as if the cell has the value equal to zero.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
@ -121,6 +121,33 @@ Set <code class="hilight">emptyToBottom</code> option: <select>
|
||||
<td>23%</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A109</td>
|
||||
<td>Larry</td>
|
||||
<td>Stevens</td>
|
||||
<td>56</td>
|
||||
<td>153.19</td>
|
||||
<td>23%</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A99</td>
|
||||
<td>John</td>
|
||||
<td>Smithy</td>
|
||||
<td>56</td>
|
||||
<td>156</td>
|
||||
<td>22%</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A119</td>
|
||||
<td>Mike</td>
|
||||
<td>Rowe</td>
|
||||
<td>55</td>
|
||||
<td>-53.99</td>
|
||||
<td>13%</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* TableSorter 2.1.14 - Client-side table sorting with ease!
|
||||
* TableSorter 2.1.15 - Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
* Copyright (c) 2007 Christian Bach
|
||||
@ -18,7 +18,7 @@
|
||||
$.extend({
|
||||
tablesorter: new function(){
|
||||
|
||||
this.version = "2.1.14";
|
||||
this.version = "2.1.15";
|
||||
|
||||
var parsers = [], widgets = [], tbl;
|
||||
this.defaults = {
|
||||
@ -203,7 +203,7 @@
|
||||
for (j = 0; j < totalCells; ++j) {
|
||||
t = trimAndGetNodeText(table.config, c[0].cells[j], j);
|
||||
// don't bother parsing if the string is empty - previously parsing would change it to zero
|
||||
cols.push( parsers[j].format(t, table, c[0].cells[j], j) );
|
||||
cols.push( t === '' ? '' : parsers[j].format(t, table, c[0].cells[j], j) );
|
||||
}
|
||||
cols.push(cache.normalized.length); // add position for rowCache
|
||||
cache.normalized.push(cols);
|
||||
|
4
js/jquery.tablesorter.min.js
vendored
4
js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"version": "2.1.14",
|
||||
"version": "2.1.15",
|
||||
"title": "tablesorter",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
Loading…
Reference in New Issue
Block a user