Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2017-05-24 18:54:03 -05:00
commit 559594cff0
23 changed files with 154 additions and 130 deletions

View File

@ -104,6 +104,27 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes). View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.28.11">Version 2.28.11</a> (5/24/2017)
* Docs:
* Reword `sortReset` method description. See [issue #1404](https://github.com/Mottie/tablesorter/issues/1404).
* Columns:
* Initialize after pager widget.
* CssStickyHeaders:
* Fix captioned tables in Safari. See [issue #1405](https://github.com/Mottie/tablesorter/issues/1405); thanks [@TheSin-](https://github.com/TheSin-)!
* Fix in Edge browser.
* Filter:
* Attempt to fix [issue #1152](https://github.com/Mottie/tablesorter/issues/1152) (`liveSearch`).
* Second attempt at [issue #1152](https://github.com/Mottie/tablesorter/issues/1152).
* Trigger `liveSearch` on blur & cleanup.
* Pager (widget only):
* Allow ajax processing on init.
* Ensure ajax is called after filter widget initializes.
* Parsers:
* Update links to sugarjs/datejs demos.
* Meta:
* Update dependencies.
#### <a name="v2.28.10">Version 2.28.10</a> (5/16/2017) #### <a name="v2.28.10">Version 2.28.10</a> (5/16/2017)
* Core: * Core:
@ -129,25 +150,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* update jQuery. * update jQuery.
* Math: * Math:
* Include noop `math_complete` in defaults; prevents option not recognized warning * Include noop `math_complete` in defaults; prevents option not recognized warning
#### <a name="v2.28.8">Version 2.28.8</a> (4/18/2017)
* Docs:
* Update version tags.
* Core:
* Fixed `updateCell` to work correctly with child rows. Thanks [@andysleigh](https://github.com/andysleigh); see [PR #1381](https://github.com/Mottie/tablesorter/pull/1381).
* Filter:
* Add `equalFilters` function; for more reliable comparisons.
* Pager:
* use `equalFilters` function for comparison. See [issue #1384](https://github.com/Mottie/tablesorter/issues/1384).
* Resizable:
* Add `resizable_includeFooter` option. Fixes [issue #1386](https://github.com/Mottie/tablesorter/issues/1386).
* Scroller:
* Set max-width to initial. See [issue #1382](https://github.com/Mottie/tablesorter/issues/1382).
* Fix offset from hidden row. See [issue #1376](https://github.com/Mottie/tablesorter/issues/1376).
* Fix linting issue.
* Storage:
* Add options early to prevent validator message.
* Add `storage_storageType` option & deprecate `storage_useSessionStorage`.
* Meta:
* Update dependencies x2.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.10 *//* /*! TableSorter (FORK) v2.28.11 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -34,7 +34,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.10', version : '2.28.11',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -3143,14 +3143,14 @@
})(jQuery); })(jQuery);
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
ts.addWidget({ ts.addWidget({
id: 'columns', id: 'columns',
priority: 30, priority: 65,
options : { options : {
columns : [ 'primary', 'secondary', 'tertiary' ] columns : [ 'primary', 'secondary', 'tertiary' ]
}, },
@ -3222,7 +3222,7 @@
})(jQuery); })(jQuery);
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//* /*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -4040,9 +4040,6 @@
if ( event.which === tskeyCodes.escape ) { if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape // make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed ) // don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && ( } else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
@ -4051,26 +4048,32 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return; return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
} }
// change event = no delay; last true flag tells getFilters to skip newest timed input // change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column ); tsf.searching( table, true, true, column );
}) })
// include change for select - fixes #473 // include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) { .bind( 'search change keypress input blur '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically // don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 ), var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
eventType = event.type,
liveSearch = typeof wo.filter_liveSearch === 'boolean' ? liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch : wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column ); ts.getColumnData( table, wo.filter_liveSearch, column );
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
// immediate search if user presses enter // immediate search if user presses enter
( event.which === tskeyCodes.enter || ( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input // immediate search if a "search" or "blur" is triggered on the input
event.type === 'search' || ( eventType === 'search' || eventType === 'blur' ) ||
// change & input events must be ignored if liveSearch !== true // change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) && ( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number // prevent search if liveSearch is a number
liveSearch === true && ( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
// don't allow 'change' or 'input' event to process if the input value // don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685 // is the same - fixes #685
this.value !== c.lastSearch[column] this.value !== c.lastSearch[column]
@ -4079,7 +4082,7 @@
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
tsf.searching( table, event.type !== 'keypress', true, column ); tsf.searching( table, eventType !== 'keypress', true, column );
} }
}); });
}, },

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.10 *//* /*! TableSorter (FORK) v2.28.11 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -32,7 +32,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.10', version : '2.28.11',
parsers : [], parsers : [],
widgets : [], widgets : [],

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -323,14 +323,14 @@
})(jQuery); })(jQuery);
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
ts.addWidget({ ts.addWidget({
id: 'columns', id: 'columns',
priority: 30, priority: 65,
options : { options : {
columns : [ 'primary', 'secondary', 'tertiary' ] columns : [ 'primary', 'secondary', 'tertiary' ]
}, },
@ -402,7 +402,7 @@
})(jQuery); })(jQuery);
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//* /*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -1220,9 +1220,6 @@
if ( event.which === tskeyCodes.escape ) { if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape // make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed ) // don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && ( } else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
@ -1231,26 +1228,32 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return; return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
} }
// change event = no delay; last true flag tells getFilters to skip newest timed input // change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column ); tsf.searching( table, true, true, column );
}) })
// include change for select - fixes #473 // include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) { .bind( 'search change keypress input blur '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically // don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 ), var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
eventType = event.type,
liveSearch = typeof wo.filter_liveSearch === 'boolean' ? liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch : wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column ); ts.getColumnData( table, wo.filter_liveSearch, column );
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
// immediate search if user presses enter // immediate search if user presses enter
( event.which === tskeyCodes.enter || ( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input // immediate search if a "search" or "blur" is triggered on the input
event.type === 'search' || ( eventType === 'search' || eventType === 'blur' ) ||
// change & input events must be ignored if liveSearch !== true // change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) && ( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number // prevent search if liveSearch is a number
liveSearch === true && ( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
// don't allow 'change' or 'input' event to process if the input value // don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685 // is the same - fixes #685
this.value !== c.lastSearch[column] this.value !== c.lastSearch[column]
@ -1259,7 +1262,7 @@
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
tsf.searching( table, event.type !== 'keypress', true, column ); tsf.searching( table, eventType !== 'keypress', true, column );
} }
}); });
}, },

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! Parser: dates - updated 8/22/2016 (v2.27.5) */ /*! Parser: dates - updated 5/24/2017 (v2.28.11) */
!function(e){"use strict";/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */ !function(e){"use strict";/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */
e.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(e){var t=Date.create||Sugar.Date.create,r=t?t(e):e?new Date(e):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */ e.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(e){var t=Date.create||Sugar.Date.create,r=t?t(e):e?new Date(e):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */
e.tablesorter.addParser({id:"datejs",is:function(){return!1},format:function(e){var t=Date.parse?Date.parse(e):e?new Date(e):e;return t instanceof Date&&isFinite(t)?t.getTime():e},type:"numeric"})}(jQuery); e.tablesorter.addParser({id:"datejs",is:function(){return!1},format:function(e){var t=Date.parse?Date.parse(e):e?new Date(e):e;return t instanceof Date&&isFinite(t)?t.getTime():e},type:"numeric"})}(jQuery);

View File

@ -1,2 +1,2 @@
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
!function(e){"use strict";var r=e.tablesorter||{};r.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(o,t,s){var n,i,a,d,l,c,h,f,m=t.$table,y=t.$tbodies,u=t.sortList,p=u.length,b=s&&s.columns||["primary","secondary","tertiary"],v=b.length-1;for(h=b.join(" "),i=0;i<y.length;i++)(a=(n=r.processTbody(o,y.eq(i),!0)).children("tr")).each(function(){if(l=e(this),"none"!==this.style.display&&(c=l.children().removeClass(h),u&&u[0]&&(c.eq(u[0][0]).addClass(b[0]),p>1)))for(f=1;f<p;f++)c.eq(u[f][0]).addClass(b[f]||b[v])}),r.processTbody(o,n,!1);if(d=!1!==s.columns_thead?["thead tr"]:[],!1!==s.columns_tfoot&&d.push("tfoot tr"),d.length&&(a=m.find(d.join(",")).children().removeClass(h),p))for(f=0;f<p;f++)a.filter('[data-column="'+u[f][0]+'"]').addClass(b[f]||b[v])},remove:function(o,t,s){var n,i,a=t.$tbodies,d=(s.columns||["primary","secondary","tertiary"]).join(" ");for(t.$headers.removeClass(d),t.$table.children("tfoot").children("tr").children("th, td").removeClass(d),n=0;n<a.length;n++)(i=r.processTbody(o,a.eq(n),!0)).children("tr").each(function(){e(this).children().removeClass(d)}),r.processTbody(o,i,!1)}})}(jQuery); !function(e){"use strict";var r=e.tablesorter||{};r.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(o,t,s){var n,i,a,d,l,c,h,f,m=t.$table,y=t.$tbodies,u=t.sortList,p=u.length,b=s&&s.columns||["primary","secondary","tertiary"],v=b.length-1;for(h=b.join(" "),i=0;i<y.length;i++)(a=(n=r.processTbody(o,y.eq(i),!0)).children("tr")).each(function(){if(l=e(this),"none"!==this.style.display&&(c=l.children().removeClass(h),u&&u[0]&&(c.eq(u[0][0]).addClass(b[0]),p>1)))for(f=1;f<p;f++)c.eq(u[f][0]).addClass(b[f]||b[v])}),r.processTbody(o,n,!1);if(d=!1!==s.columns_thead?["thead tr"]:[],!1!==s.columns_tfoot&&d.push("tfoot tr"),d.length&&(a=m.find(d.join(",")).children().removeClass(h),p))for(f=0;f<p;f++)a.filter('[data-column="'+u[f][0]+'"]').addClass(b[f]||b[v])},remove:function(o,t,s){var n,i,a=t.$tbodies,d=(s.columns||["primary","secondary","tertiary"]).join(" ");for(t.$headers.removeClass(d),t.$table.children("tfoot").children("tr").children("th, td").removeClass(d),n=0;n<a.length;n++)(i=r.processTbody(o,a.eq(n),!0)).children("tr").each(function(){e(this).children().removeClass(d)}),r.processTbody(o,i,!1)}})}(jQuery);

