Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2016-12-08 07:49:47 -06:00
commit f032f4aa22
21 changed files with 134 additions and 111 deletions

View File

@ -102,6 +102,18 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.28.1">Version 2.28.1</a> (11/27/2016)
* Core:
* Update dist files. Fixes [issue #1331](https://github.com/Mottie/tablesorter/issues/1331).
* Filter:
* Fix searchDelay & minimum character count. See [issue #1299](https://github.com/Mottie/tablesorter/issues/1299).
* Fix liveSearch ignoring searchDelay. See [issue #1299](https://github.com/Mottie/tablesorter/issues/1299).
* Print
* Use `hasWidget` function.
* UI-theme:
* Use `hasWidget` function. Fixes [issue #1327](https://github.com/Mottie/tablesorter/issues/1327).
#### <a name="v2.28.0">Version 2.28.0</a> (11/27/2016)
* Core:
@ -139,21 +151,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* ColumnSelector: `updateAll` properly updates the popup. See [Stack Overflow](http://stackoverflow.com/q/39669948/145346).
* Pager: Maintain filter focus on custom controls. Fixes [issue #1296](https://github.com/Mottie/tablesorter/issues/1296).
* Readme: Add link to Grav CMS. See [issue #1290](https://github.com/Mottie/tablesorter/issues/1290).
#### <a name="v2.27.7">Version 2.27.7</a> (9/23/2016)
* Core:
* Include version in log.
* Remove space from debug message.
* Docs: update jQuery.
* Filter:
* Include "input" event for searches. See [issue #1280](https://github.com/Mottie/tablesorter/issues/1280).
* Add support for descending sort on selectSources values.
* Mark: Remove internal case matching.
* Pager:
* Allow for optional output callback in favour of parsable string. See [pull #1283](https://github.com/Mottie/tablesorter/pull/1283); thanks [@joelperry93](https://github.com/joelperry93)!
* Add output function support to pager widget. See [pull #1283](https://github.com/Mottie/tablesorter/pull/1283).
* Maintain `pageDisplay` ID, if one exists. Fixes [issue #1288](https://github.com/Mottie/tablesorter/issues/1288).
* RepeatHeaders:
* Repeat HTML content instead of only text. See [pull #1282](https://github.com/Mottie/tablesorter/pull/1282); thanks [@Milania1](https://github.com/Milania1)!
* Testing: update jQuery usage.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.0 *//*
/*! TableSorter (FORK) v2.28.1 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.0',
version : '2.28.1',
parsers : [],
widgets : [],
@ -2420,7 +2420,7 @@
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
@ -2432,7 +2432,7 @@
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}
@ -2907,7 +2907,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -3033,7 +3033,7 @@
.addClass(themes.icons || '');
}
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
if (ts.hasWidget( c.table, 'filter' )) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@ -3182,7 +3182,7 @@
})(jQuery);
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -4006,7 +4006,7 @@
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
tsf.searching( table, true, true, column );
})
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@ -4015,12 +4015,19 @@
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
// immediate search if user presses enter
( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input
event.type === 'search' ||
// change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) &&
// prevent search if liveSearch is a number
liveSearch === true &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
)
) {
event.preventDefault();
// init search with no delay
@ -4040,7 +4047,7 @@
wo.filter_liveSearch :
// get column setting, or set to fallback value, or default to false
ts.getColumnData( table, wo.filter_liveSearch, column );
if ( typeof liveSearch !== 'undefined' ) {
if ( typeof liveSearch === 'undefined' ) {
liveSearch = wo.filter_liveSearch.fallback || false;
}
}

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.0 *//*
/*! TableSorter (FORK) v2.28.1 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.0',
version : '2.28.1',
parsers : [],
widgets : [],
@ -2418,7 +2418,7 @@
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
@ -2430,7 +2430,7 @@
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -112,7 +112,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -238,7 +238,7 @@
.addClass(themes.icons || '');
}
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
if (ts.hasWidget( c.table, 'filter' )) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@ -387,7 +387,7 @@
})(jQuery);
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1211,7 +1211,7 @@
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
tsf.searching( table, true, true, column );
})
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@ -1220,12 +1220,19 @@
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
// immediate search if user presses enter
( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input
event.type === 'search' ||
// change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) &&
// prevent search if liveSearch is a number
liveSearch === true &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
)
) {
event.preventDefault();
// init search with no delay
@ -1245,7 +1252,7 @@
wo.filter_liveSearch :
// get column setting, or set to fallback value, or default to false
ts.getColumnData( table, wo.filter_liveSearch, column );
if ( typeof liveSearch !== 'undefined' ) {
if ( typeof liveSearch === 'undefined' ) {
liveSearch = wo.filter_liveSearch.fallback || false;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Parser: input & select - updated 11/26/2016 (v2.28.0) */
!function(a){"use strict";var b=function(a,b,c){};a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input"),f=e.length?e.val():b,g=a.tablesorter.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),c);return b&&"number"==typeof g?g:b?a.trim(b&&c.config.ignoreCase?b.toLocaleLowerCase():b):b},parsed:!0,type:"numeric"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d){var e=a(d),f=c.config.widgetOptions,g=f.group_checkbox?f.group_checkbox:["checked","unchecked"],h=e.find('input[type="checkbox"]'),i=h.length?h[0].checked:"";return h.length?g[i?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.find("option:selected").text()||"":b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(b,c,d){var e=a(d).find("textarea");return e.length?e.val():b},parsed:!0,type:"text"}),ts.defaults.checkboxClass="",ts.defaults.checkboxVisible="",a(function(){if(a.fn.on){var c=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},d=function(b,c){var d=window.navigator.userAgent,e=b.children("tbody").children(":visible"),f=e.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),g=e.filter("."+c+"-"+b).length,h=g===f&&f>0;0===g||h?(this.checked=h,this.indeterminate=!1):(this.checked=!(d.indexOf("Trident/")>-1||d.indexOf("Edge/")>-1),this.indeterminate=!0)})};a("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var e=".parser-forms";a(this).children("tbody").off(e).on("mouseleave"+e,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+e,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+e,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(e+" "),"select, input, textarea",function(e){if(27===e.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===e.type||"keyup"===e.type&&13===e.which&&("INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName&&e.altKey)){var f,g,h=a(e.target),i="checkbox"===e.target.type,j=h.closest("td"),k=j.closest("table"),l=j[0].cellIndex,m=k[0].config||!1,n=k.length&&k[0].tablesorterBusy,o=m&&m.$headerIndexed&&m.$headerIndexed[l]||[],p=i?e.target.checked:h.val();if(a.isEmptyObject(m)||n!==!1)return;if(i&&(g=m.checkboxClass||"checked",c(j.closest("tr"),g,l,p),d(k,g)),o.length&&(o.hasClass("parser-false")||o.hasClass("sorter-false")&&o.hasClass("filter-false"))||"change"===e.type&&m.table.isUpdating)return;(m&&p!==h.data("ts-original-value")||i)&&(h.data("ts-original-value",p),k[0].tablesorterBusy=!0,a.tablesorter.updateCell(m,j,f,function(){b(e,k,h),k[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(e).on("tablesorter-ready"+e,function(){var b,c=a(this),e=c.length&&c[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",d(c,b),this.tablesorterBusy=!1)}).children("thead").off(e).on("click"+e+" change"+e,'input[type="checkbox"]',function(e){var f,g,h,i,j,k,l=a(this),m=l.closest("table"),n=m.length&&m[0].config,o=this.checked;return!(!m.length||!n||m[0].tablesorterBusy)&&(h=parseInt(l.closest("td, th").attr("data-column"),10),j="checkbox"===n.parsers[h].id,g=m.length&&n.checkboxVisible,m[0].tablesorterBusy=!0,i=m.children("tbody").children("tr"+("undefined"==typeof g||g===!0?":visible":"")).children(":nth-child("+(h+1)+")").find('input[type="checkbox"]').prop("checked",o),k=n.checkboxClass||"checked",i.each(function(){c(a(this).closest("tr"),k,h,o)}),d(m,k),j?a.tablesorter.update(n,f,function(){b(e,m,i),m[0].tablesorterBusy=!1}):(b(e,m,i),m[0].tablesorterBusy=!1),!0)})})}})}(jQuery);
!function(a){"use strict";var b=function(a,b,c){};a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input"),f=e.length?e.val():b,g=a.tablesorter.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),c);return b&&"number"==typeof g?g:b?a.trim(b&&c.config.ignoreCase?b.toLocaleLowerCase():b):b},parsed:!0,type:"numeric"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d){var e=a(d),f=c.config.widgetOptions,g=f.group_checkbox?f.group_checkbox:["checked","unchecked"],h=e.find('input[type="checkbox"]'),i=h.length?h[0].checked:"";return h.length?g[i?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.find("option:selected").text()||"":b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(b,c,d){var e=a(d).find("textarea");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.defaults.checkboxClass="",a.tablesorter.defaults.checkboxVisible="",a(function(){if(a.fn.on){var c=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},d=function(b,c){var d=window.navigator.userAgent,e=b.children("tbody").children(":visible"),f=e.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),g=e.filter("."+c+"-"+b).length,h=g===f&&f>0;0===g||h?(this.checked=h,this.indeterminate=!1):(this.checked=!(d.indexOf("Trident/")>-1||d.indexOf("Edge/")>-1),this.indeterminate=!0)})};a("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var e=".parser-forms";a(this).children("tbody").off(e).on("mouseleave"+e,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+e,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+e,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(e+" "),"select, input, textarea",function(e){if(27===e.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===e.type||"keyup"===e.type&&13===e.which&&("INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName&&e.altKey)){var f,g,h=a(e.target),i="checkbox"===e.target.type,j=h.closest("td"),k=j.closest("table"),l=j[0].cellIndex,m=k[0].config||!1,n=k.length&&k[0].tablesorterBusy,o=m&&m.$headerIndexed&&m.$headerIndexed[l]||[],p=i?e.target.checked:h.val();if(a.isEmptyObject(m)||n!==!1)return;if(i&&(g=m.checkboxClass||"checked",c(j.closest("tr"),g,l,p),d(k,g)),o.length&&(o.hasClass("parser-false")||o.hasClass("sorter-false")&&o.hasClass("filter-false"))||"change"===e.type&&m.table.isUpdating)return;(m&&p!==h.data("ts-original-value")||i)&&(h.data("ts-original-value",p),k[0].tablesorterBusy=!0,a.tablesorter.updateCell(m,j,f,function(){b(e,k,h),k[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(e).on("tablesorter-ready"+e,function(){var b,c=a(this),e=c.length&&c[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",d(c,b),this.tablesorterBusy=!1)}).children("thead").off(e).on("click"+e+" change"+e,'input[type="checkbox"]',function(e){var f,g,h,i,j,k,l=a(this),m=l.closest("table"),n=m.length&&m[0].config,o=this.checked;return!(!m.length||!n||m[0].tablesorterBusy)&&(h=parseInt(l.closest("td, th").attr("data-column"),10),j="checkbox"===n.parsers[h].id,g=m.length&&n.checkboxVisible,m[0].tablesorterBusy=!0,i=m.children("tbody").children("tr"+("undefined"==typeof g||g===!0?":visible":"")).children(":nth-child("+(h+1)+")").find('input[type="checkbox"]').prop("checked",o),k=n.checkboxClass||"checked",i.each(function(){c(a(this).closest("tr"),k,h,o)}),d(m,k),j?a.tablesorter.update(n,f,function(){b(e,m,i),m[0].tablesorterBusy=!1}):(b(e,m,i),m[0].tablesorterBusy=!1),!0)})})}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(a){"use strict";var b=a.tablesorter,c=b.printTable={event:"printTable",basicStyle:"table, tr, td, th { border : solid 1px black; border-collapse : collapse; } td, th { padding: 2px; }",popupStyle:"width=500,height=300,scrollbars=1,resizable=1",init:function(a){a.$table.unbind(c.event).bind(c.event,function(){return c.process(a,a.widgetOptions),!1})},process:function(d,e){var f,g,h=a("<div/>").append(d.$table.clone()),i=c.basicStyle+"table { width: 100%; }."+(b.css.filterRow||"tablesorter-filter-row")+", ."+(e.filter_filteredRow||"filtered")+" { display: none; }."+(b.css.header||"tablesorter-header")+" { background-image: none !important; }@media print { .print_widget_hidden { display: none; } }";h.find("["+e.print_dataAttrib+"]").each(function(){f=a(this),f.text(f.attr(e.print_dataAttrib))}),g="data-"+(e.lazyload_data_attribute||"original"),h.find("img["+g+"]").each(function(){f=a(this),f.attr("src",f.attr(g))}),/^f/i.test(e.print_rows)?i+="tbody tr:not(."+(e.filter_filteredRow||"filtered")+") { display: table-row !important; }":/^a/i.test(e.print_rows)?i+="tbody tr { display: table-row !important; }":/^[.#:\[]/.test(e.print_rows)&&(i+="tbody tr"+e.print_rows+" { display: table-row !important; }"),/s/i.test(e.print_columns)&&d.selector&&d.widgets.indexOf("columnSelector")>=0?i+=e.columnSelector_mediaquery&&d.selector.auto?"":d.selector.$style.text():/a/i.test(e.print_columns)&&(i+="td, th { display: table-cell !important; }"),i+=e.print_extraCSS,a.isFunction(e.print_callback)?e.print_callback(d,h,i):c.printOutput(d,h.html(),i)},printOutput:function(a,d,e){var f=a.widgetOptions,g=b.language,h=window.open("",f.print_title,c.popupStyle),i=f.print_title||a.$table.find("caption").text()||a.$table[0].id||document.title||"table",j=f.print_now?"":'<div class="print_widget_hidden"><a href="javascript:window.print();"><button type="button">'+g.button_print+'</button></a> <a href="javascript:window.close();"><button type="button">'+g.button_close+"</button></a><hr></div>";return h.document.write("<html><head><title>"+i+"</title>"+(f.print_styleSheet?'<link rel="stylesheet" href="'+f.print_styleSheet+'">':"")+"<style>"+e+"</style></head><body>"+j+d+"</body></html>"),h.document.close(),f.print_now&&setTimeout(function(){h.print(),h.close()},10),!0},remove:function(a){a.$table.off(c.event)}};b.language.button_close="Close",b.language.button_print="Print",b.addWidget({id:"print",options:{print_title:"",print_dataAttrib:"data-name",print_rows:"filtered",print_columns:"selected",print_extraCSS:"",print_styleSheet:"",print_now:!0,print_callback:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter,c=b.printTable={event:"printTable",basicStyle:"table, tr, td, th { border : solid 1px black; border-collapse : collapse; } td, th { padding: 2px; }",popupStyle:"width=500,height=300,scrollbars=1,resizable=1",init:function(a){a.$table.unbind(c.event).bind(c.event,function(){return c.process(a,a.widgetOptions),!1})},process:function(d,e){var f,g,h=a("<div/>").append(d.$table.clone()),i=c.basicStyle+"table { width: 100%; }."+(b.css.filterRow||"tablesorter-filter-row")+", ."+(e.filter_filteredRow||"filtered")+" { display: none; }."+(b.css.header||"tablesorter-header")+" { background-image: none !important; }@media print { .print_widget_hidden { display: none; } }";h.find("["+e.print_dataAttrib+"]").each(function(){f=a(this),f.text(f.attr(e.print_dataAttrib))}),g="data-"+(e.lazyload_data_attribute||"original"),h.find("img["+g+"]").each(function(){f=a(this),f.attr("src",f.attr(g))}),/^f/i.test(e.print_rows)?i+="tbody tr:not(."+(e.filter_filteredRow||"filtered")+") { display: table-row !important; }":/^a/i.test(e.print_rows)?i+="tbody tr { display: table-row !important; }":/^[.#:\[]/.test(e.print_rows)&&(i+="tbody tr"+e.print_rows+" { display: table-row !important; }"),/s/i.test(e.print_columns)&&d.selector&&b.hasWidget(d.table,"columnSelector")?i+=e.columnSelector_mediaquery&&d.selector.auto?"":d.selector.$style.text():/a/i.test(e.print_columns)&&(i+="td, th { display: table-cell !important; }"),i+=e.print_extraCSS,a.isFunction(e.print_callback)?e.print_callback(d,h,i):c.printOutput(d,h.html(),i)},printOutput:function(a,d,e){var f=a.widgetOptions,g=b.language,h=window.open("",f.print_title,c.popupStyle),i=f.print_title||a.$table.find("caption").text()||a.$table[0].id||document.title||"table",j=f.print_now?"":'<div class="print_widget_hidden"><a href="javascript:window.print();"><button type="button">'+g.button_print+'</button></a> <a href="javascript:window.close();"><button type="button">'+g.button_close+"</button></a><hr></div>";return h.document.write("<html><head><title>"+i+"</title>"+(f.print_styleSheet?'<link rel="stylesheet" href="'+f.print_styleSheet+'">':"")+"<style>"+e+"</style></head><body>"+j+d+"</body></html>"),h.document.close(),f.print_now&&setTimeout(function(){h.print(),h.close()},10),!0},remove:function(a){a.$table.off(c.event)}};b.language.button_close="Close",b.language.button_print="Print",b.addWidget({id:"print",options:{print_title:"",print_dataAttrib:"data-name",print_rows:"filtered",print_columns:"selected",print_extraCSS:"",print_styleSheet:"",print_now:!0,print_callback:null},init:function(a,b,d){c.init(d)},remove:function(a,b){c.remove(b)}})}(jQuery);

View File

@ -1,2 +1,2 @@
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
!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 ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-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);
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
!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 ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-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||""),b.hasWidget(d.table,"filter")&&(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

@ -19,10 +19,7 @@
th { width: 16.7%; }
#result1, #result2 { color: red; font-size: .8em; font-weight: normal; vertical-align: text-top; }
</style>
<script src="../js/jquery.tablesorter.js"></script>
<!-- Tablesorter: optional -->
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
<script src="../dist/js/jquery.tablesorter.js"></script>
<script id="js">$(function() {
$('#table1').tablesorter({

View File

@ -17,9 +17,6 @@
<link rel="stylesheet" href="../css/theme.blue.css">
<script src="../js/jquery.tablesorter.js"></script>
<!-- Tablesorter: optional -->
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
<script id="js">$(function() {
// call the tablesorter plugin

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.0 *//*
/*! TableSorter (FORK) v2.28.1 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.0',
version : '2.28.1',
parsers : [],
widgets : [],
@ -2426,7 +2426,7 @@
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
@ -2438,7 +2438,7 @@
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}
@ -2913,7 +2913,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -3039,7 +3039,7 @@
.addClass(themes.icons || '');
}
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
if (ts.hasWidget( c.table, 'filter' )) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@ -3188,7 +3188,7 @@
})(jQuery);
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -4012,7 +4012,7 @@
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
tsf.searching( table, true, true, column );
})
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@ -4021,12 +4021,19 @@
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
// immediate search if user presses enter
( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input
event.type === 'search' ||
// change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) &&
// prevent search if liveSearch is a number
liveSearch === true &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
)
) {
event.preventDefault();
// init search with no delay
@ -4046,7 +4053,7 @@
wo.filter_liveSearch :
// get column setting, or set to fallback value, or default to false
ts.getColumnData( table, wo.filter_liveSearch, column );
if ( typeof liveSearch !== 'undefined' ) {
if ( typeof liveSearch === 'undefined' ) {
liveSearch = wo.filter_liveSearch.fallback || false;
}
}

View File

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

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -118,7 +118,7 @@
})(jQuery, window, document);
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -244,7 +244,7 @@
.addClass(themes.icons || '');
}
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
if (ts.hasWidget( c.table, 'filter' )) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@ -393,7 +393,7 @@
})(jQuery);
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1217,7 +1217,7 @@
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
tsf.searching( table, true, true, column );
})
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@ -1226,12 +1226,19 @@
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
// immediate search if user presses enter
( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input
event.type === 'search' ||
// change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) &&
// prevent search if liveSearch is a number
liveSearch === true &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
)
) {
event.preventDefault();
// init search with no delay
@ -1251,7 +1258,7 @@
wo.filter_liveSearch :
// get column setting, or set to fallback value, or default to false
ts.getColumnData( table, wo.filter_liveSearch, column );
if ( typeof liveSearch !== 'undefined' ) {
if ( typeof liveSearch === 'undefined' ) {
liveSearch = wo.filter_liveSearch.fallback || false;
}
}

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -822,7 +822,7 @@
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
tsf.searching( table, true, true, column );
})
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@ -831,12 +831,19 @@
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
// immediate search if user presses enter
( event.which === tskeyCodes.enter ||
// immediate search if a "search" is triggered on the input
event.type === 'search' ||
// change & input events must be ignored if liveSearch !== true
( event.type === 'change' || event.type === 'input' ) &&
// prevent search if liveSearch is a number
liveSearch === true &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
)
) {
event.preventDefault();
// init search with no delay
@ -856,7 +863,7 @@
wo.filter_liveSearch :
// get column setting, or set to fallback value, or default to false
ts.getColumnData( table, wo.filter_liveSearch, column );
if ( typeof liveSearch !== 'undefined' ) {
if ( typeof liveSearch === 'undefined' ) {
liveSearch = wo.filter_liveSearch.fallback || false;
}
}

View File

@ -1,4 +1,4 @@
/* Widget: print - updated 4/11/2016 (v2.25.8) *//*
/* Widget: print - updated 12/8/2016 (v2.28.1) *//*
* Requires tablesorter v2.8+ and jQuery 1.2.6+
*/
/*jshint browser:true, jquery:true, unused:false */
@ -70,7 +70,7 @@
// columnSelector -> c.selector.$style
// Assume 'visible' means hidden columns have a 'display:none' style, or a class name
// add the definition to the wo.print_extraCSS option
if (/s/i.test(wo.print_columns) && c.selector && c.widgets.indexOf('columnSelector') >= 0) {
if (/s/i.test(wo.print_columns) && c.selector && ts.hasWidget( c.table, 'columnSelector' )) {
// show selected (visible) columns; make a copy of the columnSelector widget css (not media queries)
printStyle += wo.columnSelector_mediaquery && c.selector.auto ? '' : c.selector.$style.text();
} else if (/a/i.test(wo.print_columns)) {

View File

@ -1,4 +1,4 @@
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
;(function ($) {
'use strict';
var ts = $.tablesorter || {};
@ -124,7 +124,7 @@
.addClass(themes.icons || '');
}
// filter widget initializes after uitheme
if (c.widgets.indexOf('filter') > -1) {
if (ts.hasWidget( c.table, 'filter' )) {
tmp = function() {
$table.children('thead').children('.' + ts.css.filterRow)
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.28.0",
"version": "2.28.1",
"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.28.0",
"version": "2.28.1",
"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",