jquery-tablesorter 1.23.14 → 1.23.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jquery-tablesorter/version.rb +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +13 -9
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +4 -4
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +9 -5
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-columnSelector.js +6 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-jui.js +64 -58
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-select2.js +14 -12
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +8 -4
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-sort2Hash.js +14 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0174cfbb069870781ff7190466a647e1c2adef6d
|
4
|
+
data.tar.gz: 1c3148a7b59d0668953057219e279d5b4c2613b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c10902e944af29caa6b34b187a889212fabe87eb89147562cb8c2ac9472129474acd8d614e8f71eddeac3527d4d3cf73ee062dd4a3c914d621e2f1981660f4
|
7
|
+
data.tar.gz: ca0b113781b19faf0bab7b4b49a67cd93a76f1bfe89edceebe79ee28c66988009b65e3f169c7a44e947c211022a63811cb8210895803627fc42fabd023194451
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
}(function(jQuery) {
|
18
18
|
|
19
|
-
/*! TableSorter (FORK) v2.28.
|
19
|
+
/*! TableSorter (FORK) v2.28.15 *//*
|
20
20
|
* Client-side table sorting with ease!
|
21
21
|
* @requires jQuery v1.2.6+
|
22
22
|
*
|
@@ -40,7 +40,7 @@
|
|
40
40
|
'use strict';
|
41
41
|
var ts = $.tablesorter = {
|
42
42
|
|
43
|
-
version : '2.28.
|
43
|
+
version : '2.28.15',
|
44
44
|
|
45
45
|
parsers : [],
|
46
46
|
widgets : [],
|
@@ -2258,7 +2258,7 @@
|
|
2258
2258
|
cells = $rows[ i ].cells;
|
2259
2259
|
for ( j = 0; j < cells.length; j++ ) {
|
2260
2260
|
cell = cells[ j ];
|
2261
|
-
rowIndex =
|
2261
|
+
rowIndex = i;
|
2262
2262
|
rowSpan = cell.rowSpan || 1;
|
2263
2263
|
colSpan = cell.colSpan || 1;
|
2264
2264
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
@@ -2317,7 +2317,7 @@
|
|
2317
2317
|
if ( !valid ) {
|
2318
2318
|
$rows.each( function( indx, el ) {
|
2319
2319
|
var cell = el.parentElement.nodeName;
|
2320
|
-
if ( cells.indexOf( cell ) ) {
|
2320
|
+
if ( cells.indexOf( cell ) < 0 ) {
|
2321
2321
|
cells.push( cell );
|
2322
2322
|
}
|
2323
2323
|
});
|
@@ -3274,7 +3274,7 @@
|
|
3274
3274
|
|
3275
3275
|
})(jQuery);
|
3276
3276
|
|
3277
|
-
/*! Widget: filter - updated
|
3277
|
+
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
3278
3278
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3279
3279
|
* by Rob Garrison
|
3280
3280
|
*/
|
@@ -3345,8 +3345,10 @@
|
|
3345
3345
|
var tbodyIndex, $tbody,
|
3346
3346
|
$table = c.$table,
|
3347
3347
|
$tbodies = c.$tbodies,
|
3348
|
-
events =
|
3349
|
-
|
3348
|
+
events = (
|
3349
|
+
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
3350
|
+
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
3351
|
+
).split( ' ' ).join( c.namespace + 'filter ' );
|
3350
3352
|
$table
|
3351
3353
|
.removeClass( 'hasFilters' )
|
3352
3354
|
// add filter namespace to all BUT search
|
@@ -3875,7 +3877,9 @@
|
|
3875
3877
|
// so we have to work with it instead
|
3876
3878
|
formatterUpdated: function( $cell, column ) {
|
3877
3879
|
// prevent error if $cell is undefined - see #1056
|
3878
|
-
var
|
3880
|
+
var $table = $cell && $cell.closest( 'table' );
|
3881
|
+
var config = $table.length && $table[0].config,
|
3882
|
+
wo = config && config.widgetOptions;
|
3879
3883
|
if ( wo && !wo.filter_initialized ) {
|
3880
3884
|
// add updates by column since this function
|
3881
3885
|
// may be called numerous times before initialization
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.28.
|
1
|
+
/*! TableSorter (FORK) v2.28.15 *//*
|
2
2
|
* Client-side table sorting with ease!
|
3
3
|
* @requires jQuery v1.2.6+
|
4
4
|
*
|
@@ -22,7 +22,7 @@
|
|
22
22
|
'use strict';
|
23
23
|
var ts = $.tablesorter = {
|
24
24
|
|
25
|
-
version : '2.28.
|
25
|
+
version : '2.28.15',
|
26
26
|
|
27
27
|
parsers : [],
|
28
28
|
widgets : [],
|
@@ -2240,7 +2240,7 @@
|
|
2240
2240
|
cells = $rows[ i ].cells;
|
2241
2241
|
for ( j = 0; j < cells.length; j++ ) {
|
2242
2242
|
cell = cells[ j ];
|
2243
|
-
rowIndex =
|
2243
|
+
rowIndex = i;
|
2244
2244
|
rowSpan = cell.rowSpan || 1;
|
2245
2245
|
colSpan = cell.colSpan || 1;
|
2246
2246
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
@@ -2299,7 +2299,7 @@
|
|
2299
2299
|
if ( !valid ) {
|
2300
2300
|
$rows.each( function( indx, el ) {
|
2301
2301
|
var cell = el.parentElement.nodeName;
|
2302
|
-
if ( cells.indexOf( cell ) ) {
|
2302
|
+
if ( cells.indexOf( cell ) < 0 ) {
|
2303
2303
|
cells.push( cell );
|
2304
2304
|
}
|
2305
2305
|
});
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -408,7 +408,7 @@
|
|
408
408
|
|
409
409
|
})(jQuery);
|
410
410
|
|
411
|
-
/*! Widget: filter - updated
|
411
|
+
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
412
412
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
413
413
|
* by Rob Garrison
|
414
414
|
*/
|
@@ -479,8 +479,10 @@
|
|
479
479
|
var tbodyIndex, $tbody,
|
480
480
|
$table = c.$table,
|
481
481
|
$tbodies = c.$tbodies,
|
482
|
-
events =
|
483
|
-
|
482
|
+
events = (
|
483
|
+
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
484
|
+
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
485
|
+
).split( ' ' ).join( c.namespace + 'filter ' );
|
484
486
|
$table
|
485
487
|
.removeClass( 'hasFilters' )
|
486
488
|
// add filter namespace to all BUT search
|
@@ -1009,7 +1011,9 @@
|
|
1009
1011
|
// so we have to work with it instead
|
1010
1012
|
formatterUpdated: function( $cell, column ) {
|
1011
1013
|
// prevent error if $cell is undefined - see #1056
|
1012
|
-
var
|
1014
|
+
var $table = $cell && $cell.closest( 'table' );
|
1015
|
+
var config = $table.length && $table[0].config,
|
1016
|
+
wo = config && config.widgetOptions;
|
1013
1017
|
if ( wo && !wo.filter_initialized ) {
|
1014
1018
|
// add updates by column since this function
|
1015
1019
|
// may be called numerous times before initialization
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Widget: columnSelector (responsive table widget) - updated
|
1
|
+
/* Widget: columnSelector (responsive table widget) - updated 7/4/2017 (v2.28.15) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Justin Hallett & Rob Garrison
|
4
4
|
*/
|
@@ -547,6 +547,11 @@
|
|
547
547
|
csel.$style.remove();
|
548
548
|
csel.$breakpoints.remove();
|
549
549
|
$( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow || 'filtered' );
|
550
|
+
c.$table.find('[data-col-span]').each(function(indx, el) {
|
551
|
+
var $el = $(el);
|
552
|
+
console.log($el, $el.attr('data-col-span'));
|
553
|
+
$el.attr('colspan', $el.attr('data-col-span'));
|
554
|
+
});
|
550
555
|
c.$table.off('updateAll' + namespace + ' update' + namespace);
|
551
556
|
}
|
552
557
|
|
@@ -89,18 +89,20 @@
|
|
89
89
|
chkd = $cell.find('.toggle').is(':checked');
|
90
90
|
}
|
91
91
|
state = o.disabled || !chkd ? 'disable' : 'enable';
|
92
|
-
$cell.find('.
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
$shcell
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
92
|
+
if (!ts.isEmptyObject($cell.find('.spinner').data())) {
|
93
|
+
$cell.find('.filter')
|
94
|
+
// add equal to the beginning, so we filter exact numbers
|
95
|
+
.val( chkd ? (compare ? compare : o.exactMatch ? '=' : '') + v : '' )
|
96
|
+
.trigger( notrigger ? '' : 'search', searchType ).end()
|
97
|
+
.find('.spinner').spinner(state).val(v);
|
98
|
+
// update sticky header cell
|
99
|
+
if ($shcell.length) {
|
100
|
+
$shcell
|
101
|
+
.find('.spinner').spinner(state).val(v).end()
|
102
|
+
.find(compareSelect).val( compare );
|
103
|
+
if (o.addToggle) {
|
104
|
+
$shcell.find('.toggle')[0].checked = chkd;
|
105
|
+
}
|
104
106
|
}
|
105
107
|
}
|
106
108
|
};
|
@@ -137,7 +139,7 @@
|
|
137
139
|
});
|
138
140
|
|
139
141
|
// update spinner from hidden input, in case of saved filters
|
140
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
142
|
+
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
141
143
|
var val = tsff.updateCompare($cell, $input, o)[0];
|
142
144
|
$cell.find('.spinner').val( val );
|
143
145
|
updateSpinner({ value: val }, true);
|
@@ -153,7 +155,7 @@
|
|
153
155
|
}
|
154
156
|
|
155
157
|
// has sticky headers?
|
156
|
-
c.$table.bind('stickyHeadersInit', function(){
|
158
|
+
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
157
159
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
158
160
|
if (o.addToggle) {
|
159
161
|
$('<div class="button"><input id="stickyuispinnerbutton' + indx + '" type="checkbox" class="toggle" />' +
|
@@ -187,7 +189,7 @@
|
|
187
189
|
});
|
188
190
|
|
189
191
|
// on reset
|
190
|
-
c.$table.bind('filterReset', function(){
|
192
|
+
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
191
193
|
if ($.isArray(o.compare)) {
|
192
194
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
193
195
|
}
|
@@ -250,24 +252,26 @@
|
|
250
252
|
// add values to the handle data-value attribute so the css tooltip will work properly
|
251
253
|
$cell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
252
254
|
}
|
253
|
-
//
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
// update sticky header cell
|
263
|
-
if ($shcell.length) {
|
264
|
-
$shcell
|
265
|
-
.find(compareSelect).val( compare ).end()
|
255
|
+
// prevent JS error if "resetToLoadState" or filter widget was removed for another reason
|
256
|
+
if (!ts.isEmptyObject($cell.find('.slider').data())) {
|
257
|
+
// update the hidden input;
|
258
|
+
$cell.find('.filter')
|
259
|
+
// ****** ADD AN EQUAL SIGN TO THE BEGINNING! <- this makes the slide exactly match the number ******
|
260
|
+
// when the value is at the minimum, clear the hidden input so all rows will be seen
|
261
|
+
.val( ( compare ? compare + v : v === o.min ? '' : (o.exactMatch ? '=' : '') + v ) )
|
262
|
+
.trigger( notrigger ? '' : 'search', searchType ).end()
|
266
263
|
.find('.slider').slider('value', v);
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
$shcell
|
264
|
+
|
265
|
+
// update sticky header cell
|
266
|
+
if ($shcell.length) {
|
267
|
+
$shcell
|
268
|
+
.find(compareSelect).val( compare ).end()
|
269
|
+
.find('.slider').slider('value', v);
|
270
|
+
if (o.valueToHeader) {
|
271
|
+
$shcell.closest('thead').find('th[data-column=' + indx + ']').find('.curvalue').html(' (' + result + ')');
|
272
|
+
} else {
|
273
|
+
$shcell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
274
|
+
}
|
271
275
|
}
|
272
276
|
}
|
273
277
|
|
@@ -296,7 +300,7 @@
|
|
296
300
|
.slider(o);
|
297
301
|
|
298
302
|
// update slider from hidden input, in case of saved filters
|
299
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
303
|
+
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
300
304
|
var val = tsff.updateCompare($cell, $input, o)[0];
|
301
305
|
$cell.find('.slider').slider('value', val );
|
302
306
|
updateSlider({ value: val }, false);
|
@@ -312,7 +316,7 @@
|
|
312
316
|
}
|
313
317
|
|
314
318
|
// on reset
|
315
|
-
c.$table.bind('filterReset', function(){
|
319
|
+
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
316
320
|
if ($.isArray(o.compare)) {
|
317
321
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
318
322
|
}
|
@@ -322,7 +326,7 @@
|
|
322
326
|
});
|
323
327
|
|
324
328
|
// has sticky headers?
|
325
|
-
c.$table.bind('stickyHeadersInit', function(){
|
329
|
+
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
326
330
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
327
331
|
|
328
332
|
// add a jQuery UI slider!
|
@@ -401,20 +405,22 @@
|
|
401
405
|
.eq(0).attr('data-value', val[0]).end() // adding value to data attribute
|
402
406
|
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
403
407
|
}
|
404
|
-
|
405
|
-
|
406
|
-
.
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
$shcell.
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
408
|
+
if (!ts.isEmptyObject($cell.find('.range').data())) {
|
409
|
+
// update the hidden input
|
410
|
+
$cell.find('.filter').val(range)
|
411
|
+
.trigger(notrigger ? '' : 'search', searchType).end()
|
412
|
+
.find('.range').slider('values', val);
|
413
|
+
// update sticky header cell
|
414
|
+
if ($shcell.length) {
|
415
|
+
$shcell.find('.range').slider('values', val);
|
416
|
+
if (o.valueToHeader) {
|
417
|
+
$shcell.closest('thead').find('th[data-column=' + indx + ']').find('.currange').html(' (' + result + ')');
|
418
|
+
} else {
|
419
|
+
$shcell.find('.ui-slider-handle')
|
420
|
+
.addClass('value-popup')
|
421
|
+
.eq(0).attr('data-value', val[0]).end() // adding value to data attribute
|
422
|
+
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
423
|
+
}
|
418
424
|
}
|
419
425
|
}
|
420
426
|
|
@@ -443,13 +449,13 @@
|
|
443
449
|
.slider(o);
|
444
450
|
|
445
451
|
// update slider from hidden input, in case of saved filters
|
446
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
452
|
+
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
447
453
|
getRange();
|
448
454
|
ts.filter.formatterUpdated($cell, indx);
|
449
455
|
});
|
450
456
|
|
451
457
|
// on reset
|
452
|
-
c.$table.bind('filterReset', function(){
|
458
|
+
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
453
459
|
$cell.find('.range').slider('values', o.values);
|
454
460
|
setTimeout(function(){
|
455
461
|
updateUiRange();
|
@@ -457,7 +463,7 @@
|
|
457
463
|
});
|
458
464
|
|
459
465
|
// has sticky headers?
|
460
|
-
c.$table.bind('stickyHeadersInit', function(){
|
466
|
+
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
461
467
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
462
468
|
|
463
469
|
// add a jQuery UI slider!
|
@@ -552,7 +558,7 @@
|
|
552
558
|
$date.datepicker(o);
|
553
559
|
|
554
560
|
// on reset
|
555
|
-
c.$table.bind('filterReset', function(){
|
561
|
+
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
556
562
|
if ($.isArray(o.compare)) {
|
557
563
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
558
564
|
}
|
@@ -563,7 +569,7 @@
|
|
563
569
|
});
|
564
570
|
|
565
571
|
// update date compare from hidden input, in case of saved filters
|
566
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
572
|
+
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
567
573
|
var num, v = $input.val();
|
568
574
|
if (/\s+-\s+/.test(v)) {
|
569
575
|
// date range found; assume an exact match on one day
|
@@ -591,7 +597,7 @@
|
|
591
597
|
}
|
592
598
|
|
593
599
|
// has sticky headers?
|
594
|
-
c.$table.bind('stickyHeadersInit', function(){
|
600
|
+
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
595
601
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
596
602
|
|
597
603
|
// add a jQuery datepicker!
|
@@ -702,7 +708,7 @@
|
|
702
708
|
$cell.find('.dateTo').datepicker(o);
|
703
709
|
|
704
710
|
// update date compare from hidden input, in case of saved filters
|
705
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
711
|
+
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
706
712
|
var val = $input.val() || '',
|
707
713
|
from = '',
|
708
714
|
to = '';
|
@@ -733,7 +739,7 @@
|
|
733
739
|
});
|
734
740
|
|
735
741
|
// has sticky headers?
|
736
|
-
c.$table.bind('stickyHeadersInit', function(){
|
742
|
+
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
737
743
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
738
744
|
$shcell.append(t);
|
739
745
|
|
@@ -747,7 +753,7 @@
|
|
747
753
|
});
|
748
754
|
|
749
755
|
// on reset
|
750
|
-
$cell.closest('table').bind('filterReset', function(){
|
756
|
+
$cell.closest('table').bind('filterReset' + c.namespace + 'filter', function(){
|
751
757
|
$cell.add($shcell).find('.dateFrom').val('').datepicker('setDate', o.from || null );
|
752
758
|
$cell.add($shcell).find('.dateTo').val('').datepicker('setDate', o.to || null );
|
753
759
|
setTimeout(function(){
|
data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-select2.js
CHANGED
@@ -70,18 +70,20 @@
|
|
70
70
|
if (arry) {
|
71
71
|
v = v.split('\u0000');
|
72
72
|
}
|
73
|
-
$input
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
c.widgetOptions.$sticky
|
73
|
+
if (!ts.isEmptyObject($input.find('.select2').data())) {
|
74
|
+
$input
|
75
|
+
// add regex, so we filter exact numbers
|
76
|
+
.val(
|
77
|
+
$.isArray(v) && v.length && v.join('') !== '' ?
|
78
|
+
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
|
79
|
+
''
|
80
|
+
)
|
81
|
+
.trigger('search').end()
|
82
|
+
.find('.select2').select2('val', v);
|
83
|
+
// update sticky header cell
|
84
|
+
if (c.widgetOptions.$sticky) {
|
85
|
+
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
86
|
+
}
|
85
87
|
}
|
86
88
|
},
|
87
89
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated
|
1
|
+
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -69,8 +69,10 @@
|
|
69
69
|
var tbodyIndex, $tbody,
|
70
70
|
$table = c.$table,
|
71
71
|
$tbodies = c.$tbodies,
|
72
|
-
events =
|
73
|
-
|
72
|
+
events = (
|
73
|
+
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
74
|
+
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
75
|
+
).split( ' ' ).join( c.namespace + 'filter ' );
|
74
76
|
$table
|
75
77
|
.removeClass( 'hasFilters' )
|
76
78
|
// add filter namespace to all BUT search
|
@@ -599,7 +601,9 @@
|
|
599
601
|
// so we have to work with it instead
|
600
602
|
formatterUpdated: function( $cell, column ) {
|
601
603
|
// prevent error if $cell is undefined - see #1056
|
602
|
-
var
|
604
|
+
var $table = $cell && $cell.closest( 'table' );
|
605
|
+
var config = $table.length && $table[0].config,
|
606
|
+
wo = config && config.widgetOptions;
|
603
607
|
if ( wo && !wo.filter_initialized ) {
|
604
608
|
// add updates by column since this function
|
605
609
|
// may be called numerous times before initialization
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: sort2Hash (BETA) - updated 4/
|
1
|
+
/*! Widget: sort2Hash (BETA) - updated 7/4/2017 (v2.28.15) */
|
2
2
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -26,10 +26,21 @@
|
|
26
26
|
filter = filter.split( wo.sort2Hash_separator );
|
27
27
|
c.$table.one( 'tablesorter-ready', function() {
|
28
28
|
setTimeout(function(){
|
29
|
-
c.$table.one( 'filterEnd', function(){
|
29
|
+
c.$table.one( 'filterEnd', function() {
|
30
30
|
$(this).triggerHandler( 'pageAndSize', [ page, size ] );
|
31
31
|
});
|
32
|
-
|
32
|
+
// use the newest filter comparison code
|
33
|
+
if ( ts.filter.equalFilters ) {
|
34
|
+
temp = ts.filter.equalFilters( c, c.lastSearch, filter );
|
35
|
+
} else {
|
36
|
+
// quick n' dirty comparison... it will miss filter changes of
|
37
|
+
// the same value in a different column, see #1363
|
38
|
+
temp = ( c.lastSearch || [] ).join( '' ) !== ( filter || [] ).join( '' );
|
39
|
+
}
|
40
|
+
// don't set filters if they haven't changed
|
41
|
+
if ( !temp ) {
|
42
|
+
$.tablesorter.setFilters( table, filter, true );
|
43
|
+
}
|
33
44
|
}, 100 );
|
34
45
|
});
|
35
46
|
}
|