View File

@ -1,2 +1,2 @@
/*! Widget: cssStickyHeaders - updated 2/9/2015 (v2.19.1) */ /*! Widget: cssStickyHeaders - updated 5/24/2017 (v2.28.11) */
!function(e,t){"use strict";var s=e.tablesorter;s.addWidget({id:"cssStickyHeaders",priority:10,options:{cssStickyHeaders_offset:0,cssStickyHeaders_addCaption:!1,cssStickyHeaders_attachTo:null,cssStickyHeaders_filteredToTop:!0},init:function(i,a,c,d){var r,o,n,l=c.$table,p=e(d.cssStickyHeaders_attachTo),h="ActiveXObject"in t,f=c.namespace+"cssstickyheader ",k=l.children("thead"),y=l.children("caption"),g=p.length?p:e(t),H=l.parent().closest("table."+s.css.table),S=H.length&&s.hasWidget(H[0],"cssStickyHeaders")?H.children("thead"):[],b=parseInt(l.css("border-top-width"),10)||0,_=d.cssStickyHeaders_addCaption,u=!1,m=!1,C=function(e,t){var s=0===t?"":"translate(0px,"+t+"px)";e.css({transform:s,"-ms-transform":s,"-webkit-transform":s})};y.length&&(r=l.height(),y.hide(),m=l.height()===r,y.show(),o=l.offset().top,C(y,20),u=l.offset().top!==o,C(y,0)),g.unbind("scroll resize ".split(" ").join(f).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(f),function(){d=c.widgetOptions,u&&(C(y,0),n=l.offset().top);var e=p.length?p.offset().top:g.scrollTop(),t=(y.outerHeight(!0)||0)+(parseInt(l.css("padding-top"),10)||0)+(parseInt(l.css("border-spacing"),10)||0),s=l.height()+(m&&d.cssStickyHeaders_addCaption?t:0)-k.height()-(l.children("tfoot").height()||0)-(d.cssStickyHeaders_addCaption?t:m?0:t),i=S.length?S.height():0,a=S.length?h?H.data("cssStickyHeaderBottom")+i:S.offset().top+i-g.scrollTop():0,r=u?n:l.offset().top,o=e-(m?r-(d.cssStickyHeaders_addCaption?t:0):r)+a+b+(d.cssStickyHeaders_offset||0)-(d.cssStickyHeaders_addCaption?m?t:0:t),f=o>0&&o<=s?o:0,T=h?k.children().children():k;h&&c.$table.data("cssStickyHeaderBottom",(S.length?i:0)-(d.cssStickyHeaders_addCaption?t:0)),d.cssStickyHeaders_addCaption&&(T=T.add(y)),_!==d.cssStickyHeaders_addCaption&&((_=d.cssStickyHeaders_addCaption)||C(y,0)),C(T,f)}),l.unbind(("filterEnd"+f).replace(/\s+/g," ")).bind("filterEnd"+f,function(){d.cssStickyHeaders_filteredToTop&&t.scrollTo(0,l.position().top)})},remove:function(s,i,a,c){if(!c){var d=i.namespace+"cssstickyheader ";e(t).unbind("scroll resize ".split(" ").join(d).replace(/\s+/g," ")),i.$table.unbind("filterEnd scroll resize ".split(" ").join(d).replace(/\s+/g," ")).add(i.$table.children("thead").children().children()).children("thead, caption").css({transform:"","-ms-transform":"","-webkit-transform":""})}}})}(jQuery,window); !function(e,t){"use strict";var s=e.tablesorter;s.addWidget({id:"cssStickyHeaders",priority:10,options:{cssStickyHeaders_offset:0,cssStickyHeaders_addCaption:!1,cssStickyHeaders_attachTo:null,cssStickyHeaders_filteredToTop:!0},init:function(i,a,r,c){var d,o,n=r.$table,l=e(c.cssStickyHeaders_attachTo),p="ActiveXObject"in t||t.navigator.userAgent.indexOf("Edge")>-1,h=r.namespace+"cssstickyheader ",f=n.children("thead"),g=n.children("caption"),k=l.length?l:e(t),y=n.parent().closest("table."+s.css.table),H=y.length&&s.hasWidget(y[0],"cssStickyHeaders")?y.children("thead"):[],S=parseInt(n.css("border-top-width"),10)||0,b=n.height(),u=c.cssStickyHeaders_addCaption,_=!1,m=!1,C=function(e,t){var s=0===t?"":"translate(0px,"+t+"px)";e.css({transform:s,"-ms-transform":s,"-webkit-transform":s})};g.length&&(g.hide(),m=n.height()===b,g.show(),d=n.offset().top,C(g,20),_=n.offset().top!==d,C(g,0)),k.unbind("scroll resize ".split(" ").join(h).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(h),function(){c=r.widgetOptions,_&&(C(g,0),o=n.offset().top),k.scrollTop()<g.outerHeight(!0)&&(b=n.height());var e=l.length?l.offset().top:k.scrollTop(),t=(g.outerHeight(!0)||0)+(parseInt(n.css("padding-top"),10)||0)+(parseInt(n.css("border-spacing"),10)||0),s=b+(m&&c.cssStickyHeaders_addCaption?t:0)-f.height()-(n.children("tfoot").height()||0)-(c.cssStickyHeaders_addCaption?t:m?0:t),i=H.length?H.height():0,a=H.length?p?y.data("cssStickyHeaderBottom")+i:H.offset().top+i-k.scrollTop():0,d=_?o:n.offset().top,h=e-(m?d-(c.cssStickyHeaders_addCaption?t:0):d)+a+S+(c.cssStickyHeaders_offset||0)-(c.cssStickyHeaders_addCaption?m?t:0:t),T=h>0&&h<=s?h:0,v=p?f.children().children():f;p&&r.$table.data("cssStickyHeaderBottom",(H.length?i:0)-(c.cssStickyHeaders_addCaption?t:0)),c.cssStickyHeaders_addCaption&&(v=v.add(g)),u!==c.cssStickyHeaders_addCaption&&((u=c.cssStickyHeaders_addCaption)||C(g,0)),C(v,T)}),n.unbind(("filterEnd"+h).replace(/\s+/g," ")).bind("filterEnd"+h,function(){c.cssStickyHeaders_filteredToTop&&t.scrollTo(0,n.position().top)})},remove:function(s,i,a,r){if(!r){var c=i.namespace+"cssstickyheader ";e(t).unbind("scroll resize ".split(" ").join(c).replace(/\s+/g," ")),i.$table.unbind("filterEnd scroll resize ".split(" ").join(c).replace(/\s+/g," ")).add(i.$table.children("thead").children().children()).children("thead, caption").css({transform:"","-ms-transform":"","-webkit-transform":""})}}})}(jQuery,window);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -460,12 +460,12 @@
<li><a href="example-widget-build-table.html">Build table Widget</a> (<span class="version">v2.11</span>; <span class="version updated">v2.28.6</span>).</li> <li><a href="example-widget-build-table.html">Build table Widget</a> (<span class="version">v2.11</span>; <span class="version updated">v2.28.6</span>).</li>
<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="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><span class="results">&dagger;</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17; <span class="version updated">v2.28.11</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.28.2</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.28.2</span>).</li>
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li> <li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li>
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li> <li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</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="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.28.8</span>): <li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.28.11</span>):
<ul> <ul>
<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.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.27.5</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.27.5</span>).</li>
@ -498,7 +498,7 @@
<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.28.8</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.28.8</span>).</li>
<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.28.8</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.28.11</span>).<br>
<br> <br>
</li> </li>
@ -513,7 +513,7 @@
<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><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.28.4</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.28.4</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><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.28.11</span>).</li>
<li><span class="results">&dagger;</span> <a href="#function-storage">Storage Widget</a> (<span class="version">v2.20.0</span>; <span class="version updated">v2.28.8</span>).</li> <li><span class="results">&dagger;</span> <a href="#function-storage">Storage Widget</a> (<span class="version">v2.20.0</span>; <span class="version updated">v2.28.8</span>).</li>
@ -534,7 +534,7 @@
<h4 id="custom-parsers">Custom Parsers</h4> <h4 id="custom-parsers">Custom Parsers</h4>
<ul> <ul>
<li><a href="example-parsers-duration.html">Countdown parser</a> (<span class="version">v2.19.0</span>).</li> <li><a href="example-parsers-duration.html">Countdown parser</a> (<span class="version">v2.19.0</span>).</li>
<li><a href="example-parsers-dates.html">Date parsers</a> (<span class="version">v2.8</span>; <span class="version updated">v2.27.5</span>; includes weekday, month, two-digit year &amp; <a class="external" href="https://sugarjs.com/docs/#/DateParsing">sugar.js</a> date parsers; a <a class="external" href="http://www.datejs.com/">datejs</a> parser is also available).</li> <li><a href="example-parsers-dates.html">Date parsers</a> (<span class="version">v2.8</span>; <span class="version updated">v2.28.11</span>; includes weekday, month, two-digit year &amp; <a class="external" href="https://sugarjs.com/docs/#/DateParsing">sugar.js</a> date parsers; a <a class="external" href="http://www.datejs.com/">datejs</a> parser is also available).</li>
<li><a href="example-parsers-date-range.html">Date range parsers</a> (<span class="version">v2.21.0</span>; <span class="version updated">v2.25.0</span>); if filters, include the <a href="example-widget-filter-custom-search2.html">insideRange</a> filter search type.</li> <li><a href="example-parsers-date-range.html">Date range parsers</a> (<span class="version">v2.21.0</span>; <span class="version updated">v2.25.0</span>); if filters, include the <a href="example-widget-filter-custom-search2.html">insideRange</a> filter search type.</li>
<li><a href="example-parsers-duration.html">Duration parser</a> (<span class="version">v2.17.8</span>).</li> <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-feet-inch-fraction.html">Feet-inch-fraction parser</a> (<span class="version">v2.8</span>).</li>
@ -5218,7 +5218,7 @@ $( 'table' ).trigger( 'sorton', [ sort, callback ] );</pre>
<tr id="sortreset-method"> <tr id="sortreset-method">
<td><a href="#" class="permalink">sortReset</a></td> <td><a href="#" class="permalink">sortReset</a></td>
<td>Use this method to reset the table to it's initial unsorted state (v2.4.7; <span class="version updated">v2.23.0</span>). <td>Use this method to set the table into an unsorted state (v2.4.7; <span class="version updated">v2.23.0</span>).
<div class="collapsible"> <div class="collapsible">
<h4>Direct method:</h4> <h4>Direct method:</h4>
<p>In <span class="version">v2.23.0</span>, this method can be called directly as follows:</p> <p>In <span class="version">v2.23.0</span>, this method can be called directly as follows:</p>

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.10 *//* /*! TableSorter (FORK) v2.28.11 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -40,7 +40,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.10', version : '2.28.11',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -3149,14 +3149,14 @@
})(jQuery); })(jQuery);
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
ts.addWidget({ ts.addWidget({
id: 'columns', id: 'columns',
priority: 30, priority: 65,
options : { options : {
columns : [ 'primary', 'secondary', 'tertiary' ] columns : [ 'primary', 'secondary', 'tertiary' ]
}, },
@ -3228,7 +3228,7 @@
})(jQuery); })(jQuery);
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//* /*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -4046,9 +4046,6 @@
if ( event.which === tskeyCodes.escape ) { if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape // make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed ) // don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && ( } else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
@ -4057,26 +4054,32 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return; return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
} }
// change event = no delay; last true flag tells getFilters to skip newest timed input // change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column ); tsf.searching( table, true, true, column );
}) })
// include change for select - fixes #473 // include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) { .bind( 'search change keypress input blur '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically // don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 ), var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
eventType = event.type,
liveSearch = typeof wo.filter_liveSearch === 'boolean' ? liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch : wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column ); ts.getColumnData( table, wo.filter_liveSearch, column );
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
// immediate search if user presses enter // immediate search if user presses enter
( event.which === tskeyCodes.enter || ( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input // immediate search if a "search" or "blur" is triggered on the input
event.type === 'search' || ( eventType === 'search' || eventType === 'blur' ) ||
// change & input events must be ignored if liveSearch !== true // change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) && ( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number // prevent search if liveSearch is a number
liveSearch === true && ( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
// don't allow 'change' or 'input' event to process if the input value // don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685 // is the same - fixes #685
this.value !== c.lastSearch[column] this.value !== c.lastSearch[column]
@ -4085,7 +4088,7 @@
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
tsf.searching( table, event.type !== 'keypress', true, column ); tsf.searching( table, eventType !== 'keypress', true, column );
} }
}); });
}, },

