version bump

This commit is contained in:
Rob Garrison 2016-07-11 07:42:19 -05:00
parent 4e5add0052
commit 288a06e6cf
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
31 changed files with 294 additions and 193 deletions

View File

@ -101,6 +101,37 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.26.6">Version 2.26.6</a> (7/11/2016)
* Global: Fix "updated" date in various widgets & pager.
* Docs:
* Cleanup links & license. Fixes [issue #1244](https://github.com/Mottie/tablesorter/issues/1244).
* Add button type to all buttons.
* Update to jQuery v3.1.0.
* Core: Prevent undefined error in natural sort. See [issue #1151](https://github.com/Mottie/tablesorter/issues/1151).
* Column Selector: Check visibility of cells after colspan. See [issue #1238](https://github.com/Mottie/tablesorter/issues/1238).
* Filter
* Filter formatter for Select2 v3.4.6 (v4.0+ still not supported)
* Now adheres to case sensitivity setting. See [issue #1237](https://github.com/Mottie/tablesorter/issues/1237).
* Update after filter row rebuilt. See [issue #1237](https://github.com/Mottie/tablesorter/issues/1237).
* Properly remove case-insensitive flag in regex.
* Properly escaped characters in regex.
* Use uncached `widgetOptions` after inside events.
* `filter_hideFilters` option now accepts a function. See [issue #477](https://github.com/Mottie/tablesorter/issues/477).
* Grouping:
* Fix js error when storage isn't loaded.
* Fix `group_collapsed` behavior. See [issue #1247](https://github.com/Mottie/tablesorter/issues/1247).
* Pager:
* Prevent ajax call on init. See [issue #1196](https://github.com/Mottie/tablesorter/issues/1196).
* Prevent setting "all" value before initialization. See [issue #1196](https://github.com/Mottie/tablesorter/issues/1196).
* Scroller: Save scroll position of window. See [issue #1240](https://github.com/Mottie/tablesorter/issues/1240).
* UITheme: Modify filter row after filterInit.
* View:
* Update to get the raw text value of a column without the span wrap.
* Trigger "viewComplete" in the view builder, not in init, otherwise you get no trigger when switching views.
* Replace all instances, not just the first one.
* Bower: Add license identifiers. See [pull #1239](https://github.com/Mottie/tablesorter/pull/1239); thanks [@bckfnn](https://github.com/bckfnn)!
#### <a name="v2.26.5">Version 2.26.5</a> (6/28/2016)
* Docs:
@ -122,14 +153,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
#### <a name="v2.26.4">Version 2.26.4</a> (6/15/2016)
* Version bump due to merging issues.
#### <a name="v2.26.3">Version 2.26.3</a> (6/15/2016)
* Distribution: Provide source css & js files on CDNJS. Fixes [issue #1222](https://github.com/Mottie/tablesorter/issues/1222).
* Readme:
* Make changelog link clickable. See [pull #1221](https://github.com/Mottie/tablesorter/pull/1221); thanks [@aried3r](https://github.com/aried3r)!
* Update badge for ZenHub.
* Docs: Update main page to use jQuery 3.0.0-rc1 & add migrate.
* Filter: Fix select2 lint issue.
* Scroller: Hide `<col>` with hidden columns. Fixes [issue #1229](https://github.com/Mottie/tablesorter/issues/1229).
* Grunt: Update dependencies & fix pager indentation.

View File

@ -1,6 +1,6 @@
/*!
* tablesorter (FORK) pager plugin
* updated 6/28/2016 (v2.26.5)
* updated 7/11/2016 (v2.26.6)
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
/* 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.26.5 *//*
/*! TableSorter (FORK) v2.26.6 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -33,7 +33,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.26.5',
version : '2.26.6',
parsers : [],
widgets : [],
@ -1771,14 +1771,14 @@
regex = ts.regex;
// first try and sort Hex codes
if ( regex.hex.test( b ) ) {
aNum = parseInt( a.match( regex.hex ), 16 );
bNum = parseInt( b.match( regex.hex ), 16 );
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
if ( aNum < bNum ) { return -1; }
if ( aNum > bNum ) { return 1; }
}
// chunk/tokenize
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
max = Math.max( aNum.length, bNum.length );
// natural sorting through split numeric strings and default strings
for ( indx = 0; indx < max; indx++ ) {
@ -2833,7 +2833,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -2891,7 +2891,7 @@
id: 'uitheme',
priority: 10,
format: function(table, c, wo) {
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
@ -2958,10 +2958,20 @@
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
.addClass(themes.icons || '');
}
if ($table.hasClass('hasFilters')) {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
};
if (wo.filter_initialized) {
tmp();
} else {
$table.one('filterInit', function() {
tmp();
});
}
}
}
for (i = 0; i < c.columns; i++) {
@ -3098,7 +3108,7 @@
})(jQuery);
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3885,12 +3895,13 @@
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
wo = table.config.widgetOptions; // make sure "wo" isn't cached
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
@ -3917,7 +3928,8 @@
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'input' && this.value === '' ) ) {
@ -3966,7 +3978,7 @@
// show/hide filter row as needed
c.$table
.find( '.' + tscss.filterRow )
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
@ -3999,26 +4011,34 @@
return false;
}
},
hideFiltersCheck: function( c ) {
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
var val = c.widgetOptions.filter_hideFilters( c );
if (typeof val === 'boolean') {
return val;
}
}
return ts.getFilters( c.$table ).join( '' ) === '';
},
hideFilters: function( c, $table ) {
var timer,
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
$row
var timer;
( $table || c.$table )
.find( '.' + tscss.filterRow )
.addClass( tscss.filterRowHide )
.bind( 'mouseenter mouseleave', function( e ) {
// save event object - http://bugs.jquery.com/ticket/12140
var event = e,
$filterRow = $( this );
$row = $( this );
clearTimeout( timer );
timer = setTimeout( function() {
if ( /enter|over/.test( event.type ) ) {
$filterRow.removeClass( tscss.filterRowHide );
$row.removeClass( tscss.filterRowHide );
} else {
// don't hide if input has focus
// $( ':focus' ) needs jQuery 1.6+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
// don't hide row if any filter has a value
if ( c.lastCombinedFilter === '' ) {
$filterRow.addClass( tscss.filterRowHide );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
}
}
}, 200 );
@ -4030,9 +4050,7 @@
timer = setTimeout( function() {
clearTimeout( timer );
// don't hide row if any filter has a value
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
}, 200 );
});
},
@ -5226,7 +5244,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.26.5 *//*
/*! TableSorter (FORK) v2.26.6 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -31,7 +31,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.26.5',
version : '2.26.6',
parsers : [],
widgets : [],
@ -1769,14 +1769,14 @@
regex = ts.regex;
// first try and sort Hex codes
if ( regex.hex.test( b ) ) {
aNum = parseInt( a.match( regex.hex ), 16 );
bNum = parseInt( b.match( regex.hex ), 16 );
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
if ( aNum < bNum ) { return -1; }
if ( aNum > bNum ) { return 1; }
}
// chunk/tokenize
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
max = Math.max( aNum.length, bNum.length );
// natural sorting through split numeric strings and default strings
for ( indx = 0; indx < max; indx++ ) {

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -101,7 +101,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -159,7 +159,7 @@
id: 'uitheme',
priority: 10,
format: function(table, c, wo) {
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
@ -226,10 +226,20 @@
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
.addClass(themes.icons || '');
}
if ($table.hasClass('hasFilters')) {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
};
if (wo.filter_initialized) {
tmp();
} else {
$table.one('filterInit', function() {
tmp();
});
}
}
}
for (i = 0; i < c.columns; i++) {
@ -366,7 +376,7 @@
})(jQuery);
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1153,12 +1163,13 @@
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
wo = table.config.widgetOptions; // make sure "wo" isn't cached
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
@ -1185,7 +1196,8 @@
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'input' && this.value === '' ) ) {
@ -1234,7 +1246,7 @@
// show/hide filter row as needed
c.$table
.find( '.' + tscss.filterRow )
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
@ -1267,26 +1279,34 @@
return false;
}
},
hideFiltersCheck: function( c ) {
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
var val = c.widgetOptions.filter_hideFilters( c );
if (typeof val === 'boolean') {
return val;
}
}
return ts.getFilters( c.$table ).join( '' ) === '';
},
hideFilters: function( c, $table ) {
var timer,
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
$row
var timer;
( $table || c.$table )
.find( '.' + tscss.filterRow )
.addClass( tscss.filterRowHide )
.bind( 'mouseenter mouseleave', function( e ) {
// save event object - http://bugs.jquery.com/ticket/12140
var event = e,
$filterRow = $( this );
$row = $( this );
clearTimeout( timer );
timer = setTimeout( function() {
if ( /enter|over/.test( event.type ) ) {
$filterRow.removeClass( tscss.filterRowHide );
$row.removeClass( tscss.filterRowHide );
} else {
// don't hide if input has focus
// $( ':focus' ) needs jQuery 1.6+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
// don't hide row if any filter has a value
if ( c.lastCombinedFilter === '' ) {
$filterRow.addClass( tscss.filterRowHide );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
}
}
}, 200 );
@ -1298,9 +1318,7 @@
timer = setTimeout( function() {
clearTimeout( timer );
// don't hide row if any filter has a value
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
}, 200 );
});
},
@ -2494,7 +2512,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: filter, select2 formatter function - updated 5/28/2016 (v2.26.2) */
!function(a){"use strict";var b=a.tablesorter||{};b.filterFormatter=b.filterFormatter||{},b.filterFormatter.select2=function(c,d,e){var f,g,h=a.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},e),i=c.addClass("select2col"+d).closest("table")[0].config,j=i.widgetOptions,k=a('<input class="filter" type="hidden">').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=this.value;a=a.replace(/[\/()$^]/g,"").split("|"),c.find(".select2").select2("val",a),r()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=[],o=h.match?"":"^",p=h.match?"":"$",q=j.filter_ignoreCase?"i":"",r=function(){var b=!1,d=c.find(".select2").select2("val")||h.value||"";a.isArray(d)&&(b=!0,d=d.join("\x00")),d=d.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),b&&(d=d.split("\x00")),k.val(a.isArray(d)&&d.length&&""!==d.join("")?"/("+o+(d||[]).join(p+"|"+o)+p+")/"+q:"").trigger("search").end().find(".select2").select2("val",d),n.length&&n.find(".select2").select2("val",d)},s=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:""+b.parsed,text:b.text})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend("<label>"+h.cellText+"</label>"),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(s(),m&&i.$table.bind("filterEnd",function(){s(),c.add(n).find(".select2").select2(h)})),a('<input class="select2 select2-'+d+'" type="hidden" />').val(h.value).appendTo(c).select2(h).bind("change",function(){r()}),i.$table.bind("filterFomatterUpdate",function(){var a=i.$table.data("lastSearch")[d]||"";a=a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|"),c=i.$table.find(".select2col"+d),c.find(".select2").select2("val",a),r(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){n=i.widgetOptions.$sticky.find("."+b.css.filterRow).children().eq(d).empty(),a('<input class="select2 select2-'+d+'" type="hidden">').val(h.value).appendTo(n).select2(h).bind("change",function(){c.find(".select2").select2("val",n.find(".select2").select2("val")),r()}),h.cellText&&n.prepend("<label>"+h.cellText+"</label>")}),i.$table.bind("filterReset",function(){c.find(".select2").select2("val",h.value||""),setTimeout(function(){r()},0)}),r(),k}}(jQuery);
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
!function(a){"use strict";var b=a.tablesorter||{};b.filterFormatter=b.filterFormatter||{},b.filterFormatter.select2=function(c,d,e){var f,g,h=a.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},e),i=c.addClass("select2col"+d).closest("table")[0].config,j=i.widgetOptions,k=a('<input class="filter" type="hidden">').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=q(this.value);i.$table.find(".select2col"+d+" .select2").select2("val",a),r()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=h.match?"":"^",o=h.match?"":"$",p=j.filter_ignoreCase?"i":"",q=function(a){return a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},r=function(){var b=!1,c=i.$table.find(".select2col"+d+" .select2").select2("val")||h.value||"";a.isArray(c)&&(b=!0,c=c.join("\x00")),c=c.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),b&&(c=c.split("\x00")),k.val(a.isArray(c)&&c.length&&""!==c.join("")?"/("+n+(c||[]).join(o+"|"+n)+o+")/"+p:"").trigger("search").end().find(".select2").select2("val",c),i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val",c)},s=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:""+b.parsed,text:b.text})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend("<label>"+h.cellText+"</label>"),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(s(),i.$table.bind("filterEnd",function(){s(),i.$table.find(".select2col"+d).add(i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d)).find(".select2").select2(h)})),a('<input class="select2 select2-'+d+'" type="hidden" />').val(h.value).appendTo(c).select2(h).bind("change",function(){r()}),i.$table.bind("filterFomatterUpdate",function(){var a=q(i.$table.data("lastSearch")[d]||"");c=i.$table.find(".select2col"+d),c.find(".select2").select2("val",a),r(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){var b=i.widgetOptions.$sticky.find(".select2col"+d).empty();a('<input class="select2 select2-'+d+'" type="hidden">').val(h.value).appendTo(b).select2(h).bind("change",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val")),r()}),h.cellText&&b.prepend("<label>"+h.cellText+"</label>")}),i.$table.bind("filterReset",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",h.value||""),setTimeout(function(){r()},0)}),r(),k}}(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

View File

@ -1,2 +1,2 @@
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
!function(a){"use strict";var b=a.tablesorter||{};b.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s",iconSortAsc:"ui-icon-carat-1-n",iconSortDesc:"ui-icon-carat-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},a.extend(b.css,{wrapper:"tablesorter-wrapper"}),b.addWidget({id:"uitheme",priority:10,format:function(c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s=b.themes,t=d.$table.add(a(d.namespace+"_extra_table")),u=d.$headers.add(a(d.namespace+"_extra_headers")),v=d.theme||"jui",w=s[v]||{},x=a.trim([w.sortNone,w.sortDesc,w.sortAsc,w.active].join(" ")),y=a.trim([w.iconSortNone,w.iconSortDesc,w.iconSortAsc].join(" "));for(d.debug&&(j=new Date),t.hasClass("tablesorter-"+v)&&d.theme===d.appliedTheme&&e.uitheme_applied||(e.uitheme_applied=!0,o=s[d.appliedTheme]||{},r=!a.isEmptyObject(o),p=r?[o.sortNone,o.sortDesc,o.sortAsc,o.active].join(" "):"",q=r?[o.iconSortNone,o.iconSortDesc,o.iconSortAsc].join(" "):"",r&&(e.zebra[0]=a.trim(" "+e.zebra[0].replace(" "+o.even,"")),e.zebra[1]=a.trim(" "+e.zebra[1].replace(" "+o.odd,"")),d.$tbodies.children().removeClass([o.even,o.odd].join(" "))),w.even&&(e.zebra[0]+=" "+w.even),w.odd&&(e.zebra[1]+=" "+w.odd),t.children("caption").removeClass(o.caption||"").addClass(w.caption),m=t.removeClass((d.appliedTheme?"tablesorter-"+(d.appliedTheme||""):"")+" "+(o.table||"")).addClass("tablesorter-"+v+" "+(w.table||"")).children("tfoot"),d.appliedTheme=d.theme,m.length&&m.children("tr").removeClass(o.footerRow||"").addClass(w.footerRow).children("th, td").removeClass(o.footerCells||"").addClass(w.footerCells),u.removeClass((r?[o.header,o.hover,p].join(" "):"")||"").addClass(w.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(b){a(this)["mouseenter"===b.type?"addClass":"removeClass"](w.hover||"")}),u.each(function(){var c=a(this);c.find("."+b.css.wrapper).length||c.wrapInner('<div class="'+b.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),d.cssIcon&&u.find("."+b.css.icon).removeClass(r?[o.icons,q].join(" "):"").addClass(w.icons||""),d.widgets.indexOf("filter")>-1&&(g=function(){t.children("thead").children("."+b.css.filterRow).removeClass(r?o.filterRow||"":"").addClass(w.filterRow||"")},e.filter_initialized?g():t.one("filterInit",function(){g()}))),f=0;f<d.columns;f++)k=d.$headers.add(a(d.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+f+'"]'),l=b.css.icon?k.find("."+b.css.icon):a(),n=u.not(".sorter-false").filter('[data-column="'+f+'"]:last'),n.length&&(k.removeClass(x),l.removeClass(y),n[0].sortDisabled?l.removeClass(w.icons||""):(h=w.sortNone,i=w.iconSortNone,n.hasClass(b.css.sortAsc)?(h=[w.sortAsc,w.active].join(" "),i=w.iconSortAsc):n.hasClass(b.css.sortDesc)&&(h=[w.sortDesc,w.active].join(" "),i=w.iconSortDesc),k.addClass(h),l.addClass(i||"")));d.debug&&console.log("Applying "+v+" theme"+b.benchmark(j))},remove:function(a,c,d,e){if(d.uitheme_applied){var f=c.$table,g=c.appliedTheme||"jui",h=b.themes[g]||b.themes.jui,i=f.children("thead").children(),j=h.sortNone+" "+h.sortDesc+" "+h.sortAsc,k=h.iconSortNone+" "+h.iconSortDesc+" "+h.iconSortAsc;f.removeClass("tablesorter-"+g+" "+h.table),d.uitheme_applied=!1,e||(f.find(b.css.header).removeClass(h.header),i.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(h.hover+" "+j+" "+h.active).filter("."+b.css.filterRow).removeClass(h.filterRow),i.find("."+b.css.icon).removeClass(h.icons+" "+k))}}})}(jQuery);

View File

@ -1 +1 @@
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#","class":f,"data-view-type":b,title:e.title});g.append(a("<i>",{"class":e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){return e.preventDefault(),a(this).hasClass("active")?!1:(d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),c.view_layouts[c.view_layout].raw===!0?(g.remove(b,c),g.buildToolBar(b,c)):(f===!1&&g.hideTable(b,c),g.buildView(b,c)),void 0)})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{"class":c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(f,h.html())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f)},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){b.view_layout!==!1&&"undefined"!=typeof b.view_layouts[b.view_layout]&&(f===!1&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b),a.$table.triggerHandler("viewComplete")}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#","class":f,"data-view-type":b,title:e.title});g.append(a("<i>",{"class":e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){return e.preventDefault(),a(this).hasClass("active")?!1:(d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),c.view_layouts[c.view_layout].raw===!0?(g.remove(b,c),g.buildToolBar(b,c)):(f===!1&&g.hideTable(b,c),g.buildView(b,c)),void 0)})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{"class":c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(new RegExp(f,"g"),h.html()),f="{col"+b+":raw}",c=c.replace(new RegExp(f,"g"),a(d).text())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f),b.$table.triggerHandler("viewComplete")},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){b.view_layout!==!1&&"undefined"!=typeof b.view_layouts[b.view_layout]&&(f===!1&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b)}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);

View File

@ -96,6 +96,7 @@
// if true, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately
// below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus
// in v2.26.6, this option will also accept a function
filter_hideFilters : true,
// Set this option to false to make the searches case sensitive
@ -247,6 +248,7 @@ $(function(){
<h3 id="notes"><a href="#">Notes</a></h3>
<div>
<ul>
<li>In <span class="verison">v2.26.6</span>, the <a class="intlink" href="#filter-hidefilters"><code>hideFilters</code></a> setting will now accept a function to determine when to hide the filter row.</li>
<li>In <span class="version">v2.25.6</span>, added <a class="intlink" href="#methods"><code>filterResetSaved</code></a> method to clear stored filter values.</li>
<li>In <span class="version">v2.25.2</span>, added <a class="intlink" href="#filter-resetonesc"><code>filter_resetOnEsc</code></a> option.</li>
<li>In <span class="version">v2.22.2</span>,
@ -498,7 +500,9 @@ $(function(){
<tr id="filter-hide-filters">
<td><span class="permalink">filter_hideFilters</span></td>
<td>false</td>
<td>If <code>true</code>, filters are hidden initially, but can be revealed by hovering over the filter row, or giving a filter input focus (tabbing down the page).</td>
<td>If <code>true</code>, filters are hidden initially, but can be revealed by hovering over the filter row, or giving a filter input focus (tabbing down the page).<br>
In <span class="version updated">v2.26.6</span>, a function can now be used to return a boolean value to set the visibility of the filter row. See the <a href="./#widget-filter-hidefilters">main documentation</a> for an example.
</td>
</tr>
<tr id="filter-ignore-case">

View File

@ -455,12 +455,12 @@
<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.9</span>).</li>
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.26.6</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 class="external" 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.26.5</span>):
<li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.26.6</span>):
<ul>
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.25.6</span>).</li>
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.26.6</span>).</li>
<li><a href="example-widget-filter-any-match.html">external option (match any column)</a> (<span class="version">v2.13.3</span>; <span class="version updated">v2.26.2</span>).</li>
<li><a href="example-widget-filter-external-inputs.html">external inputs</a> (<span class="version">v2.14</span>; <span class="version updated">v2.18.0</span>).</li>
<li><a href="example-widget-filter-custom.html">custom filter functions</a> (v2.3.6; <span class="version updated">v2.22.0</span>).</li>
@ -476,7 +476,7 @@
<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.26.5</span>).</li>
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.26.6</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>
@ -488,9 +488,9 @@
<br><br>
</li>
<li>Pager plugin (<a href="example-pager.html">basic</a> &amp; <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.26.5</span>).</li>
<li>Pager plugin (<a href="example-pager.html">basic</a> &amp; <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.26.6</span>).</li>
<li>
Pager widget (<a href="example-widget-pager.html">basic</a> &amp; <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.26.5</span>).<br>
Pager widget (<a href="example-widget-pager.html">basic</a> &amp; <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.26.6</span>).<br>
<br>
</li>
@ -499,7 +499,7 @@
<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.26.5</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.26.3</span>).</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.26.6</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>
@ -509,13 +509,13 @@
<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>
<li><span class="results">&dagger;</span> UITheme widget (<span class="version updated">v2.17.4</span>; <span class="version updated">v2.19.0</span>):
<li><span class="results">&dagger;</span> UITheme widget (<span class="version updated">v2.17.4</span>; <span class="version updated">v2.26.6</span>):
<ul>
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9).</li>
<li><a href="example-widget-bootstrap-theme-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>) &amp; <a href="example-widget-bootstrap-theme.html">Bootstrap v3.x</a> (v2.4).</li>
</ul>
</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-view.html">View Widget</a> (<span class="version">v2.24.0</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-view.html">View Widget</a> (<span class="version">v2.24.0</span>; <span class="version updated">v2.26.6</span>).</li>
<li><span class="results">&Dagger;</span> <a href="example-widget-zebra.html">Zebra stripe widget</a>.</li>
</ul>
@ -1938,7 +1938,8 @@ $(function(){
// Set this option to true to hide the filter row initially. The row is
// revealed by hovering over the filter row or giving any filter
// input/select focus.
// input/select focus. In v2.26.6, a function can be used to set when
// to hide the filter row.
filter_hideFilters: false,
// Set this option to false to keep the searches case sensitive
@ -2987,7 +2988,7 @@ filter_cssFilter : [ '', 'hidden', '', 'hidden' ]</pre>
});</pre>You can change the style (thickness) of the hidden filter row in the tablesorter theme css. Look for <code>.tablesorter-filter-row</code> (revealed row) and <code>.tablesorter-filter-row.hideme</code> (for the hidden row) css definitions.
In <span class="version updated">v2.26.6</span>, this setting can also contain a function.
<ul>
<li>When this function returns a boolean value, it signifies weather the filter row should or should not be hidden (see the details in <a href="https://github.com/Mottie/tablesorter/issues/477#issuecomment-229352896">this issue</a>.</li>
<li>When this function returns a boolean value, it signifies whether the filter row should or should not be hidden (see the details in <a href="https://github.com/Mottie/tablesorter/issues/477#issuecomment-229352896">this issue</a>.</li>
<li>If this function does not return a boolean value, the value of the filters are checked and if no search queries are found, the filter row will be hidden.</li>
</ul>
Example of function setting:

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
/* 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.26.5 *//*
/*! TableSorter (FORK) v2.26.6 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -39,7 +39,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.26.5',
version : '2.26.6',
parsers : [],
widgets : [],
@ -1777,14 +1777,14 @@
regex = ts.regex;
// first try and sort Hex codes
if ( regex.hex.test( b ) ) {
aNum = parseInt( a.match( regex.hex ), 16 );
bNum = parseInt( b.match( regex.hex ), 16 );
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
if ( aNum < bNum ) { return -1; }
if ( aNum > bNum ) { return 1; }
}
// chunk/tokenize
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
max = Math.max( aNum.length, bNum.length );
// natural sorting through split numeric strings and default strings
for ( indx = 0; indx < max; indx++ ) {
@ -2839,7 +2839,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -2897,7 +2897,7 @@
id: 'uitheme',
priority: 10,
format: function(table, c, wo) {
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
@ -2964,10 +2964,20 @@
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
.addClass(themes.icons || '');
}
if ($table.hasClass('hasFilters')) {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
};
if (wo.filter_initialized) {
tmp();
} else {
$table.one('filterInit', function() {
tmp();
});
}
}
}
for (i = 0; i < c.columns; i++) {
@ -3104,7 +3114,7 @@
})(jQuery);
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3891,12 +3901,13 @@
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
wo = table.config.widgetOptions; // make sure "wo" isn't cached
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
@ -3923,7 +3934,8 @@
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'input' && this.value === '' ) ) {
@ -3972,7 +3984,7 @@
// show/hide filter row as needed
c.$table
.find( '.' + tscss.filterRow )
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
@ -4005,26 +4017,34 @@
return false;
}
},
hideFiltersCheck: function( c ) {
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
var val = c.widgetOptions.filter_hideFilters( c );
if (typeof val === 'boolean') {
return val;
}
}
return ts.getFilters( c.$table ).join( '' ) === '';
},
hideFilters: function( c, $table ) {
var timer,
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
$row
var timer;
( $table || c.$table )
.find( '.' + tscss.filterRow )
.addClass( tscss.filterRowHide )
.bind( 'mouseenter mouseleave', function( e ) {
// save event object - http://bugs.jquery.com/ticket/12140
var event = e,
$filterRow = $( this );
$row = $( this );
clearTimeout( timer );
timer = setTimeout( function() {
if ( /enter|over/.test( event.type ) ) {
$filterRow.removeClass( tscss.filterRowHide );
$row.removeClass( tscss.filterRowHide );
} else {
// don't hide if input has focus
// $( ':focus' ) needs jQuery 1.6+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
// don't hide row if any filter has a value
if ( c.lastCombinedFilter === '' ) {
$filterRow.addClass( tscss.filterRowHide );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
}
}
}, 200 );
@ -4036,9 +4056,7 @@
timer = setTimeout( function() {
clearTimeout( timer );
// don't hide row if any filter has a value
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
}, 200 );
});
},
@ -5232,7 +5250,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';

View File

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

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -107,7 +107,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -165,7 +165,7 @@
id: 'uitheme',
priority: 10,
format: function(table, c, wo) {
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
@ -232,10 +232,20 @@
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
.addClass(themes.icons || '');
}
if ($table.hasClass('hasFilters')) {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
.addClass(themes.filterRow || '');
};
if (wo.filter_initialized) {
tmp();
} else {
$table.one('filterInit', function() {
tmp();
});
}
}
}
for (i = 0; i < c.columns; i++) {
@ -372,7 +382,7 @@
})(jQuery);
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1159,12 +1169,13 @@
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
wo = table.config.widgetOptions; // make sure "wo" isn't cached
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
@ -1191,7 +1202,8 @@
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'input' && this.value === '' ) ) {
@ -1240,7 +1252,7 @@
// show/hide filter row as needed
c.$table
.find( '.' + tscss.filterRow )
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
@ -1273,26 +1285,34 @@
return false;
}
},
hideFiltersCheck: function( c ) {
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
var val = c.widgetOptions.filter_hideFilters( c );
if (typeof val === 'boolean') {
return val;
}
}
return ts.getFilters( c.$table ).join( '' ) === '';
},
hideFilters: function( c, $table ) {
var timer,
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
$row
var timer;
( $table || c.$table )
.find( '.' + tscss.filterRow )
.addClass( tscss.filterRowHide )
.bind( 'mouseenter mouseleave', function( e ) {
// save event object - http://bugs.jquery.com/ticket/12140
var event = e,
$filterRow = $( this );
$row = $( this );
clearTimeout( timer );
timer = setTimeout( function() {
if ( /enter|over/.test( event.type ) ) {
$filterRow.removeClass( tscss.filterRowHide );
$row.removeClass( tscss.filterRowHide );
} else {
// don't hide if input has focus
// $( ':focus' ) needs jQuery 1.6+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
// don't hide row if any filter has a value
if ( c.lastCombinedFilter === '' ) {
$filterRow.addClass( tscss.filterRowHide );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
}
}
}, 200 );
@ -1304,9 +1324,7 @@
timer = setTimeout( function() {
clearTimeout( timer );
// don't hide row if any filter has a value
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
}
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
}, 200 );
});
},
@ -2500,7 +2518,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';

View File

@ -1,4 +1,4 @@
/* Widget: columnSelector (responsive table widget) - updated 4/29/2016 (v2.25.9) *//*
/* Widget: columnSelector (responsive table widget) - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Justin Hallett & Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: filter, select2 formatter function - updated 5/28/2016 (v2.26.2) *//*
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) *//*
* requires: jQuery 1.7.2+, tableSorter (FORK) 2.16+, filter widget 2.16+
and select2 v3.4.6+ plugin (this code is NOT compatible with select2 v4+)
*/
@ -34,22 +34,31 @@
.appendTo($cell)
// hidden filter update namespace trigger by filter widget
.bind('change' + c.namespace + 'filter', function(){
var val = this.value;
val = val.replace(/[/()$^]/g, '').split('|');
$cell.find('.select2').select2('val', val);
var val = convertRegex(this.value);
c.$table.find('.select2col' + indx + ' .select2').select2('val', val);
updateSelect2();
}),
$header = c.$headerIndexed[indx],
onlyAvail = $header.hasClass(wo.filter_onlyAvail),
$shcell = [],
matchPrefix = o.match ? '' : '^',
matchSuffix = o.match ? '' : '$',
flags = wo.filter_ignoreCase ? 'i' : '',
convertRegex = function(val) {
// value = '/(^x$|^y$)/' => ['x','y']
return val
.replace(/^\/\(\^?/, '')
.replace(/\$\|\^/g, '|')
.replace(/\$?\)\/i?$/g, '')
// unescape special regex characters
.replace(/\\/g, '')
.split('|');
},
// this function updates the hidden input and adds the current values to the header cell text
updateSelect2 = function() {
var arry = false,
v = $cell.find('.select2').select2('val') || o.value || '';
v = c.$table.find('.select2col' + indx + ' .select2').select2('val') || o.value || '';
// convert array to string
if ($.isArray(v)) {
arry = true;
@ -71,8 +80,8 @@
.trigger('search').end()
.find('.select2').select2('val', v);
// update sticky header cell
if ($shcell.length) {
$shcell.find('.select2').select2('val', v);
if (c.widgetOptions.$sticky) {
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
}
},
@ -98,12 +107,13 @@
// data options are already defined
if (!(o.ajax && !$.isEmptyObject(o.ajax)) && !o.data) {
updateOptions();
if (onlyAvail) {
c.$table.bind('filterEnd', function(){
updateOptions();
$cell.add($shcell).find('.select2').select2(o);
});
}
c.$table.bind('filterEnd', function(){
updateOptions();
c.$table
.find('.select2col' + indx)
.add(c.widgetOptions.$sticky && c.widgetOptions.$sticky.find('.select2col' + indx))
.find('.select2').select2(o);
});
}
// add a select2 hidden input!
@ -118,14 +128,7 @@
// update select2 from filter hidden input, in case of saved filters
c.$table.bind('filterFomatterUpdate', function() {
// value = '/(^x$|^y$)/' => 'x,y'
var val = c.$table.data('lastSearch')[indx] || '';
val = val
.replace(/^\/\(\^?/, '')
.replace(/\$\|\^/g, '|')
.replace(/\$?\)\/i?$/g, '')
// unescape special regex characters
.replace(/\\/g, '')
.split('|');
var val = convertRegex(c.$table.data('lastSearch')[indx] || '');
$cell = c.$table.find('.select2col' + indx);
$cell.find('.select2').select2('val', val);
updateSelect2();
@ -134,25 +137,26 @@
// has sticky headers?
c.$table.bind('stickyHeadersInit', function(){
$shcell = c.widgetOptions.$sticky.find('.' + ts.css.filterRow).children().eq(indx).empty();
var $shcell = c.widgetOptions.$sticky.find('.select2col' + indx).empty();
// add a select2!
$('<input class="select2 select2-' + indx + '" type="hidden">')
.val(o.value)
.appendTo($shcell)
.select2(o)
.bind('change', function(){
$cell.find('.select2').select2('val', $shcell.find('.select2').select2('val') );
c.$table.find('.select2col' + indx)
.find('.select2')
.select2('val', c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val') );
updateSelect2();
});
if (o.cellText) {
$shcell.prepend('<label>' + o.cellText + '</label>');
}
});
// on reset
c.$table.bind('filterReset', function(){
$cell.find('.select2').select2('val', o.value || '');
c.$table.find('.select2col' + indx).find('.select2').select2('val', o.value || '');
setTimeout(function(){
updateSelect2();
}, 0);

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 6/28/2016 (v2.26.6) *//*
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: grouping - updated 6/28/2016 (v2.26.5) *//*
/*! Widget: grouping - updated 7/11/2016 (v2.26.6) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: Pager - updated 6/28/2016 (v2.26.5) */
/*! Widget: Pager - updated 7/11/2016 (v2.26.6) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: scroller - updated 6/15/2016 (v2.26.3) *//*
/*! Widget: scroller - updated 7/11/2016 (v2.26.6) *//*
Copyright (C) 2011 T. Connell & Associates, Inc.
Dual-licensed under the MIT and GPL licenses

View File

@ -1,4 +1,4 @@
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};

View File

@ -1,4 +1,4 @@
/* Widget: view (beta) - updated 10/31/2015 (v2.24.0) */
/* Widget: view (beta) - updated 7/11/2016 (v2.26.6) */
/* By Justin F. Hallett (https://github.com/TheSin-)
* Requires tablesorter v2.8+ and jQuery 1.7+
*/

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.26.5",
"version": "2.26.6",
"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.26.5",
"version": "2.26.6",
"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",