|
4 | 4 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5 | 5 | █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6 | 6 | */
|
7 |
| -/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/ |
| 7 | +/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/ |
8 | 8 | /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9 | 9 | (function(factory) {
|
10 | 10 | if (typeof define === 'function' && define.amd) {
|
|
16 | 16 | }
|
17 | 17 | }(function(jQuery) {
|
18 | 18 |
|
19 |
| -/*! TableSorter (FORK) v2.28.0 *//* |
| 19 | +/*! TableSorter (FORK) v2.28.1 *//* |
20 | 20 | * Client-side table sorting with ease!
|
21 | 21 | * @requires jQuery v1.2.6+
|
22 | 22 | *
|
|
40 | 40 | 'use strict';
|
41 | 41 | var ts = $.tablesorter = {
|
42 | 42 |
|
43 |
| - version : '2.28.0', |
| 43 | + version : '2.28.1', |
44 | 44 |
|
45 | 45 | parsers : [],
|
46 | 46 | widgets : [],
|
|
2426 | 2426 | validateOptions : function( c ) {
|
2427 | 2427 | var setting, setting2, typ, timer,
|
2428 | 2428 | // ignore options containing an array
|
2429 |
| - ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ), |
| 2429 | + ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ), |
2430 | 2430 | orig = c.originalSettings;
|
2431 | 2431 | if ( orig ) {
|
2432 | 2432 | if ( c.debug ) {
|
|
2438 | 2438 | console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
|
2439 | 2439 | } else if ( typ === 'object' ) {
|
2440 | 2440 | for ( setting2 in orig[setting] ) {
|
2441 |
| - typ = typeof ts.defaults[setting][setting2]; |
| 2441 | + typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2]; |
2442 | 2442 | if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
|
2443 | 2443 | console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
|
2444 | 2444 | }
|
|
2913 | 2913 |
|
2914 | 2914 | })(jQuery, window, document);
|
2915 | 2915 |
|
2916 |
| -/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */ |
| 2916 | +/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ |
2917 | 2917 | ;(function ($) {
|
2918 | 2918 | 'use strict';
|
2919 | 2919 | var ts = $.tablesorter || {};
|
|
3039 | 3039 | .addClass(themes.icons || '');
|
3040 | 3040 | }
|
3041 | 3041 | // filter widget initializes after uitheme
|
3042 |
| - if (c.widgets.indexOf('filter') > -1) { |
| 3042 | + if (ts.hasWidget( c.table, 'filter' )) { |
3043 | 3043 | tmp = function() {
|
3044 | 3044 | $table.children('thead').children('.' + ts.css.filterRow)
|
3045 | 3045 | .removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
|
3188 | 3188 |
|
3189 | 3189 | })(jQuery);
|
3190 | 3190 |
|
3191 |
| -/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//* |
| 3191 | +/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//* |
3192 | 3192 | * Requires tablesorter v2.8+ and jQuery 1.7+
|
3193 | 3193 | * by Rob Garrison
|
3194 | 3194 | */
|
|
4012 | 4012 | return;
|
4013 | 4013 | }
|
4014 | 4014 | // change event = no delay; last true flag tells getFilters to skip newest timed input
|
4015 |
| - tsf.searching( table, true, true ); |
| 4015 | + tsf.searching( table, true, true, column ); |
4016 | 4016 | })
|
4017 | 4017 | // include change for select - fixes #473
|
4018 | 4018 | .bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
|
|
4021 | 4021 | liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
|
4022 | 4022 | wo.filter_liveSearch :
|
4023 | 4023 | ts.getColumnData( table, wo.filter_liveSearch, column );
|
4024 |
| - // don't allow 'change' event to process if the input value is the same - fixes #685 |
4025 | 4024 | if ( table.config.widgetOptions.filter_initialized &&
|
4026 |
| - ( event.which === tskeyCodes.enter || event.type === 'search' || |
4027 |
| - ( event.type === 'change' || |
4028 |
| - ( event.type === 'input' && liveSearch === true ) ) && |
4029 |
| - this.value !== c.lastSearch[column] ) |
| 4025 | + // immediate search if user presses enter |
| 4026 | + ( event.which === tskeyCodes.enter || |
| 4027 | + // immediate search if a "search" is triggered on the input |
| 4028 | + event.type === 'search' || |
| 4029 | + // change & input events must be ignored if liveSearch !== true |
| 4030 | + ( event.type === 'change' || event.type === 'input' ) && |
| 4031 | + // prevent search if liveSearch is a number |
| 4032 | + liveSearch === true && |
| 4033 | + // don't allow 'change' or 'input' event to process if the input value |
| 4034 | + // is the same - fixes #685 |
| 4035 | + this.value !== c.lastSearch[column] |
| 4036 | + ) |
4030 | 4037 | ) {
|
4031 | 4038 | event.preventDefault();
|
4032 | 4039 | // init search with no delay
|
|
4046 | 4053 | wo.filter_liveSearch :
|
4047 | 4054 | // get column setting, or set to fallback value, or default to false
|
4048 | 4055 | ts.getColumnData( table, wo.filter_liveSearch, column );
|
4049 |
| - if ( typeof liveSearch !== 'undefined' ) { |
| 4056 | + if ( typeof liveSearch === 'undefined' ) { |
4050 | 4057 | liveSearch = wo.filter_liveSearch.fallback || false;
|
4051 | 4058 | }
|
4052 | 4059 | }
|
|
0 commit comments