View File

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

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 05-16-2017 (v2.28.10)*/ /*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -329,14 +329,14 @@
})(jQuery); })(jQuery);
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
ts.addWidget({ ts.addWidget({
id: 'columns', id: 'columns',
priority: 30, priority: 65,
options : { options : {
columns : [ 'primary', 'secondary', 'tertiary' ] columns : [ 'primary', 'secondary', 'tertiary' ]
}, },
@ -408,7 +408,7 @@
})(jQuery); })(jQuery);
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//* /*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -1226,9 +1226,6 @@
if ( event.which === tskeyCodes.escape ) { if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape // make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed ) // don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && ( } else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
@ -1237,26 +1234,32 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return; return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
} }
// change event = no delay; last true flag tells getFilters to skip newest timed input // change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column ); tsf.searching( table, true, true, column );
}) })
// include change for select - fixes #473 // include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) { .bind( 'search change keypress input blur '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically // don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 ), var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
eventType = event.type,
liveSearch = typeof wo.filter_liveSearch === 'boolean' ? liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch : wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column ); ts.getColumnData( table, wo.filter_liveSearch, column );
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
// immediate search if user presses enter // immediate search if user presses enter
( event.which === tskeyCodes.enter || ( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input // immediate search if a "search" or "blur" is triggered on the input
event.type === 'search' || ( eventType === 'search' || eventType === 'blur' ) ||
// change & input events must be ignored if liveSearch !== true // change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) && ( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number // prevent search if liveSearch is a number
liveSearch === true && ( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
// don't allow 'change' or 'input' event to process if the input value // don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685 // is the same - fixes #685
this.value !== c.lastSearch[column] this.value !== c.lastSearch[column]
@ -1265,7 +1268,7 @@
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
tsf.searching( table, event.type !== 'keypress', true, column ); tsf.searching( table, eventType !== 'keypress', true, column );
} }
}); });
}, },

View File

@ -1,4 +1,4 @@
/*! Parser: dates - updated 8/22/2016 (v2.27.5) */ /*! Parser: dates - updated 5/24/2017 (v2.28.11) */
/* Extract dates using popular natural language date parsers */ /* Extract dates using popular natural language date parsers */
/*jshint jquery:true */ /*jshint jquery:true */
/*global Sugar*/ /*global Sugar*/
@ -6,7 +6,7 @@
'use strict'; 'use strict';
/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */ /*! Sugar (https://sugarjs.com/docs/#/DateParsing) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4163/ */ /* demo: http://jsfiddle.net/Mottie/7z0ss5xn/ */
$.tablesorter.addParser({ $.tablesorter.addParser({
id: 'sugar', id: 'sugar',
is: function() { is: function() {
@ -22,7 +22,7 @@
}); });
/*! Datejs (http://www.datejs.com/) */ /*! Datejs (http://www.datejs.com/) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4164/ */ /* demo: http://jsfiddle.net/Mottie/zge0L2u6/ */
$.tablesorter.addParser({ $.tablesorter.addParser({
id: 'datejs', id: 'datejs',
is: function() { is: function() {

View File

@ -1,11 +1,11 @@
/*! Widget: columns */ /*! Widget: columns - updated 5/24/2017 (v2.28.11) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
ts.addWidget({ ts.addWidget({
id: 'columns', id: 'columns',
priority: 30, priority: 65,
options : { options : {
columns : [ 'primary', 'secondary', 'tertiary' ] columns : [ 'primary', 'secondary', 'tertiary' ]
}, },

View File

@ -1,4 +1,4 @@
/*! Widget: cssStickyHeaders - updated 2/9/2015 (v2.19.1) *//* /*! Widget: cssStickyHeaders - updated 5/24/2017 (v2.28.11) *//*
* Requires a modern browser, tablesorter v2.8+ * Requires a modern browser, tablesorter v2.8+
*/ */
/*jshint jquery:true, unused:false */ /*jshint jquery:true, unused:false */
@ -18,10 +18,11 @@
cssStickyHeaders_filteredToTop : true cssStickyHeaders_filteredToTop : true
}, },
init : function(table, thisWidget, c, wo) { init : function(table, thisWidget, c, wo) {
var ht, offst, adjustY, var offst, adjustY,
$table = c.$table, $table = c.$table,
$attach = $(wo.cssStickyHeaders_attachTo), $attach = $(wo.cssStickyHeaders_attachTo),
isIE = 'ActiveXObject' in window, // target all versions of IE // target all versions of IE
isIE = 'ActiveXObject' in window || window.navigator.userAgent.indexOf("Edge") > -1,
namespace = c.namespace + 'cssstickyheader ', namespace = c.namespace + 'cssstickyheader ',
$thead = $table.children('thead'), $thead = $table.children('thead'),
$caption = $table.children('caption'), $caption = $table.children('caption'),
@ -29,6 +30,8 @@
$parent = $table.parent().closest('table.' + ts.css.table), $parent = $table.parent().closest('table.' + ts.css.table),
$parentThead = $parent.length && ts.hasWidget($parent[0], 'cssStickyHeaders') ? $parent.children('thead') : [], $parentThead = $parent.length && ts.hasWidget($parent[0], 'cssStickyHeaders') ? $parent.children('thead') : [],
borderTopWidth = ( parseInt( $table.css('border-top-width'), 10 ) || 0 ), borderTopWidth = ( parseInt( $table.css('border-top-width'), 10 ) || 0 ),
// Fixes for Safari
tableH = $table.height(),
lastCaptionSetting = wo.cssStickyHeaders_addCaption, lastCaptionSetting = wo.cssStickyHeaders_addCaption,
// table offset top changes while scrolling in FF // table offset top changes while scrolling in FF
adjustOffsetTop = false, adjustOffsetTop = false,
@ -46,9 +49,8 @@
if ($caption.length) { if ($caption.length) {
// Firefox does not include the caption height when getting the table height // Firefox does not include the caption height when getting the table height
// see https://bugzilla.mozilla.org/show_bug.cgi?id=820891, so lets detect it instead of browser sniff // see https://bugzilla.mozilla.org/show_bug.cgi?id=820891, so lets detect it instead of browser sniff
ht = $table.height();
$caption.hide(); $caption.hide();
addCaptionHeight = $table.height() === ht; addCaptionHeight = $table.height() === tableH;
$caption.show(); $caption.show();
// Firefox changes the offset().top when translating the table caption // Firefox changes the offset().top when translating the table caption
@ -71,6 +73,12 @@
adjustY = $table.offset().top; adjustY = $table.offset().top;
} }
// Fix for safari, when caption present, table
// height changes while scrolling
if ($win.scrollTop() < $caption.outerHeight(true)) {
tableH = $table.height();
}
var top = $attach.length ? $attach.offset().top : $win.scrollTop(), var top = $attach.length ? $attach.offset().top : $win.scrollTop(),
// add caption height; include table padding top & border-spacing or text may be above the fold (jQuery UI themes) // add caption height; include table padding top & border-spacing or text may be above the fold (jQuery UI themes)
// border-spacing needed in Firefox, but not webkit... not sure if I should account for that // border-spacing needed in Firefox, but not webkit... not sure if I should account for that
@ -78,7 +86,7 @@
( parseInt( $table.css('padding-top'), 10 ) || 0 ) + ( parseInt( $table.css('padding-top'), 10 ) || 0 ) +
( parseInt( $table.css('border-spacing'), 10 ) || 0 ), ( parseInt( $table.css('border-spacing'), 10 ) || 0 ),
bottom = $table.height() + ( addCaptionHeight && wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) - bottom = tableH + ( addCaptionHeight && wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) -
$thead.height() - ( $table.children('tfoot').height() || 0 ) - $thead.height() - ( $table.children('tfoot').height() || 0 ) -
( wo.cssStickyHeaders_addCaption ? captionHeight : ( addCaptionHeight ? 0 : captionHeight ) ), ( wo.cssStickyHeaders_addCaption ? captionHeight : ( addCaptionHeight ? 0 : captionHeight ) ),

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//* /*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -816,9 +816,6 @@
if ( event.which === tskeyCodes.escape ) { if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape // make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( liveSearch === false ) {
return;
// don't return if the search value is empty ( all rows need to be revealed ) // don't return if the search value is empty ( all rows need to be revealed )
} else if ( this.value !== '' && ( } else if ( this.value !== '' && (
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
@ -827,26 +824,32 @@
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return; return;
// live search
} else if ( liveSearch === false ) {
if ( this.value !== '' && event.which !== tskeyCodes.enter ) {
return;
}
} }
// change event = no delay; last true flag tells getFilters to skip newest timed input // change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true, column ); tsf.searching( table, true, true, column );
}) })
// include change for select - fixes #473 // include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) { .bind( 'search change keypress input blur '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically // don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 ), var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
eventType = event.type,
liveSearch = typeof wo.filter_liveSearch === 'boolean' ? liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch : wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column ); ts.getColumnData( table, wo.filter_liveSearch, column );
if ( table.config.widgetOptions.filter_initialized && if ( table.config.widgetOptions.filter_initialized &&
// immediate search if user presses enter // immediate search if user presses enter
( event.which === tskeyCodes.enter || ( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input // immediate search if a "search" or "blur" is triggered on the input
event.type === 'search' || ( eventType === 'search' || eventType === 'blur' ) ||
// change & input events must be ignored if liveSearch !== true // change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) && ( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number // prevent search if liveSearch is a number
liveSearch === true && ( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
// don't allow 'change' or 'input' event to process if the input value // don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685 // is the same - fixes #685
this.value !== c.lastSearch[column] this.value !== c.lastSearch[column]
@ -855,7 +858,7 @@
event.preventDefault(); event.preventDefault();
// init search with no delay // init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() ); $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
tsf.searching( table, event.type !== 'keypress', true, column ); tsf.searching( table, eventType !== 'keypress', true, column );
} }
}); });
}, },

View File

@ -1,4 +1,4 @@
/*! Widget: Pager - updated 4/18/2017 (v2.28.8) */ /*! Widget: Pager - updated 5/24/2017 (v2.28.11) */
/* Requires tablesorter v2.8+ and jQuery 1.7+ /* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */
@ -244,12 +244,15 @@
wo = c.widgetOptions, wo = c.widgetOptions,
namespace = c.namespace + 'pager', namespace = c.namespace + 'pager',
s = wo.pager_selectors; s = wo.pager_selectors;
c.$table c.$table
.off( namespace ) .off( namespace )
.on( 'filterInit filterStart '.split( ' ' ).join( namespace + ' ' ), function( e, filters ) { .on( 'filterInit filterStart '.split( ' ' ).join( namespace + ' ' ), function( e, filters ) {
p.currentFilters = $.isArray( filters ) ? filters : c.$table.data( 'lastSearch' ); p.currentFilters = $.isArray( filters ) ? filters : c.$table.data( 'lastSearch' );
var filtersEqual; var filtersEqual;
if (p.ajax && e.type === 'filterInit') {
// ensure pager ajax is called after filter widget has initialized
return tsp.moveToPage( c, p, false );
}
if (ts.filter.equalFilters) { if (ts.filter.equalFilters) {
filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters); filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters);
} else { } else {
@ -270,7 +273,6 @@
tsp.updateCache( c ); tsp.updateCache( c );
} }
tsp.updatePageDisplay( c, false ); tsp.updatePageDisplay( c, false );
// tsp.moveToPage( c, p, false ); <-- called when applyWidgets is triggered
ts.applyWidget( c.table ); ts.applyWidget( c.table );
} }
}) })
@ -1110,7 +1112,7 @@
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered : p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 ); ( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
tsp.updatePageDisplay( c, false ); tsp.updatePageDisplay( c, false );
} else if (p.initialized) { } else {
tsp.getAjax( c ); tsp.getAjax( c );
} }
} else if ( !p.ajax ) { } else if ( !p.ajax ) {

View File

@ -1,7 +1,7 @@
{ {
"name": "tablesorter", "name": "tablesorter",
"title": "tablesorter", "title": "tablesorter",
"version": "2.28.10", "version": "2.28.11",
"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.", "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": { "author": {
"name": "Christian Bach", "name": "Christian Bach",
@ -58,7 +58,7 @@
"grunt-contrib-cssmin": "^2.2.0", "grunt-contrib-cssmin": "^2.2.0",
"grunt-contrib-jshint": "^1.1.0", "grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^2.0.0", "grunt-contrib-qunit": "^2.0.0",
"grunt-contrib-uglify": "^3.0.0", "grunt-contrib-uglify": "^3.0.1",
"grunt-contrib-watch": "^1.0.0", "grunt-contrib-watch": "^1.0.0",
"grunt-htmlhint": "^0.9.13", "grunt-htmlhint": "^0.9.13",
"grunt-jscs": "^3.0.1", "grunt-jscs": "^3.0.1",

View File

@ -1,7 +1,7 @@
{ {
"name": "tablesorter", "name": "tablesorter",
"title": "tablesorter", "title": "tablesorter",
"version": "2.28.10", "version": "2.28.11",
"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.", "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": { "author": {
"name": "Christian Bach", "name": "Christian Bach",