version bump

This commit is contained in:
Rob Garrison 2016-03-01 23:00:22 -06:00
parent 5fc8ecb3e5
commit d089be2734
31 changed files with 331 additions and 211 deletions

View File

@ -92,6 +92,42 @@ If you would like to contribute, please...
View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.25.5">Version 2.25.5</a> (3/1/2016)
* Global:
* Replace array push functions in main loops.
* Docs:
* Update storage widget changes.
* Various corrections.
* Editable:
* Fix lint issue.
* Replace pasted content with plain text. Fixes [issue #994](https://github.com/Mottie/tablesorter/issues/994).
* Filter:
* Correctly use parsed data when set. Fixes [issue #502](https://github.com/Mottie/tablesorter/issues/502).
* Add `filter_matchType` option. Fixes [issue #1170](https://github.com/Mottie/tablesorter/issues/1170).
* Group:
* Use non-cached variables when added after core init. Fixes [issue #1158](https://github.com/Mottie/tablesorter/issues/1158).
* Math:
* General cleanup & optimization.
* Leave table in place or filter input lost. Fixes [issue #903](https://github.com/Mottie/tablesorter/issues/903).
* Print:
* Stop print event propagation from nested tables. Fixes [issue #1160](https://github.com/Mottie/tablesorter/issues/1160).
* Scroller:
* Move caption to cloned `thead`. Fixes [issue #1141](https://github.com/Mottie/tablesorter/issues/1141).
* Update to remove vertical scroll. See [pull #1165](https://github.com/Mottie/tablesorter/pull/1165); thanks [jasongabel](https://github.com/jasongabel)!
* Fix js error when no caption exists, oops! See [issue #1141](https://github.com/Mottie/tablesorter/issues/1141).
* Tweak code from [pull #1165](https://github.com/Mottie/tablesorter/pull/1165) to allow setting `scroller_height` to zero. Fixes [issue #907](https://github.com/Mottie/tablesorter/issues/907).
* StickyHeaders:
* Fixed memory leak in StickyHeaders. See [pull #1162](https://github.com/Mottie/tablesorter/pull/1162); thanks [Drumsticks1](https://github.com/Drumsticks1)!
* Modified StickyHeader widget for better performance. See [pull #1164](https://github.com/Mottie/tablesorter/pull/1164); thanks [Drumsticks1](https://github.com/Drumsticks1)!
* Storage:
* Allow setting a falsy value. Fixes [issue #1163](https://github.com/Mottie/tablesorter/issues/1163).
* Parser:
* Add huge number parser. See [issue #1161](https://github.com/Mottie/tablesorter/issues/1161).
* Huge number correction (make JSCS happy).
* Build:
* Update dependencies. Several times!
#### <a name="v2.25.4">Version 2.25.4</a> (2/15/2016)
* Core:
@ -125,16 +161,3 @@ View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes
* Add clarification about hiding columns. See [issue #1133](https://github.com/Mottie/tablesorter/issues/1133).
* Build:
* Update dependencies.
#### <a name="v2.25.2">Version 2.25.2</a> (1/15/2016)
* Docs:
* Update main demo & test to use jQuery 3.0.0-beta.
* Core:
* Revert extra header class name updating. See [issue #1116](https://github.com/Mottie/tablesorter/issues/1116).
* Filter:
* Add `filter_resetOnEsc` option. See [issue #1126](https://github.com/Mottie/tablesorter/issues/1126).
* Output:
* `output_saveRows` now accpets a [filter callback function](http://api.jquery.com/filter/#filter-function).
* Parsers:
* checkbox value should no longer change. Fixes [issue #1125](https://github.com/Mottie/tablesorter/issues/1125).

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
/*! tablesorter (FORK) - updated 03-01-2016 (v2.25.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.4 *//*
/*! TableSorter (FORK) v2.25.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -33,7 +33,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.4',
version : '2.25.5',
parsers : [],
widgets : [],
@ -745,7 +745,7 @@
}
}
if ( add ) {
ts.parsers.push( parser );
ts.parsers[ ts.parsers.length ] = parser;
}
},
@ -965,7 +965,7 @@
}
// ensure rowData is always in the same location (after the last column)
cols[ c.columns ] = rowData;
cache.normalized.push( cols );
cache.normalized[ cache.normalized.length ] = cols;
}
cache.colMax = colMax;
// total up rows, not including child rows
@ -1034,9 +1034,9 @@
});
}
if ( result !== false ) {
data.parsed.push( parsed );
data.raw.push( raw );
data.$cell.push( $cell );
data.parsed[ data.parsed.length ] = parsed;
data.raw[ data.raw.length ] = raw;
data.$cell[ data.$cell.length ] = $cell;
}
}
}
@ -1225,7 +1225,7 @@
}
primary = indx === 0 ? dir : primary;
group = [ col, parseInt( dir, 10 ) || 0 ];
c.sortList.push( group );
c.sortList[ c.sortList.length ] = group;
dir = $.inArray( group[ 1 ], order ); // fixes issue #167
c.sortVars[ col ].count = dir >= 0 ? dir : group[ 1 ] % ( c.sortReset ? 3 : 2 );
}
@ -1324,7 +1324,7 @@
},
addRows : function( c, $row, resort, callback ) {
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len,
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
cacheIndex, rowData, cells, cell, span,
// allow passing a row string if only one non-info tbody exists in the table
valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
@ -1359,12 +1359,13 @@
for ( rowIndex = 0; rowIndex < rows; rowIndex++ ) {
cacheIndex = 0;
len = $row[ rowIndex ].cells.length;
order = c.cache[ tbodyIndex ].normalized.length;
cells = [];
rowData = {
child : [],
raw : [],
$row : $row.eq( rowIndex ),
order : c.cache[ tbodyIndex ].normalized.length
order : order
};
// add each cell
for ( cellIndex = 0; cellIndex < len; cellIndex++ ) {
@ -1387,7 +1388,7 @@
// add the row data to the end
cells[ c.columns ] = rowData;
// update cache
c.cache[ tbodyIndex ].normalized.push( cells );
c.cache[ tbodyIndex ].normalized[ order ] = cells;
}
// resort using current settings
ts.checkResort( c, resort, callback );
@ -1429,7 +1430,7 @@
parsed = cache[ tbodyIndex ].normalized;
totalRows = parsed.length;
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
rows.push( parsed[ rowIndex ][ c.columns ].$row );
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
@ -1511,18 +1512,18 @@
arry = c.sortForce;
for ( indx = 0; indx < arry.length; indx++ ) {
if ( arry[ indx ][ 0 ] !== col ) {
c.sortList.push( arry[ indx ] );
c.sortList[ c.sortList.length ] = arry[ indx ];
}
}
}
// add column to sort list
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1551,11 +1552,11 @@
// add column to sort list array
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1592,7 +1593,7 @@
break;
}
}
c.sortList.push( [ arry[ indx ][ 0 ], dir ] );
c.sortList[ c.sortList.length ] = [ arry[ indx ][ 0 ], dir ];
}
}
}
@ -1859,7 +1860,7 @@
*/
addWidget : function( widget ) {
ts.widgets.push( widget );
ts.widgets[ ts.widgets.length ] = widget;
},
hasWidget : function( $table, name ) {
@ -1907,7 +1908,7 @@
len = widgets.length;
for ( indx = 0; indx < len; indx++ ) {
if ( widgets[ indx ].match( widgetClass ) ) {
c.widgets.push( widgets[ indx ].replace( widgetClass, '$1' ) );
c.widgets[ c.widgets.length ] = widgets[ indx ].replace( widgetClass, '$1' );
}
}
}
@ -1924,7 +1925,7 @@
applied = false;
// add widget name to option list so it gets reapplied after sorting, filtering, etc
if ( $.inArray( name, c.widgets ) < 0 ) {
c.widgets.push( name );
c.widgets[ c.widgets.length ] = name;
}
if ( c.debug ) { time = new Date(); }
@ -2034,7 +2035,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = ts.widgets[ indx ];
if ( widget && widget.id ) {
name.push( widget.id );
name[ name.length ] = widget.id;
}
}
} else {
@ -2075,7 +2076,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = widgets[ indx ];
if ( widget && widget.id && ( doAll || $.inArray( widget.id, curWidgets ) < 0 ) ) {
list.push( widget.id );
list[ list.length ] = widget.id;
}
}
ts.removeWidget( table, list.join( ',' ), true );
@ -2462,7 +2463,7 @@
console = {};
console.log = console.warn = console.error = console.table = function() {
var arg = arguments.length > 1 ? arguments : arguments[0];
ts.logs.push({ date: Date.now(), log: arg });
ts.logs[ ts.logs.length ] = { date: Date.now(), log: arg };
};
}
@ -2729,7 +2730,7 @@
})( jQuery );
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -2799,7 +2800,7 @@
}
}
// allow value to be an empty string too
if ((value || value === '') && window.JSON && JSON.hasOwnProperty('stringify')) {
if (typeof value !== 'undefined' && window.JSON && JSON.hasOwnProperty('stringify')) {
// add unique identifiers = url pathname > table ID/index on page > data
if (!values[url]) {
values[url] = {};
@ -3085,7 +3086,7 @@
})(jQuery);
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3132,6 +3133,7 @@
filter_hideFilters : false, // collapse filter row when mouse leaves the area
filter_ignoreCase : true, // if true, make all searches case-insensitive
filter_liveSearch : true, // if true, search column content while the user types ( with a delay )
filter_matchType : { 'input': 'exact', 'select': 'exact' }, // global query settings ('exact' or 'match'); overridden by "filter-match" or "filter-exact" class
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
@ -4058,7 +4060,7 @@
end = c.columns - 1;
}
for ( ; start <= end; start++ ) {
columns.push( start );
columns[ columns.length ] = start;
}
// remove processed range from val
val = val.replace( ranges[ indx ], '' );
@ -4072,7 +4074,7 @@
if ( singles[ i ] !== '' ) {
indx = parseInt( singles[ i ], 10 );
if ( indx < c.columns ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
}
@ -4080,7 +4082,7 @@
// return all columns
if ( !columns.length ) {
for ( indx = 0; indx < c.columns; indx++ ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
return columns;
@ -4116,6 +4118,24 @@
}
return filterMatched;
},
matchType: function( c, columnIndex ) {
var isMatch,
$el = c.$headerIndexed[ columnIndex ];
// filter-exact > filter-match > filter_matchType for type
if ( $el.hasClass( 'filter-exact' ) ) {
isMatch = false;
} else if ( $el.hasClass( 'filter-match' ) ) {
isMatch = true;
} else {
// filter-select is not applied when filter_functions are used, so look for a select
$el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
isMatch = $el.length ?
c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
// default to exact, if no inputs found
false;
}
return isMatch;
},
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
@ -4189,12 +4209,11 @@
// ignore if filter is empty or disabled
if ( data.filter ) {
data.cache = data.cacheArray[ columnIndex ];
result = data.rawArray[ columnIndex ] || '';
result = data.parsed[ columnIndex ] ? data.cache : data.rawArray[ columnIndex ] || '';
data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
data.exact.toLowerCase() : data.exact;
data.isMatch = c.$headerIndexed[ data.index ].hasClass( 'filter-match' );
data.isMatch = tsf.matchType( c, columnIndex );
result = showRow; // if showRow is true, show that row
@ -4389,7 +4408,7 @@
!( tsfRegex.isNeg1.test( val ) || tsfRegex.isNeg2.test( val ) ) &&
// if filtering using a select without a 'filter-match' class ( exact match ) - fixes #593
!( val !== '' && c.$filters && c.$filters.filter( '[data-column="' + indx + '"]' ).find( 'select' ).length &&
!c.$headerIndexed[indx].hasClass( 'filter-match' ) );
!tsf.matchType( c, indx ) );
}
}
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
@ -4578,13 +4597,13 @@
// table cell to the parser format function
if ( txt.text ) {
txt.parsed = parsedTxt;
parsed.push( txt );
parsed[ parsed.length ] = txt;
} else {
parsed.push({
parsed[ parsed.length ] = {
text : txt,
// check parser length - fixes #934
parsed : parsedTxt
});
};
}
}
// sort parsed select options
@ -4609,7 +4628,7 @@
arry = [];
len = parsed.length;
for ( indx = 0; indx < len; indx++ ) {
arry.push( parsed[indx] );
arry[ arry.length ] = parsed[indx];
}
return arry;
}
@ -4638,23 +4657,23 @@
if ( wo.filter_useParsedData ||
c.parsers[column].parsed ||
c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
arry.push( '' + cache.normalized[ rowIndex ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ column ];
// child row parsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
for ( indx = 0; indx < childLen; indx++ ) {
arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
}
}
} else {
// get raw cached data instead of content directly from the cells
arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
arry[ arry.length ] = cache.normalized[ rowIndex ][ c.columns ].raw[ column ];
// child row unparsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
for ( indx = 1; indx < childLen; indx++ ) {
child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
arry.push( '' + ts.getElementText( c, child, column ) );
arry[ arry.length ] = '' + ts.getElementText( c, child, column );
}
}
}
@ -4874,7 +4893,7 @@
})( jQuery );
/*! Widget: stickyHeaders - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison
*/
@ -4919,12 +4938,12 @@
}
wo.resize_flag = false;
};
checkSizes( false );
clearInterval(wo.resize_timer);
if (disable) {
wo.resize_flag = false;
return false;
}
checkSizes( false );
wo.resize_timer = setInterval(function() {
if (wo.resize_flag) { return; }
checkSizes();
@ -5157,7 +5176,7 @@
.add(wo.stickyHeaders_yScroll)
.add(wo.stickyHeaders_attachTo)
.unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') );
ts.addHeaderResizeEvent(table, false);
ts.addHeaderResizeEvent(table, true);
}
});

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.4 *//*
/*! TableSorter (FORK) v2.25.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -31,7 +31,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.4',
version : '2.25.5',
parsers : [],
widgets : [],
@ -743,7 +743,7 @@
}
}
if ( add ) {
ts.parsers.push( parser );
ts.parsers[ ts.parsers.length ] = parser;
}
},
@ -963,7 +963,7 @@
}
// ensure rowData is always in the same location (after the last column)
cols[ c.columns ] = rowData;
cache.normalized.push( cols );
cache.normalized[ cache.normalized.length ] = cols;
}
cache.colMax = colMax;
// total up rows, not including child rows
@ -1032,9 +1032,9 @@
});
}
if ( result !== false ) {
data.parsed.push( parsed );
data.raw.push( raw );
data.$cell.push( $cell );
data.parsed[ data.parsed.length ] = parsed;
data.raw[ data.raw.length ] = raw;
data.$cell[ data.$cell.length ] = $cell;
}
}
}
@ -1223,7 +1223,7 @@
}
primary = indx === 0 ? dir : primary;
group = [ col, parseInt( dir, 10 ) || 0 ];
c.sortList.push( group );
c.sortList[ c.sortList.length ] = group;
dir = $.inArray( group[ 1 ], order ); // fixes issue #167
c.sortVars[ col ].count = dir >= 0 ? dir : group[ 1 ] % ( c.sortReset ? 3 : 2 );
}
@ -1322,7 +1322,7 @@
},
addRows : function( c, $row, resort, callback ) {
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len,
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
cacheIndex, rowData, cells, cell, span,
// allow passing a row string if only one non-info tbody exists in the table
valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
@ -1357,12 +1357,13 @@
for ( rowIndex = 0; rowIndex < rows; rowIndex++ ) {
cacheIndex = 0;
len = $row[ rowIndex ].cells.length;
order = c.cache[ tbodyIndex ].normalized.length;
cells = [];
rowData = {
child : [],
raw : [],
$row : $row.eq( rowIndex ),
order : c.cache[ tbodyIndex ].normalized.length
order : order
};
// add each cell
for ( cellIndex = 0; cellIndex < len; cellIndex++ ) {
@ -1385,7 +1386,7 @@
// add the row data to the end
cells[ c.columns ] = rowData;
// update cache
c.cache[ tbodyIndex ].normalized.push( cells );
c.cache[ tbodyIndex ].normalized[ order ] = cells;
}
// resort using current settings
ts.checkResort( c, resort, callback );
@ -1427,7 +1428,7 @@
parsed = cache[ tbodyIndex ].normalized;
totalRows = parsed.length;
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
rows.push( parsed[ rowIndex ][ c.columns ].$row );
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
@ -1509,18 +1510,18 @@
arry = c.sortForce;
for ( indx = 0; indx < arry.length; indx++ ) {
if ( arry[ indx ][ 0 ] !== col ) {
c.sortList.push( arry[ indx ] );
c.sortList[ c.sortList.length ] = arry[ indx ];
}
}
}
// add column to sort list
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1549,11 +1550,11 @@
// add column to sort list array
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1590,7 +1591,7 @@
break;
}
}
c.sortList.push( [ arry[ indx ][ 0 ], dir ] );
c.sortList[ c.sortList.length ] = [ arry[ indx ][ 0 ], dir ];
}
}
}
@ -1857,7 +1858,7 @@
*/
addWidget : function( widget ) {
ts.widgets.push( widget );
ts.widgets[ ts.widgets.length ] = widget;
},
hasWidget : function( $table, name ) {
@ -1905,7 +1906,7 @@
len = widgets.length;
for ( indx = 0; indx < len; indx++ ) {
if ( widgets[ indx ].match( widgetClass ) ) {
c.widgets.push( widgets[ indx ].replace( widgetClass, '$1' ) );
c.widgets[ c.widgets.length ] = widgets[ indx ].replace( widgetClass, '$1' );
}
}
}
@ -1922,7 +1923,7 @@
applied = false;
// add widget name to option list so it gets reapplied after sorting, filtering, etc
if ( $.inArray( name, c.widgets ) < 0 ) {
c.widgets.push( name );
c.widgets[ c.widgets.length ] = name;
}
if ( c.debug ) { time = new Date(); }
@ -2032,7 +2033,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = ts.widgets[ indx ];
if ( widget && widget.id ) {
name.push( widget.id );
name[ name.length ] = widget.id;
}
}
} else {
@ -2073,7 +2074,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = widgets[ indx ];
if ( widget && widget.id && ( doAll || $.inArray( widget.id, curWidgets ) < 0 ) ) {
list.push( widget.id );
list[ list.length ] = widget.id;
}
}
ts.removeWidget( table, list.join( ',' ), true );
@ -2460,7 +2461,7 @@
console = {};
console.log = console.warn = console.error = console.table = function() {
var arg = arguments.length > 1 ? arguments : arguments[0];
ts.logs.push({ date: Date.now(), log: arg });
ts.logs[ ts.logs.length ] = { date: Date.now(), log: arg };
};
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
/*! tablesorter (FORK) - updated 03-01-2016 (v2.25.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function($) {
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -80,7 +80,7 @@
}
}
// allow value to be an empty string too
if ((value || value === '') && window.JSON && JSON.hasOwnProperty('stringify')) {
if (typeof value !== 'undefined' && window.JSON && JSON.hasOwnProperty('stringify')) {
// add unique identifiers = url pathname > table ID/index on page > data
if (!values[url]) {
values[url] = {};
@ -366,7 +366,7 @@
})(jQuery);
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -413,6 +413,7 @@
filter_hideFilters : false, // collapse filter row when mouse leaves the area
filter_ignoreCase : true, // if true, make all searches case-insensitive
filter_liveSearch : true, // if true, search column content while the user types ( with a delay )
filter_matchType : { 'input': 'exact', 'select': 'exact' }, // global query settings ('exact' or 'match'); overridden by "filter-match" or "filter-exact" class
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
@ -1339,7 +1340,7 @@
end = c.columns - 1;
}
for ( ; start <= end; start++ ) {
columns.push( start );
columns[ columns.length ] = start;
}
// remove processed range from val
val = val.replace( ranges[ indx ], '' );
@ -1353,7 +1354,7 @@
if ( singles[ i ] !== '' ) {
indx = parseInt( singles[ i ], 10 );
if ( indx < c.columns ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
}
@ -1361,7 +1362,7 @@
// return all columns
if ( !columns.length ) {
for ( indx = 0; indx < c.columns; indx++ ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
return columns;
@ -1397,6 +1398,24 @@
}
return filterMatched;
},
matchType: function( c, columnIndex ) {
var isMatch,
$el = c.$headerIndexed[ columnIndex ];
// filter-exact > filter-match > filter_matchType for type
if ( $el.hasClass( 'filter-exact' ) ) {
isMatch = false;
} else if ( $el.hasClass( 'filter-match' ) ) {
isMatch = true;
} else {
// filter-select is not applied when filter_functions are used, so look for a select
$el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
isMatch = $el.length ?
c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
// default to exact, if no inputs found
false;
}
return isMatch;
},
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
@ -1470,12 +1489,11 @@
// ignore if filter is empty or disabled
if ( data.filter ) {
data.cache = data.cacheArray[ columnIndex ];
result = data.rawArray[ columnIndex ] || '';
result = data.parsed[ columnIndex ] ? data.cache : data.rawArray[ columnIndex ] || '';
data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
data.exact.toLowerCase() : data.exact;
data.isMatch = c.$headerIndexed[ data.index ].hasClass( 'filter-match' );
data.isMatch = tsf.matchType( c, columnIndex );
result = showRow; // if showRow is true, show that row
@ -1670,7 +1688,7 @@
!( tsfRegex.isNeg1.test( val ) || tsfRegex.isNeg2.test( val ) ) &&
// if filtering using a select without a 'filter-match' class ( exact match ) - fixes #593
!( val !== '' && c.$filters && c.$filters.filter( '[data-column="' + indx + '"]' ).find( 'select' ).length &&
!c.$headerIndexed[indx].hasClass( 'filter-match' ) );
!tsf.matchType( c, indx ) );
}
}
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
@ -1859,13 +1877,13 @@
// table cell to the parser format function
if ( txt.text ) {
txt.parsed = parsedTxt;
parsed.push( txt );
parsed[ parsed.length ] = txt;
} else {
parsed.push({
parsed[ parsed.length ] = {
text : txt,
// check parser length - fixes #934
parsed : parsedTxt
});
};
}
}
// sort parsed select options
@ -1890,7 +1908,7 @@
arry = [];
len = parsed.length;
for ( indx = 0; indx < len; indx++ ) {
arry.push( parsed[indx] );
arry[ arry.length ] = parsed[indx];
}
return arry;
}
@ -1919,23 +1937,23 @@
if ( wo.filter_useParsedData ||
c.parsers[column].parsed ||
c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
arry.push( '' + cache.normalized[ rowIndex ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ column ];
// child row parsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
for ( indx = 0; indx < childLen; indx++ ) {
arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
}
}
} else {
// get raw cached data instead of content directly from the cells
arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
arry[ arry.length ] = cache.normalized[ rowIndex ][ c.columns ].raw[ column ];
// child row unparsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
for ( indx = 1; indx < childLen; indx++ ) {
child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
arry.push( '' + ts.getElementText( c, child, column ) );
arry[ arry.length ] = '' + ts.getElementText( c, child, column );
}
}
}
@ -2155,7 +2173,7 @@
})( jQuery );
/*! Widget: stickyHeaders - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison
*/
@ -2200,12 +2218,12 @@
}
wo.resize_flag = false;
};
checkSizes( false );
clearInterval(wo.resize_timer);
if (disable) {
wo.resize_flag = false;
return false;
}
checkSizes( false );
wo.resize_timer = setInterval(function() {
if (wo.resize_flag) { return; }
checkSizes();
@ -2438,7 +2456,7 @@
.add(wo.stickyHeaders_yScroll)
.add(wo.stickyHeaders_attachTo)
.unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') );
ts.addHeaderResizeEvent(table, false);
ts.addHeaderResizeEvent(table, true);
}
});

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Parser: hugeNumbers - updated 2/23/2016 (v2.25.5) */
/*! Parser: hugeNumbers - updated 3/1/2016 (v2.25.5) */
!function(a){"use strict";a.tablesorter.addParser({id:"hugeNumbers",is:function(){return!1},format:function(a){return a.replace(/\B(?=(\d{12})+(?!\d))/g,",")},type:"text"})}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
!function(a,b,c){"use strict";var d=a.tablesorter||{};d.storage=function(d,e,f,g){d=a(d)[0];var h,i,j,k=!1,l={},m=d.config,n=m&&m.widgetOptions,o=g&&g.useSessionStorage||n&&n.storage_useSessionStorage?"sessionStorage":"localStorage",p=a(d),q=g&&g.id||p.attr(g&&g.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||d.id||a(".tablesorter").index(p),r=g&&g.url||p.attr(g&&g.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||m&&m.fixedUrl||b.location.pathname;if(o in b)try{b[o].setItem("_tmptest","temp"),k=!0,b[o].removeItem("_tmptest")}catch(s){m&&m.debug&&console.warn(o+" is not supported in this browser")}return a.parseJSON&&(k?l=a.parseJSON(b[o][e]||"null")||{}:(i=c.cookie.split(/[;\s|=]/),h=a.inArray(e,i)+1,l=0!==h?a.parseJSON(i[h]||"null")||{}:{})),"undefined"!=typeof f&&b.JSON&&JSON.hasOwnProperty("stringify")?(l[r]||(l[r]={}),l[r][q]=f,k?b[o][e]=JSON.stringify(l):(j=new Date,j.setTime(j.getTime()+31536e6),c.cookie=e+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+j.toGMTString()+"; path=/"),void 0):l&&l[r]?l[r][q]:""}}(jQuery,window,document);

View File

@ -13,7 +13,7 @@
<script src="js/prettify.js"></script>
<script src="js/docs.js"></script>
<style>
th { width: 50%; }
th { width: 33%; }
</style>
<link href="../css/theme.blue.css" rel="stylesheet">
@ -21,6 +21,7 @@
<!-- load metric parser -->
<script src="../js/parsers/parser-named-numbers.js"></script>
<script src="../js/parsers/parser-huge-numbers.js"></script>
<script id="js">$(function() {
@ -44,6 +45,12 @@
<em>NOTE!</em>
</p>
<ul>
<li>In <span class="version">v2.25.5</span>, added an example that uses the huge number parser.
<ul>
<li>The largest number (<code>MAX_SAFE_INTEGER</code>) that javascript can handle is <code>9,007,199,254,740,991</code>.</li>
<li>Anything larger and the number gets rounded off, so that's why this parser was created.</li>
</ul>
</li>
<li>In <span class="version updated">v2.22.0</span>, this parser will now ignore commas, periods and quotes adjacent to the named number word (e.g. "10 million, three...").</li>
<li>This parser will convert named numbers into appropriate values so they are sorted correctly.</li>
<li>Named numbers include values:
@ -64,60 +71,74 @@
<tr>
<th class="sorter-namedNumbers">Numbers</th>
<th class="sorter-namedNumbers">Large Numbers</th>
<th class="sorter-hugeNumbers">Huge Numbers</th>
</tr>
</thead>
<tbody>
<tr>
<td>5 hundred</td>
<td>one hundred and fifty two million</td>
<td>110,000,000,000,000,001</td>
</tr>
<tr>
<td>four hundred thousand five hundred fourty three</td>
<td>710,231,000</td>
<td>110,000,000,000,000,000</td>
</tr>
<tr>
<td>one hundred and fifty five</td>
<td>10 million, three hundred sixty five thousand, four hundred and ninety one</td>
<td>110,000,000,000,000,005</td>
</tr>
<tr>
<td>negative twelve</td>
<td>10 million and three</td>
<td>110,000,000,000,000,003</td>
</tr>
<tr>
<td>minus three hundred and fifty seven thousand four hundred and two</td>
<td>6 billion eight thousand</td>
<td>110,000,000,000,000,012</td>
</tr>
<tr>
<td>zero</td>
<td>3 hundred quadrillion</td>
<td>110,000,000,000,000,002</td>
</tr>
<tr>
<td>three hundred twenty</td>
<td>145 decillion</td>
<td>110,000,000,000,000,010</td>
</tr>
<tr>
<td>forty-two</td>
<td>700 thousand</td>
<td>110,000,000,000,000,007</td>
</tr>
<tr>
<td>ninety-nine thousand nine hundred and ninety-nine</td>
<td>2.3 million</td>
<td>110,000,000,000,000,009</td>
</tr>
<tr>
<td>2.3 thousand</td>
<td>2.3 googl</td>
<td>110,000,000,000,000,008</td>
</tr>
<tr>
<td>minus one</td>
<td>8 hundred thousand</td>
<td>110,000,000,000,000,021</td>
</tr>
<tr>
<td>seven hundred fifty two</td>
<td>9 hundred-million</td>
<td>110,000,000,000,000,011</td>
</tr>
<tr>
<td>one hundred and thirty-three</td>
<td>Twenty-three trillion</td>
<td>110,000,000,000,000,100</td>
</tr>
</tbody>
</table></div>

View File

@ -456,7 +456,7 @@
<li><span class="label label-info">Beta</span> <a href="example-widget-chart.html">Chart Widget</a> (<span class="version">v2.19.0</span>; <span class="version updated">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17).</li>
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.25.1</span>).</li>
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.25.0</span>).</li>
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.25.5</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-dragtable.html">Dragtable mod</a> - (jQuery UI widget for column reordering [<a href="http://stackoverflow.com/a/27770224/145346">ref</a>]; <span class="version">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.25.5</span>):
<ul>
@ -475,13 +475,13 @@
<li><span class="label label-info">Beta</span> <a href="example-widget-formatter.html">Formatter widget</a> (<span class="version">v2.19.1</span>).</li>
<li>Grouping rows widget:
<ul>
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.25.4</span>).</li>
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.25.5</span>).</li>
<li><a href="example-widget-grouping-filter-childrows.html">Grouping + filter + child rows</a> (<span class="updated version">v2.15.12</span>).</li>
</ul>
</li>
<li><a href="example-widget-header-titles.html">Header titles widget</a> (v2.15.6; <span class="version updated">v2.24.4</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-lazyload.html">Lazyload widget</a> (<span class="version">v2.24.0</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.0</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.5</span>).</li>
<li>
<a href="example-widget-output.html">Output widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.2</span>).
<br><br>
@ -493,17 +493,17 @@
<br>
</li>
<li><a href="example-widget-print.html">Print widget</a> (<span class="version">v2.16.4</span>; <span class="version updated">v2.25.0</span>).</li>
<li><a href="example-widget-print.html">Print widget</a> (<span class="version">v2.16.4</span>; <span class="version updated">v2.25.5</span>).</li>
<li><a href="example-widget-reflow.html">Reflow widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.19.0</span>).</li>
<li><a href="example-widgets.html">Repeat headers widget</a> (v2.0.5; <span class="version updated">v2.19.0</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.24.3</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27; <span class="version updated">v2.24.0</span>).</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.24.0</span>).</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.25.5</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-to-hash.html">Sort-to-hash widget</a> (<span class="version">v2.22.4</span>; <span class="version updated">v2.24.4</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-tbodies.html">Sort tbodies widget</a> (<span class="version">v2.22.2</span>; <span class="version updated">v2.24.6</span>).</li>
<li><a href="example-widget-static-row.html">Static row widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.25.5</span>).</li>
<li><a href="example-widget-css-sticky-header.html">Sticky header (css3) widget</a> (<span class="version">v2.14.2</span>; <span class="version updated">v2.19.1</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li>
@ -526,6 +526,7 @@
<li><a href="example-parsers-duration.html">Duration parser</a> (<span class="version">v2.17.8</span>).</li>
<li><a href="example-parsers-feet-inch-fraction.html">Feet-inch-fraction parser</a> (<span class="version">v2.8</span>).</li>
<li><a href="example-parsers-file-type.html">File type &amp extension parsers</a> (<span class="version">v2.13</span>; <span class="version updated">v2.24.4</span>).</li>
<li><a href="example-parsers-named-numbers.html">Huge Numbers parser</a> (<span class="version">v2.25.5</span>).</li>
<li><a href="example-parsers-ignore-articles.html">Ignore leading articles parser</a> (Ignore &quot;A&quot;, &quot;An&quot; and &quot;The&quot; in titles) (<span class="version">v2.8</span>).</li>
<li><a href="example-widget-grouping.html">Input/select parsers</a> (used by Grouping rows widget) (<span class="version">v2.8</span>; <span class="version updated">v2.25.2</span>).</li>
<li><a href="example-parsers-globalize.html">jQuery Globalize</a> (number &amp; date parsers; <span class="version">v2.22.0</span>; <span class="version updated">v2.25.0</span>).</li>

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
/*! tablesorter (FORK) - updated 03-01-2016 (v2.25.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.4 *//*
/*! TableSorter (FORK) v2.25.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -39,7 +39,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.4',
version : '2.25.5',
parsers : [],
widgets : [],
@ -751,7 +751,7 @@
}
}
if ( add ) {
ts.parsers.push( parser );
ts.parsers[ ts.parsers.length ] = parser;
}
},
@ -971,7 +971,7 @@
}
// ensure rowData is always in the same location (after the last column)
cols[ c.columns ] = rowData;
cache.normalized.push( cols );
cache.normalized[ cache.normalized.length ] = cols;
}
cache.colMax = colMax;
// total up rows, not including child rows
@ -1040,9 +1040,9 @@
});
}
if ( result !== false ) {
data.parsed.push( parsed );
data.raw.push( raw );
data.$cell.push( $cell );
data.parsed[ data.parsed.length ] = parsed;
data.raw[ data.raw.length ] = raw;
data.$cell[ data.$cell.length ] = $cell;
}
}
}
@ -1231,7 +1231,7 @@
}
primary = indx === 0 ? dir : primary;
group = [ col, parseInt( dir, 10 ) || 0 ];
c.sortList.push( group );
c.sortList[ c.sortList.length ] = group;
dir = $.inArray( group[ 1 ], order ); // fixes issue #167
c.sortVars[ col ].count = dir >= 0 ? dir : group[ 1 ] % ( c.sortReset ? 3 : 2 );
}
@ -1330,7 +1330,7 @@
},
addRows : function( c, $row, resort, callback ) {
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len,
var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
cacheIndex, rowData, cells, cell, span,
// allow passing a row string if only one non-info tbody exists in the table
valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
@ -1365,12 +1365,13 @@
for ( rowIndex = 0; rowIndex < rows; rowIndex++ ) {
cacheIndex = 0;
len = $row[ rowIndex ].cells.length;
order = c.cache[ tbodyIndex ].normalized.length;
cells = [];
rowData = {
child : [],
raw : [],
$row : $row.eq( rowIndex ),
order : c.cache[ tbodyIndex ].normalized.length
order : order
};
// add each cell
for ( cellIndex = 0; cellIndex < len; cellIndex++ ) {
@ -1393,7 +1394,7 @@
// add the row data to the end
cells[ c.columns ] = rowData;
// update cache
c.cache[ tbodyIndex ].normalized.push( cells );
c.cache[ tbodyIndex ].normalized[ order ] = cells;
}
// resort using current settings
ts.checkResort( c, resort, callback );
@ -1435,7 +1436,7 @@
parsed = cache[ tbodyIndex ].normalized;
totalRows = parsed.length;
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
rows.push( parsed[ rowIndex ][ c.columns ].$row );
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
@ -1517,18 +1518,18 @@
arry = c.sortForce;
for ( indx = 0; indx < arry.length; indx++ ) {
if ( arry[ indx ][ 0 ] !== col ) {
c.sortList.push( arry[ indx ] );
c.sortList[ c.sortList.length ] = arry[ indx ];
}
}
}
// add column to sort list
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1557,11 +1558,11 @@
// add column to sort list array
dir = order[ c.sortVars[ col ].count ];
if ( dir < 2 ) {
c.sortList.push( [ col, dir ] );
c.sortList[ c.sortList.length ] = [ col, dir ];
// add other columns if header spans across multiple
if ( cell.colSpan > 1 ) {
for ( indx = 1; indx < cell.colSpan; indx++ ) {
c.sortList.push( [ col + indx, dir ] );
c.sortList[ c.sortList.length ] = [ col + indx, dir ];
// update count on columns in colSpan
c.sortVars[ col + indx ].count = $.inArray( dir, order );
}
@ -1598,7 +1599,7 @@
break;
}
}
c.sortList.push( [ arry[ indx ][ 0 ], dir ] );
c.sortList[ c.sortList.length ] = [ arry[ indx ][ 0 ], dir ];
}
}
}
@ -1865,7 +1866,7 @@
*/
addWidget : function( widget ) {
ts.widgets.push( widget );
ts.widgets[ ts.widgets.length ] = widget;
},
hasWidget : function( $table, name ) {
@ -1913,7 +1914,7 @@
len = widgets.length;
for ( indx = 0; indx < len; indx++ ) {
if ( widgets[ indx ].match( widgetClass ) ) {
c.widgets.push( widgets[ indx ].replace( widgetClass, '$1' ) );
c.widgets[ c.widgets.length ] = widgets[ indx ].replace( widgetClass, '$1' );
}
}
}
@ -1930,7 +1931,7 @@
applied = false;
// add widget name to option list so it gets reapplied after sorting, filtering, etc
if ( $.inArray( name, c.widgets ) < 0 ) {
c.widgets.push( name );
c.widgets[ c.widgets.length ] = name;
}
if ( c.debug ) { time = new Date(); }
@ -2040,7 +2041,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = ts.widgets[ indx ];
if ( widget && widget.id ) {
name.push( widget.id );
name[ name.length ] = widget.id;
}
}
} else {
@ -2081,7 +2082,7 @@
for ( indx = 0; indx < len; indx++ ) {
widget = widgets[ indx ];
if ( widget && widget.id && ( doAll || $.inArray( widget.id, curWidgets ) < 0 ) ) {
list.push( widget.id );
list[ list.length ] = widget.id;
}
}
ts.removeWidget( table, list.join( ',' ), true );
@ -2468,7 +2469,7 @@
console = {};
console.log = console.warn = console.error = console.table = function() {
var arg = arguments.length > 1 ? arguments : arguments[0];
ts.logs.push({ date: Date.now(), log: arg });
ts.logs[ ts.logs.length ] = { date: Date.now(), log: arg };
};
}
@ -2735,7 +2736,7 @@
})( jQuery );
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -2805,7 +2806,7 @@
}
}
// allow value to be an empty string too
if ((value || value === '') && window.JSON && JSON.hasOwnProperty('stringify')) {
if (typeof value !== 'undefined' && window.JSON && JSON.hasOwnProperty('stringify')) {
// add unique identifiers = url pathname > table ID/index on page > data
if (!values[url]) {
values[url] = {};
@ -3091,7 +3092,7 @@
})(jQuery);
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3138,6 +3139,7 @@
filter_hideFilters : false, // collapse filter row when mouse leaves the area
filter_ignoreCase : true, // if true, make all searches case-insensitive
filter_liveSearch : true, // if true, search column content while the user types ( with a delay )
filter_matchType : { 'input': 'exact', 'select': 'exact' }, // global query settings ('exact' or 'match'); overridden by "filter-match" or "filter-exact" class
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
@ -4064,7 +4066,7 @@
end = c.columns - 1;
}
for ( ; start <= end; start++ ) {
columns.push( start );
columns[ columns.length ] = start;
}
// remove processed range from val
val = val.replace( ranges[ indx ], '' );
@ -4078,7 +4080,7 @@
if ( singles[ i ] !== '' ) {
indx = parseInt( singles[ i ], 10 );
if ( indx < c.columns ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
}
@ -4086,7 +4088,7 @@
// return all columns
if ( !columns.length ) {
for ( indx = 0; indx < c.columns; indx++ ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
return columns;
@ -4122,6 +4124,24 @@
}
return filterMatched;
},
matchType: function( c, columnIndex ) {
var isMatch,
$el = c.$headerIndexed[ columnIndex ];
// filter-exact > filter-match > filter_matchType for type
if ( $el.hasClass( 'filter-exact' ) ) {
isMatch = false;
} else if ( $el.hasClass( 'filter-match' ) ) {
isMatch = true;
} else {
// filter-select is not applied when filter_functions are used, so look for a select
$el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
isMatch = $el.length ?
c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
// default to exact, if no inputs found
false;
}
return isMatch;
},
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
@ -4195,12 +4215,11 @@
// ignore if filter is empty or disabled
if ( data.filter ) {
data.cache = data.cacheArray[ columnIndex ];
result = data.rawArray[ columnIndex ] || '';
result = data.parsed[ columnIndex ] ? data.cache : data.rawArray[ columnIndex ] || '';
data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
data.exact.toLowerCase() : data.exact;
data.isMatch = c.$headerIndexed[ data.index ].hasClass( 'filter-match' );
data.isMatch = tsf.matchType( c, columnIndex );
result = showRow; // if showRow is true, show that row
@ -4395,7 +4414,7 @@
!( tsfRegex.isNeg1.test( val ) || tsfRegex.isNeg2.test( val ) ) &&
// if filtering using a select without a 'filter-match' class ( exact match ) - fixes #593
!( val !== '' && c.$filters && c.$filters.filter( '[data-column="' + indx + '"]' ).find( 'select' ).length &&
!c.$headerIndexed[indx].hasClass( 'filter-match' ) );
!tsf.matchType( c, indx ) );
}
}
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
@ -4584,13 +4603,13 @@
// table cell to the parser format function
if ( txt.text ) {
txt.parsed = parsedTxt;
parsed.push( txt );
parsed[ parsed.length ] = txt;
} else {
parsed.push({
parsed[ parsed.length ] = {
text : txt,
// check parser length - fixes #934
parsed : parsedTxt
});
};
}
}
// sort parsed select options
@ -4615,7 +4634,7 @@
arry = [];
len = parsed.length;
for ( indx = 0; indx < len; indx++ ) {
arry.push( parsed[indx] );
arry[ arry.length ] = parsed[indx];
}
return arry;
}
@ -4644,23 +4663,23 @@
if ( wo.filter_useParsedData ||
c.parsers[column].parsed ||
c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
arry.push( '' + cache.normalized[ rowIndex ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ column ];
// child row parsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
for ( indx = 0; indx < childLen; indx++ ) {
arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
}
}
} else {
// get raw cached data instead of content directly from the cells
arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
arry[ arry.length ] = cache.normalized[ rowIndex ][ c.columns ].raw[ column ];
// child row unparsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
for ( indx = 1; indx < childLen; indx++ ) {
child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
arry.push( '' + ts.getElementText( c, child, column ) );
arry[ arry.length ] = '' + ts.getElementText( c, child, column );
}
}
}
@ -4880,7 +4899,7 @@
})( jQuery );
/*! Widget: stickyHeaders - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison
*/
@ -4925,12 +4944,12 @@
}
wo.resize_flag = false;
};
checkSizes( false );
clearInterval(wo.resize_timer);
if (disable) {
wo.resize_flag = false;
return false;
}
checkSizes( false );
wo.resize_timer = setInterval(function() {
if (wo.resize_flag) { return; }
checkSizes();
@ -5163,7 +5182,7 @@
.add(wo.stickyHeaders_yScroll)
.add(wo.stickyHeaders_attachTo)
.unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') );
ts.addHeaderResizeEvent(table, false);
ts.addHeaderResizeEvent(table, true);
}
});

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.25.4 *//*
/*! TableSorter (FORK) v2.25.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -21,7 +21,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.4',
version : '2.25.5',
parsers : [],
widgets : [],

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
/*! tablesorter (FORK) - updated 03-01-2016 (v2.25.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function($) {
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -86,7 +86,7 @@
}
}
// allow value to be an empty string too
if ((value || value === '') && window.JSON && JSON.hasOwnProperty('stringify')) {
if (typeof value !== 'undefined' && window.JSON && JSON.hasOwnProperty('stringify')) {
// add unique identifiers = url pathname > table ID/index on page > data
if (!values[url]) {
values[url] = {};
@ -372,7 +372,7 @@
})(jQuery);
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -419,6 +419,7 @@
filter_hideFilters : false, // collapse filter row when mouse leaves the area
filter_ignoreCase : true, // if true, make all searches case-insensitive
filter_liveSearch : true, // if true, search column content while the user types ( with a delay )
filter_matchType : { 'input': 'exact', 'select': 'exact' }, // global query settings ('exact' or 'match'); overridden by "filter-match" or "filter-exact" class
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
@ -1345,7 +1346,7 @@
end = c.columns - 1;
}
for ( ; start <= end; start++ ) {
columns.push( start );
columns[ columns.length ] = start;
}
// remove processed range from val
val = val.replace( ranges[ indx ], '' );
@ -1359,7 +1360,7 @@
if ( singles[ i ] !== '' ) {
indx = parseInt( singles[ i ], 10 );
if ( indx < c.columns ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
}
@ -1367,7 +1368,7 @@
// return all columns
if ( !columns.length ) {
for ( indx = 0; indx < c.columns; indx++ ) {
columns.push( indx );
columns[ columns.length ] = indx;
}
}
return columns;
@ -1403,6 +1404,24 @@
}
return filterMatched;
},
matchType: function( c, columnIndex ) {
var isMatch,
$el = c.$headerIndexed[ columnIndex ];
// filter-exact > filter-match > filter_matchType for type
if ( $el.hasClass( 'filter-exact' ) ) {
isMatch = false;
} else if ( $el.hasClass( 'filter-match' ) ) {
isMatch = true;
} else {
// filter-select is not applied when filter_functions are used, so look for a select
$el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
isMatch = $el.length ?
c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
// default to exact, if no inputs found
false;
}
return isMatch;
},
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
@ -1476,12 +1495,11 @@
// ignore if filter is empty or disabled
if ( data.filter ) {
data.cache = data.cacheArray[ columnIndex ];
result = data.rawArray[ columnIndex ] || '';
result = data.parsed[ columnIndex ] ? data.cache : data.rawArray[ columnIndex ] || '';
data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
data.exact.toLowerCase() : data.exact;
data.isMatch = c.$headerIndexed[ data.index ].hasClass( 'filter-match' );
data.isMatch = tsf.matchType( c, columnIndex );
result = showRow; // if showRow is true, show that row
@ -1676,7 +1694,7 @@
!( tsfRegex.isNeg1.test( val ) || tsfRegex.isNeg2.test( val ) ) &&
// if filtering using a select without a 'filter-match' class ( exact match ) - fixes #593
!( val !== '' && c.$filters && c.$filters.filter( '[data-column="' + indx + '"]' ).find( 'select' ).length &&
!c.$headerIndexed[indx].hasClass( 'filter-match' ) );
!tsf.matchType( c, indx ) );
}
}
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
@ -1865,13 +1883,13 @@
// table cell to the parser format function
if ( txt.text ) {
txt.parsed = parsedTxt;
parsed.push( txt );
parsed[ parsed.length ] = txt;
} else {
parsed.push({
parsed[ parsed.length ] = {
text : txt,
// check parser length - fixes #934
parsed : parsedTxt
});
};
}
}
// sort parsed select options
@ -1896,7 +1914,7 @@
arry = [];
len = parsed.length;
for ( indx = 0; indx < len; indx++ ) {
arry.push( parsed[indx] );
arry[ arry.length ] = parsed[indx];
}
return arry;
}
@ -1925,23 +1943,23 @@
if ( wo.filter_useParsedData ||
c.parsers[column].parsed ||
c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
arry.push( '' + cache.normalized[ rowIndex ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ column ];
// child row parsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
for ( indx = 0; indx < childLen; indx++ ) {
arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
}
}
} else {
// get raw cached data instead of content directly from the cells
arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
arry[ arry.length ] = cache.normalized[ rowIndex ][ c.columns ].raw[ column ];
// child row unparsed data
if ( wo.filter_childRows && wo.filter_childByColumn ) {
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
for ( indx = 1; indx < childLen; indx++ ) {
child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
arry.push( '' + ts.getElementText( c, child, column ) );
arry[ arry.length ] = '' + ts.getElementText( c, child, column );
}
}
}
@ -2161,7 +2179,7 @@
})( jQuery );
/*! Widget: stickyHeaders - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison
*/
@ -2206,12 +2224,12 @@
}
wo.resize_flag = false;
};
checkSizes( false );
clearInterval(wo.resize_timer);
if (disable) {
wo.resize_flag = false;
return false;
}
checkSizes( false );
wo.resize_timer = setInterval(function() {
if (wo.resize_flag) { return; }
checkSizes();
@ -2444,7 +2462,7 @@
.add(wo.stickyHeaders_yScroll)
.add(wo.stickyHeaders_attachTo)
.unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') );
ts.addHeaderResizeEvent(table, false);
ts.addHeaderResizeEvent(table, true);
}
});

