version bump

This commit is contained in:
Rob Garrison 2016-01-15 07:52:22 -06:00
parent 1046652c30
commit 01b531ee8e
19 changed files with 181 additions and 109 deletions

View File

@ -92,6 +92,19 @@ If you would like to contribute, please...
View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.25.2">Version 2.25.2</a> (1/15/2016)
* Docs:
* Update main demo & test to use jQuery 3.0.0-beta.
* Core:
* Revert extra header class name updating. See [issue #1116](https://github.com/Mottie/tablesorter/issues/1116).
* Filter:
* Add `filter_resetOnEsc` option. See [issue #1126](https://github.com/Mottie/tablesorter/issues/1126).
* Output:
* `output_saveRows` now accpets a [filter callback function](http://api.jquery.com/filter/#filter-function).
* Parsers:
* checkbox value should no longer change. Fixes [issue #1125](https://github.com/Mottie/tablesorter/issues/1125).
#### <a name="v2.25.1">Version 2.25.1</a> (1/10/2016)
* Docs:
@ -171,32 +184,3 @@ View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes
* Return `true` for header checkbox to work in IE8. See [issue #1090](https://github.com/Mottie/tablesorter/issues/1090).
* Misc
* gitignore file - ignore "idea" demos used for testing.
#### <a name="v2.24.6">Version 2.24.6</a> (11/22/2015)
* Core
* Prevent "tablesorter-ready" event from firing multiple times in a row.
* While detecting parsers, use `cssIgnoreRow` &amp; stop after 50 rows.
* Docs
* Update utility options section.
* Math
* Add `math_rowFilter` option. See [issue #1083](https://github.com/Mottie/tablesorter/issues/1083).
* Spelling corrections to `math_rowFilter` option.
* Ensure internal updating flag gets cleared. Fixes [issue #1083](https://github.com/Mottie/tablesorter/issues/1083).
* Pager
* Initial page no longer ignored (no filter widget). Fixes [issue #1085](https://github.com/Mottie/tablesorter/issues/1085).
* Fix other page set issues (no filter widget). Fixes [issue #1085](https://github.com/Mottie/tablesorter/issues/1085).
* Fix page set issues (with filter widget). Fixes [issue #1085](https://github.com/Mottie/tablesorter/issues/1085).
* Clean up pager widget code.
* Print
* Add `print_now` option. See [issue #1081](https://github.com/Mottie/tablesorter/issues/1081).
* Fix print &amp; close button actions.
* SortTbodies
* Use config parameter for numeric sorting. See [issue #1082](https://github.com/Mottie/tablesorter/issues/1082).
* Parsers:
* Update `parser-input-select.js`. See [issue #971](https://github.com/Mottie/tablesorter/issues/971).
* `parser-date-month.js` no longer removes other language data.
* Add alternate date range parser &amp; update filter insideRange filter type.
* Don't use `$.extend` for simple additions.
* Misc
* Update grunt dependencies.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
/*! tablesorter (FORK) - updated 01-15-2016 (v2.25.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.1 *//*
/*! TableSorter (FORK) v2.25.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -33,7 +33,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.1',
version : '2.25.2',
parsers : [],
widgets : [],
@ -202,6 +202,10 @@
bottom : false
},
keyCodes : {
enter : 13
},
// placeholder date parser data (globalize)
dates : {},
@ -470,7 +474,7 @@
// only recognize left clicks
if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) ||
// allow pressing enter
( type === ' keyup ' && e.which !== 13 ) ||
( type === ' keyup ' && e.which !== ts.keyCodes.enter ) ||
// allow triggering a click event (e.which is undefined) & ignore physical clicks
( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) {
return;
@ -1058,8 +1062,8 @@
// find the footer
$headers = c.$table
.find( 'tfoot tr' )
.add( $( c.namespace + '_extra_headers' ).children( 'tr' ) )
.children( 'td, th' )
.add( $( c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers
@ -3080,7 +3084,7 @@
})(jQuery);
/*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
/*! Widget: filter - updated 1/15/2016 (v2.25.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3088,7 +3092,8 @@
'use strict';
var tsf, tsfRegex,
ts = $.tablesorter || {},
tscss = ts.css;
tscss = ts.css,
tskeyCodes = ts.keyCodes;
$.extend( tscss, {
filterRow : 'tablesorter-filter-row',
@ -3097,6 +3102,14 @@
filterRowHide : 'hideme'
});
$.extend( tskeyCodes, {
backSpace : 8,
escape : 27,
space : 32,
left : 37,
down : 40
});
ts.addWidget({
id: 'filter',
priority: 50,
@ -3121,6 +3134,7 @@
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
filter_resetOnEsc : true, // Reset filter input when the user presses escape - normalized across browsers
filter_saveFilters : false, // Use the $.tablesorter.storage utility to save the most recent filters
filter_searchDelay : 300, // typing delay in milliseconds before starting a search
filter_searchFiltered: true, // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true
@ -3829,18 +3843,25 @@
ts.setFilters( table, c.$table.data( 'lastSearch' ) || [], internal === false );
}
// unbind events
tmp = ( 'keypress keyup search change '.split( ' ' ).join( namespace + ' ' ) );
tmp = ( 'keypress keyup keydown search change input '.split( ' ' ).join( namespace + ' ' ) );
$el
// use data attribute instead of jQuery data since the head is cloned without including
// the data/binding
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
// include change for select - fixes #473
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
if ( event.which === 27 ) {
this.value = '';
if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( wo.filter_liveSearch === false ) {
return;
@ -3849,19 +3870,21 @@
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
// let return & backspace continue on, but ignore arrows & non-valid characters
( event.which !== 13 && event.which !== 8 &&
( event.which < 32 || ( event.which >= 37 && event.which <= 40 ) ) ) ) ) {
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
})
.bind( 'search change keypress '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'change' || event.type === 'input' ) && this.value !== c.lastSearch[column] ) ) {
event.preventDefault();
// init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.1 *//*
/*! TableSorter (FORK) v2.25.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -31,7 +31,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.1',
version : '2.25.2',
parsers : [],
widgets : [],
@ -200,6 +200,10 @@
bottom : false
},
keyCodes : {
enter : 13
},
// placeholder date parser data (globalize)
dates : {},
@ -468,7 +472,7 @@
// only recognize left clicks
if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) ||
// allow pressing enter
( type === ' keyup ' && e.which !== 13 ) ||
( type === ' keyup ' && e.which !== ts.keyCodes.enter ) ||
// allow triggering a click event (e.which is undefined) & ignore physical clicks
( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) {
return;
@ -1056,8 +1060,8 @@
// find the footer
$headers = c.$table
.find( 'tfoot tr' )
.add( $( c.namespace + '_extra_headers' ).children( 'tr' ) )
.children( 'td, th' )
.add( $( c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
/*! tablesorter (FORK) - updated 01-15-2016 (v2.25.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -366,7 +366,7 @@
})(jQuery);
/*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
/*! Widget: filter - updated 1/15/2016 (v2.25.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -374,7 +374,8 @@
'use strict';
var tsf, tsfRegex,
ts = $.tablesorter || {},
tscss = ts.css;
tscss = ts.css,
tskeyCodes = ts.keyCodes;
$.extend( tscss, {
filterRow : 'tablesorter-filter-row',
@ -383,6 +384,14 @@
filterRowHide : 'hideme'
});
$.extend( tskeyCodes, {
backSpace : 8,
escape : 27,
space : 32,
left : 37,
down : 40
});
ts.addWidget({
id: 'filter',
priority: 50,
@ -407,6 +416,7 @@
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
filter_resetOnEsc : true, // Reset filter input when the user presses escape - normalized across browsers
filter_saveFilters : false, // Use the $.tablesorter.storage utility to save the most recent filters
filter_searchDelay : 300, // typing delay in milliseconds before starting a search
filter_searchFiltered: true, // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true
@ -1115,18 +1125,25 @@
ts.setFilters( table, c.$table.data( 'lastSearch' ) || [], internal === false );
}
// unbind events
tmp = ( 'keypress keyup search change '.split( ' ' ).join( namespace + ' ' ) );
tmp = ( 'keypress keyup keydown search change input '.split( ' ' ).join( namespace + ' ' ) );
$el
// use data attribute instead of jQuery data since the head is cloned without including
// the data/binding
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
// include change for select - fixes #473
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
if ( event.which === 27 ) {
this.value = '';
if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( wo.filter_liveSearch === false ) {
return;
@ -1135,19 +1152,21 @@
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
// let return & backspace continue on, but ignore arrows & non-valid characters
( event.which !== 13 && event.which !== 8 &&
( event.which < 32 || ( event.which >= 37 && event.which <= 40 ) ) ) ) ) {
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
})
.bind( 'search change keypress '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'change' || event.type === 'input' ) && this.value !== c.lastSearch[column] ) ) {
event.preventDefault();
// init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Parser: input & select - updated 1/13/2016 (v2.25.2) */
/*! Parser: input & select - updated 1/15/2016 (v2.25.2) */
!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,e){var f=a(d),g=c.config.widgetOptions,h=g.group_checkbox?g.group_checkbox:["checked","unchecked"],i=f.find('input[type="checkbox"]'),j=i.length?i[0].checked:"";return i.length?h[j?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(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=b.children("tbody").children(":visible"),e=d.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),f=d.filter("."+c+"-"+b).length,g=f===e;0===f||g?(this.checked=g,this.indeterminate=!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("change"+e,'input[type="checkbox"]',function(e){var f,g,h,i,j,k,l,m=a(this),n=m.closest("table"),o=n.length&&n[0].config,p=this.checked;return n.length&&o&&!n[0].tablesorterBusy?(h=parseInt(m.closest("td, th").attr("data-column"),10),j="checkbox"===o.parsers[h].id,g=n.length&&o.checkboxVisible,n[0].tablesorterBusy=!0,i=n.children("tbody").children("tr"+("undefined"==typeof g||g===!0?":visible":"")).children(":nth-child("+(h+1)+")").find('input[type="checkbox"]').prop("checked",p),j?a.tablesorter.update(o,f,function(){b(e,n,i),n[0].tablesorterBusy=!1}):(l=o.checkboxClass||"checked",i.each(function(){k=a(this).closest("tr"),c(a(this).closest("tr"),l,h,p)}),d(n,l),b(e,n,i),n[0].tablesorterBusy=!1),!0):!1})})}})}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -483,7 +483,7 @@
<li><span class="label label-info">Beta</span> <a href="example-widget-lazyload.html">Lazyload widget</a> (<span class="version">v2.24.0</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.0</span>).</li>
<li>
<a href="example-widget-output.html">Output widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.1</span>).
<a href="example-widget-output.html">Output widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.25.2</span>).
<br><br>
</li>
@ -527,7 +527,7 @@
<li><a href="example-parsers-feet-inch-fraction.html">Feet-inch-fraction parser</a> (<span class="version">v2.8</span>).</li>
<li><a href="example-parsers-file-type.html">File type &amp extension parsers</a> (<span class="version">v2.13</span>; <span class="version updated">v2.24.4</span>).</li>
<li><a href="example-parsers-ignore-articles.html">Ignore leading articles parser</a> (Ignore &quot;A&quot;, &quot;An&quot; and &quot;The&quot; in titles) (<span class="version">v2.8</span>).</li>
<li><a href="example-widget-grouping.html">Input/select parsers</a> (used by Grouping rows widget) (<span class="version">v2.8</span>; <span class="version updated">v2.24.6</span>).</li>
<li><a href="example-widget-grouping.html">Input/select parsers</a> (used by Grouping rows widget) (<span class="version">v2.8</span>; <span class="version updated">v2.25.2</span>).</li>
<li><a href="example-parsers-globalize.html">jQuery Globalize</a> (number &amp; date parsers; <span class="version">v2.22.0</span>; <span class="version updated">v2.25.0</span>).</li>
<li><a href="example-parsers-metric.html">Metric parser</a> (<span class="version">v2.8</span>).</li>
<li><a href="example-parsers-named-numbers.html">Named Numbers parser</a> (<span class="version">v2.18.0</span>; <span class="version updated">v2.22.0</span>).</li>

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
/*! tablesorter (FORK) - updated 01-15-2016 (v2.25.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function($) {
/*! TableSorter (FORK) v2.25.1 *//*
/*! TableSorter (FORK) v2.25.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -39,7 +39,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.25.1',
version : '2.25.2',
parsers : [],
widgets : [],
@ -208,6 +208,10 @@
bottom : false
},
keyCodes : {
enter : 13
},
// placeholder date parser data (globalize)
dates : {},
@ -476,7 +480,7 @@
// only recognize left clicks
if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) ||
// allow pressing enter
( type === ' keyup ' && e.which !== 13 ) ||
( type === ' keyup ' && e.which !== ts.keyCodes.enter ) ||
// allow triggering a click event (e.which is undefined) & ignore physical clicks
( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) {
return;
@ -1064,8 +1068,8 @@
// find the footer
$headers = c.$table
.find( 'tfoot tr' )
.add( $( c.namespace + '_extra_headers' ).children( 'tr' ) )
.children( 'td, th' )
.add( $( c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers
@ -3086,7 +3090,7 @@
})(jQuery);
/*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
/*! Widget: filter - updated 1/15/2016 (v2.25.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3094,7 +3098,8 @@
'use strict';
var tsf, tsfRegex,
ts = $.tablesorter || {},
tscss = ts.css;
tscss = ts.css,
tskeyCodes = ts.keyCodes;
$.extend( tscss, {
filterRow : 'tablesorter-filter-row',
@ -3103,6 +3108,14 @@
filterRowHide : 'hideme'
});
$.extend( tskeyCodes, {
backSpace : 8,
escape : 27,
space : 32,
left : 37,
down : 40
});
ts.addWidget({
id: 'filter',
priority: 50,
@ -3127,6 +3140,7 @@
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
filter_resetOnEsc : true, // Reset filter input when the user presses escape - normalized across browsers
filter_saveFilters : false, // Use the $.tablesorter.storage utility to save the most recent filters
filter_searchDelay : 300, // typing delay in milliseconds before starting a search
filter_searchFiltered: true, // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true
@ -3835,18 +3849,25 @@
ts.setFilters( table, c.$table.data( 'lastSearch' ) || [], internal === false );
}
// unbind events
tmp = ( 'keypress keyup search change '.split( ' ' ).join( namespace + ' ' ) );
tmp = ( 'keypress keyup keydown search change input '.split( ' ' ).join( namespace + ' ' ) );
$el
// use data attribute instead of jQuery data since the head is cloned without including
// the data/binding
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
// include change for select - fixes #473
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
if ( event.which === 27 ) {
this.value = '';
if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( wo.filter_liveSearch === false ) {
return;
@ -3855,19 +3876,21 @@
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
// let return & backspace continue on, but ignore arrows & non-valid characters
( event.which !== 13 && event.which !== 8 &&
( event.which < 32 || ( event.which >= 37 && event.which <= 40 ) ) ) ) ) {
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
})
.bind( 'search change keypress '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'change' || event.type === 'input' ) && this.value !== c.lastSearch[column] ) ) {
event.preventDefault();
// init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );

View File

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

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
/*! tablesorter (FORK) - updated 01-15-2016 (v2.25.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -372,7 +372,7 @@
})(jQuery);
/*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
/*! Widget: filter - updated 1/15/2016 (v2.25.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -380,7 +380,8 @@
'use strict';
var tsf, tsfRegex,
ts = $.tablesorter || {},
tscss = ts.css;
tscss = ts.css,
tskeyCodes = ts.keyCodes;
$.extend( tscss, {
filterRow : 'tablesorter-filter-row',
@ -389,6 +390,14 @@
filterRowHide : 'hideme'
});
$.extend( tskeyCodes, {
backSpace : 8,
escape : 27,
space : 32,
left : 37,
down : 40
});
ts.addWidget({
id: 'filter',
priority: 50,
@ -413,6 +422,7 @@
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
filter_reset : null, // jQuery selector string of an element used to reset the filters
filter_resetOnEsc : true, // Reset filter input when the user presses escape - normalized across browsers
filter_saveFilters : false, // Use the $.tablesorter.storage utility to save the most recent filters
filter_searchDelay : 300, // typing delay in milliseconds before starting a search
filter_searchFiltered: true, // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true
@ -1121,18 +1131,25 @@
ts.setFilters( table, c.$table.data( 'lastSearch' ) || [], internal === false );
}
// unbind events
tmp = ( 'keypress keyup search change '.split( ' ' ).join( namespace + ' ' ) );
tmp = ( 'keypress keyup keydown search change input '.split( ' ' ).join( namespace + ' ' ) );
$el
// use data attribute instead of jQuery data since the head is cloned without including
// the data/binding
.attr( 'data-lastSearchTime', new Date().getTime() )
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
// include change for select - fixes #473
.bind( 'keydown' + namespace, function( event ) {
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
// prevent keypress event
return false;
}
})
.bind( 'keyup' + namespace, function( event ) {
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
// emulate what webkit does.... escape clears the filter
if ( event.which === 27 ) {
this.value = '';
if ( event.which === tskeyCodes.escape ) {
// make sure to restore the last value on escape
this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
// live search
} else if ( wo.filter_liveSearch === false ) {
return;
@ -1141,19 +1158,21 @@
// liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
// let return & backspace continue on, but ignore arrows & non-valid characters
( event.which !== 13 && event.which !== 8 &&
( event.which < 32 || ( event.which >= 37 && event.which <= 40 ) ) ) ) ) {
( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
return;
}
// change event = no delay; last true flag tells getFilters to skip newest timed input
tsf.searching( table, true, true );
})
.bind( 'search change keypress '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
( event.type === 'change' || event.type === 'input' ) && this.value !== c.lastSearch[column] ) ) {
event.preventDefault();
// init search with no delay
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );

View File

@ -1,4 +1,4 @@
/*! Parser: input & select - updated 1/13/2016 (v2.25.2) *//*
/*! Parser: input & select - updated 1/15/2016 (v2.25.2) *//*
* for jQuery 1.7+ & tablesorter 2.7.11+
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
*/

View File

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

View File

@ -1,4 +1,4 @@
/*! Widget: output - updated 1/10/2016 (v2.25.1) *//*
/*! Widget: output - updated 1/15/2016 (v2.25.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* Modified from:
* HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?)

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.25.1",
"version": "2.25.2",
"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",