View File

@ -1,4 +1,4 @@
/*! Parser: hugeNumbers - updated 2/23/2016 (v2.25.5) *//*
/*! Parser: hugeNumbers - updated 3/1/2016 (v2.25.5) *//*
* See https://github.com/Mottie/tablesorter/issues/1161
*/
/*jshint jquery:true */

View File

@ -1,4 +1,4 @@
/*! Widget: editable - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: editable - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: grouping - updated 2/15/2016 (v2.25.4) *//*
/*! Widget: grouping - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: math - updated 12/13/2015 (v2.25.0) *//*
/*! Widget: math - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.16+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/* Widget: print - updated 12/13/2015 (v2.25.0) *//*
/* Widget: print - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.2.6+
*/
/*jshint browser:true, jquery:true, unused:false */

View File

@ -1,4 +1,4 @@
/*! Widget: scroller - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: scroller - updated 3/1/2016 (v2.25.5) *//*
Copyright (C) 2011 T. Connell & Associates, Inc.
Dual-licensed under the MIT and GPL licenses

View File

@ -1,4 +1,4 @@
/*! Widget: stickyHeaders - updated 10/31/2015 (v2.24.0) *//*
/*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: storage - updated 3/26/2015 (v2.21.3) */
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.25.4",
"version": "2.25.5",
"description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.",
"author": {
"name": "Christian Bach",

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.25.4",
"version": "2.25.5",
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
"author": {
"name": "Christian Bach",