jquery-tablesorter 1.20.8 → 1.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jquery-tablesorter/version.rb +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js +33 -31
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +39 -27
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +37 -25
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-input-select.js +21 -17
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-columnSelector.js +33 -21
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-jui.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +29 -19
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +34 -29
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-scroller.js +4 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-stickyHeaders.js +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3731f02067ca05fe70bd8cffb0b88cc8609550c
|
4
|
+
data.tar.gz: 9e80942394a066cff780da926ff0a8da5a65630b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471a7f37eda5c4a93fac02ede5f1420a3ecd473733a87966666d8ea6ff6cc8c66f4e25692b883d192ac45d5a6fde7cd45681145a685d8c64c5e7c6b12270bc99
|
7
|
+
data.tar.gz: 93cdb689d1ea90b88621a25b376d5f1daf6a4a0c21b8c71f9f7d1bb62250bae33479a1312b9e51c25dc24404bccdab3497b36d8af4c4b90f5f69cea05982ef5e
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Simple integration of jquery-tablesorter into the asset pipeline.
|
6
6
|
|
7
|
-
Current tablesorter version: 2.
|
7
|
+
Current tablesorter version: 2.26.0 (5/1/2016), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* tablesorter (FORK) pager plugin
|
3
|
-
* updated
|
3
|
+
* updated 5/1/2016 (v2.26.0)
|
4
4
|
*/
|
5
5
|
/*jshint browser:true, jquery:true, unused:false */
|
6
6
|
;(function($) {
|
@@ -167,6 +167,7 @@
|
|
167
167
|
c = table.config,
|
168
168
|
namespace = c.namespace + 'pager',
|
169
169
|
sz = parsePageSize( p, p.size, 'get' ); // don't allow dividing by zero
|
170
|
+
if (sz === 'all') { sz = p.totalRows; }
|
170
171
|
if (p.countChildRows) { t[ t.length ] = c.cssChildRow; }
|
171
172
|
p.totalPages = Math.ceil( p.totalRows / sz ); // needed for "pageSize" method
|
172
173
|
c.totalRows = p.totalRows;
|
@@ -175,10 +176,10 @@
|
|
175
176
|
c.filteredRows = p.filteredRows;
|
176
177
|
p.filteredPages = Math.ceil( p.filteredRows / sz ) || 0;
|
177
178
|
if ( getTotalPages( table, p ) >= 0 ) {
|
178
|
-
t = (
|
179
|
+
t = (sz * p.page > p.filteredRows) && completed;
|
179
180
|
p.page = (t) ? p.pageReset || 0 : p.page;
|
180
|
-
p.startRow = (t) ?
|
181
|
-
p.endRow = Math.min( p.filteredRows, p.totalRows,
|
181
|
+
p.startRow = (t) ? sz * p.page + 1 : (p.filteredRows === 0 ? 0 : sz * p.page + 1);
|
182
|
+
p.endRow = Math.min( p.filteredRows, p.totalRows, sz * ( p.page + 1 ) );
|
182
183
|
$out = p.$container.find(p.cssPageDisplay);
|
183
184
|
// form the output string (can now get a new output string from the server)
|
184
185
|
s = ( p.ajaxData && p.ajaxData.output ? p.ajaxData.output || p.output : p.output )
|
@@ -216,7 +217,7 @@
|
|
216
217
|
// rebind startRow/page inputs
|
217
218
|
$out.find('.ts-startRow, .ts-page').unbind('change' + namespace).bind('change' + namespace, function(){
|
218
219
|
var v = $(this).val(),
|
219
|
-
pg = $(this).hasClass('ts-startRow') ? Math.floor( v /
|
220
|
+
pg = $(this).hasClass('ts-startRow') ? Math.floor( v / sz ) + 1 : v;
|
220
221
|
c.$table.triggerHandler('pageSet' + namespace, [ pg ]);
|
221
222
|
});
|
222
223
|
}
|
@@ -232,7 +233,7 @@
|
|
232
233
|
if (p.savePages && ts.storage) {
|
233
234
|
ts.storage(table, p.storageKey, {
|
234
235
|
page : p.page,
|
235
|
-
size : p.
|
236
|
+
size : sz === p.totalRows ? 'all' : sz
|
236
237
|
});
|
237
238
|
}
|
238
239
|
}
|
@@ -307,7 +308,8 @@
|
|
307
308
|
h = $.data(table, 'pagerSavedHeight');
|
308
309
|
if (h) {
|
309
310
|
d = h - $b.height();
|
310
|
-
if ( d > 5 && $.data(table, 'pagerLastSize') === p.size &&
|
311
|
+
if ( d > 5 && $.data(table, 'pagerLastSize') === p.size &&
|
312
|
+
$b.children('tr:visible').length < (p.size === 'all' ? p.totalRows : p.size) ) {
|
311
313
|
$b.append('<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice(1) + '" style="height:' + d + 'px;"></tr>');
|
312
314
|
}
|
313
315
|
}
|
@@ -322,7 +324,7 @@
|
|
322
324
|
if (!$b.children('tr:visible').length) {
|
323
325
|
$b.append('<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice(1) + '"><td> </td></tr>');
|
324
326
|
}
|
325
|
-
h = $b.children('tr').eq(0).height() * p.size;
|
327
|
+
h = $b.children('tr').eq(0).height() * (p.size === 'all' ? p.totalRows : p.size);
|
326
328
|
$.data(table, 'pagerSavedHeight', h);
|
327
329
|
fixHeight(table, p);
|
328
330
|
$.data(table, 'pagerLastSize', p.size);
|
@@ -335,8 +337,9 @@
|
|
335
337
|
c = table.config,
|
336
338
|
rows = c.$tbodies.eq(0).children('tr'),
|
337
339
|
l = rows.length,
|
338
|
-
|
339
|
-
|
340
|
+
sz = p.size === 'all' ? p.totalRows : p.size,
|
341
|
+
s = ( p.page * sz ),
|
342
|
+
e = s + sz,
|
340
343
|
f = c.widgetOptions && c.widgetOptions.filter_filteredRow || 'filtered',
|
341
344
|
last = 0, // for cache indexing
|
342
345
|
j = 0; // size counter
|
@@ -371,7 +374,7 @@
|
|
371
374
|
|
372
375
|
hideRowsSetup = function(table, p){
|
373
376
|
p.size = parsePageSize( p, p.$size.val(), 'get' );
|
374
|
-
p.$size.val(
|
377
|
+
p.$size.val( p.size );
|
375
378
|
$.data(table, 'pagerLastSize', p.size);
|
376
379
|
pagerArrows( table, p );
|
377
380
|
if ( !p.removeRows ) {
|
@@ -392,7 +395,7 @@
|
|
392
395
|
table.config.$tbodies.eq(0).empty();
|
393
396
|
|
394
397
|
// ajaxProcessing result: [ total, rows, headers ]
|
395
|
-
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len,
|
398
|
+
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len, sz,
|
396
399
|
c = table.config,
|
397
400
|
$table = c.$table,
|
398
401
|
tds = '',
|
@@ -483,9 +486,10 @@
|
|
483
486
|
if (c.showProcessing) {
|
484
487
|
ts.isProcessing(table); // remove loading icon
|
485
488
|
}
|
489
|
+
sz = parsePageSize( p, p.size, 'get' );
|
486
490
|
// make sure last pager settings are saved, prevents multiple server side calls with
|
487
491
|
// the same parameters
|
488
|
-
p.totalPages = Math.ceil( p.totalRows /
|
492
|
+
p.totalPages = sz === 'all' ? 1 : Math.ceil( p.totalRows / sz );
|
489
493
|
p.last.totalRows = p.totalRows;
|
490
494
|
p.last.currentFilters = p.currentFilters;
|
491
495
|
p.last.sortList = (c.sortList || []).join(',');
|
@@ -555,6 +559,7 @@
|
|
555
559
|
url = (p.ajaxUrl) ? p.ajaxUrl
|
556
560
|
// allow using "{page+1}" in the url string to switch to a non-zero based index
|
557
561
|
.replace(/\{page([\-+]\d+)?\}/, function(s, n){ return p.page + (n ? parseInt(n, 10) : 0); })
|
562
|
+
// this will pass "all" to server when size is set to "all"
|
558
563
|
.replace(/\{size\}/g, p.size) : '',
|
559
564
|
sortList = c.sortList,
|
560
565
|
filterList = p.currentFilters || $(table).data('lastSearch') || [],
|
@@ -598,8 +603,8 @@
|
|
598
603
|
c = table.config,
|
599
604
|
f = c.$table.hasClass('hasFilters'),
|
600
605
|
l = rows && rows.length || 0, // rows may be undefined
|
601
|
-
|
602
|
-
|
606
|
+
e = p.size === 'all' ? p.totalRows : p.size,
|
607
|
+
s = ( p.page * e );
|
603
608
|
if ( l < 1 ) {
|
604
609
|
if (c.debug) {
|
605
610
|
console.warn('Pager: >> No rows for pager to render');
|
@@ -659,7 +664,7 @@
|
|
659
664
|
$.data(table, 'pagerLastPage', p.page);
|
660
665
|
$.data(table, 'pagerLastSize', p.size);
|
661
666
|
p.page = 0;
|
662
|
-
p.size =
|
667
|
+
p.size = 'all';
|
663
668
|
p.totalPages = 1;
|
664
669
|
$(table)
|
665
670
|
.addClass('pagerDisabled')
|
@@ -777,13 +782,10 @@
|
|
777
782
|
|
778
783
|
// set to either set or get value
|
779
784
|
parsePageSize = function( p, size, mode ) {
|
780
|
-
var s = parseInt( size, 10 ) || p.size || p.settings.size || 10
|
781
|
-
// if select does not contain an "all" option, use size
|
782
|
-
setAll = p.$size.find( 'option[value="all"]' ).length ? 'all' : p.totalRows;
|
785
|
+
var s = parseInt( size, 10 ) || p.size || p.settings.size || 10;
|
783
786
|
return /all/i.test( size ) || s === p.totalRows ?
|
784
787
|
// "get" to get `p.size` or "set" to set `p.$size.val()`
|
785
|
-
( mode === 'get' ?
|
786
|
-
( mode === 'get' ? s : p.size );
|
788
|
+
'all' : ( mode === 'get' ? s : p.size );
|
787
789
|
},
|
788
790
|
|
789
791
|
parsePageNumber = function( table, p ) {
|
@@ -799,8 +801,8 @@
|
|
799
801
|
p.$size.val( parsePageSize( p, p.size, 'set' ) );
|
800
802
|
$.data(table, 'pagerLastPage', parsePageNumber( table, p ) );
|
801
803
|
$.data(table, 'pagerLastSize', p.size);
|
802
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
803
|
-
p.filteredPages = Math.ceil( p.filteredRows / p.size );
|
804
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
805
|
+
p.filteredPages = p.size === 'all' ? 1 : Math.ceil( p.filteredRows / p.size );
|
804
806
|
moveToPage(table, p);
|
805
807
|
},
|
806
808
|
|
@@ -872,9 +874,9 @@
|
|
872
874
|
p.isDisabled = false;
|
873
875
|
p.page = $.data(table, 'pagerLastPage') || p.page || 0;
|
874
876
|
size = p.$size.find('option[selected]').val();
|
875
|
-
p.size = $.data(table, 'pagerLastSize') || parsePageSize( p,
|
876
|
-
p.$size.val(
|
877
|
-
p.totalPages = Math.ceil( getTotalPages( table, p ) / p.size );
|
877
|
+
p.size = $.data(table, 'pagerLastSize') || parsePageSize( p, size, 'get' );
|
878
|
+
p.$size.val( p.size ); // set page size
|
879
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( getTotalPages( table, p ) / p.size );
|
878
880
|
// if table id exists, include page display with aria info
|
879
881
|
if ( table.id ) {
|
880
882
|
info = table.id + '_pager_info';
|
@@ -900,7 +902,7 @@
|
|
900
902
|
c.rowsCopy = rows;
|
901
903
|
p.totalRows = p.countChildRows ? c.$tbodies.eq(0).children('tr').length : rows.length;
|
902
904
|
p.size = $.data(table, 'pagerLastSize') || p.size || p.settings.size || 10;
|
903
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
905
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
904
906
|
renderTable(table, rows, p);
|
905
907
|
// update display here in case all rows are removed
|
906
908
|
updatePageDisplay(table, p, false);
|
@@ -911,7 +913,7 @@
|
|
911
913
|
return this.each(function() {
|
912
914
|
// check if tablesorter has initialized
|
913
915
|
if (!(this.config && this.hasInitialized)) { return; }
|
914
|
-
var t, ctrls, fxn,
|
916
|
+
var t, ctrls, fxn, size,
|
915
917
|
table = this,
|
916
918
|
c = table.config,
|
917
919
|
wo = c.widgetOptions,
|
@@ -931,10 +933,10 @@
|
|
931
933
|
if (p.savePages && ts.storage) {
|
932
934
|
t = ts.storage(table, p.storageKey) || {}; // fixes #387
|
933
935
|
p.page = isNaN(t.page) ? p.page : t.page;
|
934
|
-
p.size = ( isNaN(t.size) ? p.size : t.size ) || p.
|
936
|
+
p.size = t.size === 'all' ? t.size : ( isNaN( t.size ) ? p.size : t.size ) || p.setSize || 10;
|
935
937
|
$.data(table, 'pagerLastSize', p.size);
|
938
|
+
pager.find(p.cssPageSize).val(p.size);
|
936
939
|
}
|
937
|
-
|
938
940
|
// skipped rows
|
939
941
|
p.regexRows = new RegExp('(' + (wo.filter_filteredRow || 'filtered') + '|' + c.selectorRemove.slice(1) + '|' + c.cssChildRow + ')');
|
940
942
|
|
@@ -980,7 +982,7 @@
|
|
980
982
|
if ( !table || triggered || p.ajax ) { return; }
|
981
983
|
var $rows = c.$tbodies.eq(0).children('tr').not(c.selectorRemove);
|
982
984
|
p.totalRows = $rows.length - ( p.countChildRows ? 0 : $rows.filter('.' + c.cssChildRow).length );
|
983
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
985
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
984
986
|
if ($rows.length && c.rowsCopy && c.rowsCopy.length === 0) {
|
985
987
|
// make a copy of all table rows once the cache has been built
|
986
988
|
updateCache(table);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 05-01-2016 (v2.26.0)*/
|
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($) {
|
18
18
|
|
19
|
-
/*! TableSorter (FORK) v2.
|
19
|
+
/*! TableSorter (FORK) v2.26.0 *//*
|
20
20
|
* Client-side table sorting with ease!
|
21
21
|
* @requires jQuery v1.2.6+
|
22
22
|
*
|
@@ -39,7 +39,7 @@
|
|
39
39
|
'use strict';
|
40
40
|
var ts = $.tablesorter = {
|
41
41
|
|
42
|
-
version : '2.
|
42
|
+
version : '2.26.0',
|
43
43
|
|
44
44
|
parsers : [],
|
45
45
|
widgets : [],
|
@@ -3104,7 +3104,7 @@
|
|
3104
3104
|
|
3105
3105
|
})(jQuery);
|
3106
3106
|
|
3107
|
-
/*! Widget: filter - updated 4/
|
3107
|
+
/*! Widget: filter - updated 4/29/2016 (v2.25.9) *//*
|
3108
3108
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3109
3109
|
* by Rob Garrison
|
3110
3110
|
*/
|
@@ -3183,6 +3183,7 @@
|
|
3183
3183
|
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
3184
3184
|
// remove the filter row even if refreshing, because the column might have been moved
|
3185
3185
|
.find( '.' + tscss.filterRow ).remove();
|
3186
|
+
wo.filter_initialized = false;
|
3186
3187
|
if ( refreshing ) { return; }
|
3187
3188
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
3188
3189
|
$tbody = ts.processTbody( table, $tbodies.eq( tbodyIndex ), true ); // remove tbody
|
@@ -3455,7 +3456,7 @@
|
|
3455
3456
|
return null;
|
3456
3457
|
}
|
3457
3458
|
},
|
3458
|
-
init: function( table
|
3459
|
+
init: function( table ) {
|
3459
3460
|
// filter language options
|
3460
3461
|
ts.language = $.extend( true, {}, {
|
3461
3462
|
to : 'to',
|
@@ -3463,7 +3464,9 @@
|
|
3463
3464
|
and : 'and'
|
3464
3465
|
}, ts.language );
|
3465
3466
|
|
3466
|
-
var options, string, txt, $header, column,
|
3467
|
+
var options, string, txt, $header, column, val, fxn, noSelect,
|
3468
|
+
c = table.config,
|
3469
|
+
wo = c.widgetOptions;
|
3467
3470
|
c.$table.addClass( 'hasFilters' );
|
3468
3471
|
c.lastSearch = [];
|
3469
3472
|
|
@@ -3651,22 +3654,7 @@
|
|
3651
3654
|
c.$table
|
3652
3655
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
3653
3656
|
.bind( txt, function() {
|
3654
|
-
|
3655
|
-
var wo = this.config.widgetOptions;
|
3656
|
-
filters = tsf.setDefaults( table, c, wo ) || [];
|
3657
|
-
if ( filters.length ) {
|
3658
|
-
// prevent delayInit from triggering a cache build if filters are empty
|
3659
|
-
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
3660
|
-
ts.setFilters( table, filters, true );
|
3661
|
-
}
|
3662
|
-
}
|
3663
|
-
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
3664
|
-
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
3665
|
-
setTimeout( function() {
|
3666
|
-
if ( !wo.filter_initialized ) {
|
3667
|
-
tsf.filterInitComplete( c );
|
3668
|
-
}
|
3669
|
-
}, 100 );
|
3657
|
+
tsf.completeInit( this );
|
3670
3658
|
});
|
3671
3659
|
// if filter widget is added after pager has initialized; then set filter init flag
|
3672
3660
|
if ( c.pager && c.pager.initialized && !wo.filter_initialized ) {
|
@@ -3674,8 +3662,30 @@
|
|
3674
3662
|
setTimeout( function() {
|
3675
3663
|
tsf.filterInitComplete( c );
|
3676
3664
|
}, 100 );
|
3665
|
+
} else if ( !wo.filter_initialized ) {
|
3666
|
+
tsf.completeInit( table );
|
3667
|
+
}
|
3668
|
+
},
|
3669
|
+
completeInit: function( table ) {
|
3670
|
+
// redefine 'c' & 'wo' so they update properly inside this callback
|
3671
|
+
var c = table.config,
|
3672
|
+
wo = c.widgetOptions,
|
3673
|
+
filters = tsf.setDefaults( table, c, wo ) || [];
|
3674
|
+
if ( filters.length ) {
|
3675
|
+
// prevent delayInit from triggering a cache build if filters are empty
|
3676
|
+
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
3677
|
+
ts.setFilters( table, filters, true );
|
3678
|
+
}
|
3677
3679
|
}
|
3680
|
+
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
3681
|
+
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
3682
|
+
setTimeout( function() {
|
3683
|
+
if ( !wo.filter_initialized ) {
|
3684
|
+
tsf.filterInitComplete( c );
|
3685
|
+
}
|
3686
|
+
}, 100 );
|
3678
3687
|
},
|
3688
|
+
|
3679
3689
|
// $cell parameter, but not the config, is passed to the filter_formatters,
|
3680
3690
|
// so we have to work with it instead
|
3681
3691
|
formatterUpdated: function( $cell, column ) {
|
@@ -4921,7 +4931,7 @@
|
|
4921
4931
|
|
4922
4932
|
})( jQuery );
|
4923
4933
|
|
4924
|
-
/*! Widget: stickyHeaders - updated
|
4934
|
+
/*! Widget: stickyHeaders - updated 5/1/2016 (v2.26.0) *//*
|
4925
4935
|
* Requires tablesorter v2.8+ and jQuery 1.4.3+
|
4926
4936
|
* by Rob Garrison
|
4927
4937
|
*/
|
@@ -5085,12 +5095,14 @@
|
|
5085
5095
|
var offset = $table.offset(),
|
5086
5096
|
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
5087
5097
|
xWindow = $.isWindow( $xScroll[0] ),
|
5088
|
-
|
5089
|
-
|
5090
|
-
|
5098
|
+
attachTop = $attach.length ?
|
5099
|
+
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
5100
|
+
$yScroll.scrollTop(),
|
5101
|
+
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
5102
|
+
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
5103
|
+
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
5091
5104
|
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
|
5092
5105
|
cssSettings = { visibility : isVisible };
|
5093
|
-
|
5094
5106
|
if ($attach.length) {
|
5095
5107
|
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
5096
5108
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.
|
1
|
+
/*! TableSorter (FORK) v2.26.0 *//*
|
2
2
|
* Client-side table sorting with ease!
|
3
3
|
* @requires jQuery v1.2.6+
|
4
4
|
*
|
@@ -21,7 +21,7 @@
|
|
21
21
|
'use strict';
|
22
22
|
var ts = $.tablesorter = {
|
23
23
|
|
24
|
-
version : '2.
|
24
|
+
version : '2.26.0',
|
25
25
|
|
26
26
|
parsers : [],
|
27
27
|
widgets : [],
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 05-01-2016 (v2.26.0)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -372,7 +372,7 @@
|
|
372
372
|
|
373
373
|
})(jQuery);
|
374
374
|
|
375
|
-
/*! Widget: filter - updated 4/
|
375
|
+
/*! Widget: filter - updated 4/29/2016 (v2.25.9) *//*
|
376
376
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
377
377
|
* by Rob Garrison
|
378
378
|
*/
|
@@ -451,6 +451,7 @@
|
|
451
451
|
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
452
452
|
// remove the filter row even if refreshing, because the column might have been moved
|
453
453
|
.find( '.' + tscss.filterRow ).remove();
|
454
|
+
wo.filter_initialized = false;
|
454
455
|
if ( refreshing ) { return; }
|
455
456
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
456
457
|
$tbody = ts.processTbody( table, $tbodies.eq( tbodyIndex ), true ); // remove tbody
|
@@ -723,7 +724,7 @@
|
|
723
724
|
return null;
|
724
725
|
}
|
725
726
|
},
|
726
|
-
init: function( table
|
727
|
+
init: function( table ) {
|
727
728
|
// filter language options
|
728
729
|
ts.language = $.extend( true, {}, {
|
729
730
|
to : 'to',
|
@@ -731,7 +732,9 @@
|
|
731
732
|
and : 'and'
|
732
733
|
}, ts.language );
|
733
734
|
|
734
|
-
var options, string, txt, $header, column,
|
735
|
+
var options, string, txt, $header, column, val, fxn, noSelect,
|
736
|
+
c = table.config,
|
737
|
+
wo = c.widgetOptions;
|
735
738
|
c.$table.addClass( 'hasFilters' );
|
736
739
|
c.lastSearch = [];
|
737
740
|
|
@@ -919,22 +922,7 @@
|
|
919
922
|
c.$table
|
920
923
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
921
924
|
.bind( txt, function() {
|
922
|
-
|
923
|
-
var wo = this.config.widgetOptions;
|
924
|
-
filters = tsf.setDefaults( table, c, wo ) || [];
|
925
|
-
if ( filters.length ) {
|
926
|
-
// prevent delayInit from triggering a cache build if filters are empty
|
927
|
-
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
928
|
-
ts.setFilters( table, filters, true );
|
929
|
-
}
|
930
|
-
}
|
931
|
-
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
932
|
-
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
933
|
-
setTimeout( function() {
|
934
|
-
if ( !wo.filter_initialized ) {
|
935
|
-
tsf.filterInitComplete( c );
|
936
|
-
}
|
937
|
-
}, 100 );
|
925
|
+
tsf.completeInit( this );
|
938
926
|
});
|
939
927
|
// if filter widget is added after pager has initialized; then set filter init flag
|
940
928
|
if ( c.pager && c.pager.initialized && !wo.filter_initialized ) {
|
@@ -942,8 +930,30 @@
|
|
942
930
|
setTimeout( function() {
|
943
931
|
tsf.filterInitComplete( c );
|
944
932
|
}, 100 );
|
933
|
+
} else if ( !wo.filter_initialized ) {
|
934
|
+
tsf.completeInit( table );
|
935
|
+
}
|
936
|
+
},
|
937
|
+
completeInit: function( table ) {
|
938
|
+
// redefine 'c' & 'wo' so they update properly inside this callback
|
939
|
+
var c = table.config,
|
940
|
+
wo = c.widgetOptions,
|
941
|
+
filters = tsf.setDefaults( table, c, wo ) || [];
|
942
|
+
if ( filters.length ) {
|
943
|
+
// prevent delayInit from triggering a cache build if filters are empty
|
944
|
+
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
945
|
+
ts.setFilters( table, filters, true );
|
946
|
+
}
|
945
947
|
}
|
948
|
+
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
949
|
+
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
950
|
+
setTimeout( function() {
|
951
|
+
if ( !wo.filter_initialized ) {
|
952
|
+
tsf.filterInitComplete( c );
|
953
|
+
}
|
954
|
+
}, 100 );
|
946
955
|
},
|
956
|
+
|
947
957
|
// $cell parameter, but not the config, is passed to the filter_formatters,
|
948
958
|
// so we have to work with it instead
|
949
959
|
formatterUpdated: function( $cell, column ) {
|
@@ -2189,7 +2199,7 @@
|
|
2189
2199
|
|
2190
2200
|
})( jQuery );
|
2191
2201
|
|
2192
|
-
/*! Widget: stickyHeaders - updated
|
2202
|
+
/*! Widget: stickyHeaders - updated 5/1/2016 (v2.26.0) *//*
|
2193
2203
|
* Requires tablesorter v2.8+ and jQuery 1.4.3+
|
2194
2204
|
* by Rob Garrison
|
2195
2205
|
*/
|
@@ -2353,12 +2363,14 @@
|
|
2353
2363
|
var offset = $table.offset(),
|
2354
2364
|
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
2355
2365
|
xWindow = $.isWindow( $xScroll[0] ),
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2366
|
+
attachTop = $attach.length ?
|
2367
|
+
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
2368
|
+
$yScroll.scrollTop(),
|
2369
|
+
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
2370
|
+
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
2371
|
+
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
2359
2372
|
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
|
2360
2373
|
cssSettings = { visibility : isVisible };
|
2361
|
-
|
2362
2374
|
if ($attach.length) {
|
2363
2375
|
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
2364
2376
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Parser: input & select - updated
|
1
|
+
/*! Parser: input & select - updated 4/29/2016 (v2.25.9) *//*
|
2
2
|
* for jQuery 1.7+ & tablesorter 2.7.11+
|
3
3
|
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
|
4
4
|
*/
|
@@ -52,7 +52,7 @@
|
|
52
52
|
is : function() {
|
53
53
|
return false;
|
54
54
|
},
|
55
|
-
format : function( txt, table, cell
|
55
|
+
format : function( txt, table, cell ) {
|
56
56
|
var $cell = $( cell ),
|
57
57
|
wo = table.config.widgetOptions,
|
58
58
|
// returning plain language here because this is what is shown in the
|
@@ -128,7 +128,8 @@
|
|
128
128
|
}
|
129
129
|
},
|
130
130
|
updateHeaderCheckbox = function( $table, checkboxClass ) {
|
131
|
-
var
|
131
|
+
var ua = window.navigator.userAgent,
|
132
|
+
$rows = $table.children( 'tbody' ).children( ':visible' ), // (include child rows?)
|
132
133
|
len = $rows.length;
|
133
134
|
// set indeterminate state on header checkbox
|
134
135
|
$table.children( 'thead' ).find( 'input[type="checkbox"]' ).each( function() {
|
@@ -139,6 +140,8 @@
|
|
139
140
|
this.checked = allChecked;
|
140
141
|
this.indeterminate = false;
|
141
142
|
} else {
|
143
|
+
// needed for IE
|
144
|
+
this.checked = !(ua.indexOf('Trident/') > -1 || ua.indexOf('Edge/') > -1);
|
142
145
|
this.indeterminate = true;
|
143
146
|
}
|
144
147
|
});
|
@@ -221,7 +224,7 @@
|
|
221
224
|
$( this )
|
222
225
|
.off( namespace )
|
223
226
|
.on( 'tablesorter-ready' + namespace, function() {
|
224
|
-
var checkboxClass,
|
227
|
+
var checkboxClass,
|
225
228
|
$table = $( this ),
|
226
229
|
c = $table.length && $table[ 0 ].config;
|
227
230
|
if ( !$.isEmptyObject( c ) ) {
|
@@ -235,8 +238,10 @@
|
|
235
238
|
.children( 'thead' )
|
236
239
|
.off( namespace )
|
237
240
|
// modified from http://jsfiddle.net/abkNM/6163/
|
238
|
-
|
239
|
-
|
241
|
+
// click needed for IE; a change isn't fired when going from an indeterminate checkbox to
|
242
|
+
// either checked or unchecked
|
243
|
+
.on( 'click' + namespace + ' change' + namespace, 'input[type="checkbox"]', function( event ) {
|
244
|
+
var undef, onlyVisible, column, $target, isParsed, checkboxClass,
|
240
245
|
$checkbox = $( this ),
|
241
246
|
$table = $checkbox.closest( 'table' ),
|
242
247
|
c = $table.length && $table[ 0 ].config,
|
@@ -252,22 +257,21 @@
|
|
252
257
|
.children( ':nth-child(' + ( column + 1 ) + ')' )
|
253
258
|
.find( 'input[type="checkbox"]' )
|
254
259
|
.prop( 'checked', isChecked );
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
$
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
updateHeaderCheckbox( $table, checkboxClass );
|
263
|
-
updateServer( event, $table, $target );
|
264
|
-
$table[ 0 ].tablesorterBusy = false;
|
265
|
-
} else {
|
260
|
+
// add checkbox class names to row
|
261
|
+
checkboxClass = c.checkboxClass || 'checked';
|
262
|
+
$target.each( function() {
|
263
|
+
toggleRowClass( $( this ).closest( 'tr' ), checkboxClass, column, isChecked );
|
264
|
+
});
|
265
|
+
updateHeaderCheckbox( $table, checkboxClass );
|
266
|
+
if ( isParsed ) {
|
266
267
|
// only update cache if checkboxes are being sorted
|
267
268
|
$.tablesorter.update( c, undef, function() {
|
268
269
|
updateServer( event, $table, $target );
|
269
270
|
$table[ 0 ].tablesorterBusy = false;
|
270
271
|
});
|
272
|
+
} else {
|
273
|
+
updateServer( event, $table, $target );
|
274
|
+
$table[ 0 ].tablesorterBusy = false;
|
271
275
|
}
|
272
276
|
// needed for IE8
|
273
277
|
return true;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Widget: columnSelector (responsive table widget) - updated
|
1
|
+
/* Widget: columnSelector (responsive table widget) - updated 4/29/2016 (v2.25.9) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Justin Hallett & Rob Garrison
|
4
4
|
*/
|
@@ -67,19 +67,20 @@
|
|
67
67
|
},
|
68
68
|
|
69
69
|
refreshColumns: function( c, optName, optState ) {
|
70
|
-
var i, arry,
|
70
|
+
var i, arry, $el, val,
|
71
|
+
colSel = c.selector,
|
71
72
|
isArry = $.isArray(optState || optName),
|
72
73
|
wo = c.widgetOptions;
|
73
74
|
// see #798
|
74
|
-
if (typeof optName !== 'undefined' &&
|
75
|
+
if (typeof optName !== 'undefined' && colSel.$container.length) {
|
75
76
|
// pass "selectors" to update the all of the container contents
|
76
77
|
if ( optName === 'selectors' ) {
|
77
|
-
|
78
|
+
colSel.$container.empty();
|
78
79
|
tsColSel.setupSelector(c, wo);
|
79
80
|
tsColSel.setupBreakpoints(c, wo);
|
80
81
|
// if optState is undefined, maintain the current "auto" state
|
81
82
|
if ( typeof optState === 'undefined' ) {
|
82
|
-
optState =
|
83
|
+
optState = colSel.auto;
|
83
84
|
}
|
84
85
|
}
|
85
86
|
// pass an array of column zero-based indexes to turn off auto mode & toggle selected columns
|
@@ -90,20 +91,24 @@
|
|
90
91
|
arry[i] = parseInt(v, 10);
|
91
92
|
});
|
92
93
|
for (i = 0; i < c.columns; i++) {
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
val = $.inArray( i, arry ) >= 0;
|
95
|
+
$el = colSel.$container.find( 'input[data-column=' + i + ']' );
|
96
|
+
if ( $el.length ) {
|
97
|
+
$el.prop( 'checked', val );
|
98
|
+
colSel.states[i] = val;
|
99
|
+
}
|
96
100
|
}
|
97
101
|
}
|
98
102
|
// if passing an array, set auto to false to allow manual column selection & update columns
|
99
103
|
// refreshColumns( c, 'auto', true ) === refreshColumns( c, true );
|
100
|
-
|
101
|
-
|
102
|
-
|
104
|
+
val = optState === true || optName === true || optName === 'auto' && optState !== false;
|
105
|
+
$el = colSel.$container.find( 'input[data-column="auto"]' ).prop( 'checked', val );
|
106
|
+
tsColSel.updateAuto( c, wo, $el );
|
103
107
|
} else {
|
104
108
|
tsColSel.updateBreakpoints(c, wo);
|
105
109
|
tsColSel.updateCols(c, wo);
|
106
110
|
}
|
111
|
+
tsColSel.saveValues( c, wo );
|
107
112
|
tsColSel.adjustColspans( c, wo );
|
108
113
|
},
|
109
114
|
|
@@ -224,9 +229,7 @@
|
|
224
229
|
$(this).prop( 'checked', indx === 'auto' ? colSel.auto : colSel.states[indx] );
|
225
230
|
});
|
226
231
|
}
|
227
|
-
|
228
|
-
ts.storage( c.$table[0], 'tablesorter-columnSelector-auto', { auto : colSel.auto } );
|
229
|
-
}
|
232
|
+
tsColSel.saveValues( c, wo );
|
230
233
|
tsColSel.adjustColspans( c, wo );
|
231
234
|
// trigger columnUpdate if auto is true (it gets skipped in updateCols()
|
232
235
|
if (colSel.auto) {
|
@@ -270,7 +273,7 @@
|
|
270
273
|
}
|
271
274
|
}
|
272
275
|
// only 6 breakpoints (same as jQuery Mobile)
|
273
|
-
for (priority = 0; priority <
|
276
|
+
for (priority = 0; priority < wo.columnSelector_maxPriorities; priority++){
|
274
277
|
/*jshint loopfunc:true */
|
275
278
|
breaks = [];
|
276
279
|
c.$headers.filter('[' + wo.columnSelector_priority + '=' + (priority + 1) + ']').each(function(){
|
@@ -317,9 +320,7 @@
|
|
317
320
|
if (colSel.$style) {
|
318
321
|
colSel.$style.prop('disabled', false).text( styles.length ? styles.join(',') + ' { display: none; }' : '' );
|
319
322
|
}
|
320
|
-
|
321
|
-
ts.storage( c.$table[0], 'tablesorter-columnSelector', colSel.states );
|
322
|
-
}
|
323
|
+
tsColSel.saveValues( c, wo );
|
323
324
|
tsColSel.adjustColspans( c, wo );
|
324
325
|
c.$table.triggerHandler(wo.columnSelector_updated);
|
325
326
|
},
|
@@ -380,14 +381,22 @@
|
|
380
381
|
}
|
381
382
|
}
|
382
383
|
if ( span ) {
|
383
|
-
$cell.removeClass( wo.filter_filteredRow )[0].colSpan = span;
|
384
|
+
$cell.removeClass( wo.filter_filteredRow || 'filtered' )[0].colSpan = span;
|
384
385
|
} else {
|
385
|
-
$cell.addClass( wo.filter_filteredRow );
|
386
|
+
$cell.addClass( wo.filter_filteredRow || 'filtered' );
|
386
387
|
}
|
387
388
|
}
|
388
389
|
}
|
389
390
|
},
|
390
391
|
|
392
|
+
saveValues : function( c, wo ) {
|
393
|
+
if ( wo.columnSelector_saveColumns && ts.storage ) {
|
394
|
+
var colSel = c.selector;
|
395
|
+
ts.storage( c.$table[0], 'tablesorter-columnSelector-auto', { auto : colSel.auto } );
|
396
|
+
ts.storage( c.$table[0], 'tablesorter-columnSelector', colSel.states );
|
397
|
+
}
|
398
|
+
},
|
399
|
+
|
391
400
|
attachTo : function(table, elm) {
|
392
401
|
table = $(table)[0];
|
393
402
|
var colSel, wo, indx,
|
@@ -462,6 +471,9 @@
|
|
462
471
|
// see http://view.jquerymobile.com/1.3.2/dist/demos/widgets/table-column-toggle/#Applyingapresetbreakpoint
|
463
472
|
// *** set to false to disable ***
|
464
473
|
columnSelector_breakpoints : [ '20em', '30em', '40em', '50em', '60em', '70em' ],
|
474
|
+
// maximum number of priority settings; if this value is changed (especially increased),
|
475
|
+
// then make sure to modify the columnSelector_breakpoints - see #1204
|
476
|
+
columnSelector_maxPriorities : 6,
|
465
477
|
// data attribute containing column priority
|
466
478
|
// duplicates how jQuery mobile uses priorities:
|
467
479
|
// http://view.jquerymobile.com/1.3.2/dist/demos/widgets/table-column-toggle/
|
@@ -483,7 +495,7 @@
|
|
483
495
|
if (csel.$popup) { csel.$popup.empty(); }
|
484
496
|
csel.$style.remove();
|
485
497
|
csel.$breakpoints.remove();
|
486
|
-
$( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow );
|
498
|
+
$( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow || 'filtered' );
|
487
499
|
c.$table.off('updateAll' + namespace + ' update' + namespace);
|
488
500
|
}
|
489
501
|
|
@@ -519,10 +519,10 @@
|
|
519
519
|
$date.datepicker('setDate', (getdate === '' ? '' : getdate) || null);
|
520
520
|
if (getdate === '') { notrigger = false; }
|
521
521
|
date = $date.datepicker('getDate');
|
522
|
-
query = date ? ( o.endOfDay && /<=/.test(compare) ? date.setHours(23, 59, 59) : date.getTime() ) || '' : '';
|
522
|
+
query = date ? ( o.endOfDay && /<=/.test(compare) ? date.setHours(23, 59, 59, 999) : date.getTime() ) || '' : '';
|
523
523
|
if (date && o.endOfDay && compare === '=') {
|
524
524
|
compare = '';
|
525
|
-
query += ' - ' + date.setHours(23, 59, 59);
|
525
|
+
query += ' - ' + date.setHours(23, 59, 59, 999);
|
526
526
|
notrigger = false;
|
527
527
|
}
|
528
528
|
$cell.find('.dateCompare')
|
@@ -670,7 +670,7 @@
|
|
670
670
|
from = $cell.find('.dateFrom').datepicker('getDate'),
|
671
671
|
to = $cell.find('.dateTo').datepicker('getDate');
|
672
672
|
from = validDate(from) ? from.getTime() : '';
|
673
|
-
to = validDate(to) ? ( o.endOfDay ? to.setHours(23, 59, 59) : to.getTime() ) || '' : '';
|
673
|
+
to = validDate(to) ? ( o.endOfDay ? to.setHours(23, 59, 59, 999) : to.getTime() ) || '' : '';
|
674
674
|
range = from ? ( to ? from + ' - ' + to : '>=' + from ) : (to ? '<=' + to : '');
|
675
675
|
$cell.add( $shcell )
|
676
676
|
.find('.dateRange').val(range)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated 4/
|
1
|
+
/*! Widget: filter - updated 4/29/2016 (v2.25.9) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -77,6 +77,7 @@
|
|
77
77
|
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
78
78
|
// remove the filter row even if refreshing, because the column might have been moved
|
79
79
|
.find( '.' + tscss.filterRow ).remove();
|
80
|
+
wo.filter_initialized = false;
|
80
81
|
if ( refreshing ) { return; }
|
81
82
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
82
83
|
$tbody = ts.processTbody( table, $tbodies.eq( tbodyIndex ), true ); // remove tbody
|
@@ -349,7 +350,7 @@
|
|
349
350
|
return null;
|
350
351
|
}
|
351
352
|
},
|
352
|
-
init: function( table
|
353
|
+
init: function( table ) {
|
353
354
|
// filter language options
|
354
355
|
ts.language = $.extend( true, {}, {
|
355
356
|
to : 'to',
|
@@ -357,7 +358,9 @@
|
|
357
358
|
and : 'and'
|
358
359
|
}, ts.language );
|
359
360
|
|
360
|
-
var options, string, txt, $header, column,
|
361
|
+
var options, string, txt, $header, column, val, fxn, noSelect,
|
362
|
+
c = table.config,
|
363
|
+
wo = c.widgetOptions;
|
361
364
|
c.$table.addClass( 'hasFilters' );
|
362
365
|
c.lastSearch = [];
|
363
366
|
|
@@ -545,22 +548,7 @@
|
|
545
548
|
c.$table
|
546
549
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
547
550
|
.bind( txt, function() {
|
548
|
-
|
549
|
-
var wo = this.config.widgetOptions;
|
550
|
-
filters = tsf.setDefaults( table, c, wo ) || [];
|
551
|
-
if ( filters.length ) {
|
552
|
-
// prevent delayInit from triggering a cache build if filters are empty
|
553
|
-
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
554
|
-
ts.setFilters( table, filters, true );
|
555
|
-
}
|
556
|
-
}
|
557
|
-
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
558
|
-
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
559
|
-
setTimeout( function() {
|
560
|
-
if ( !wo.filter_initialized ) {
|
561
|
-
tsf.filterInitComplete( c );
|
562
|
-
}
|
563
|
-
}, 100 );
|
551
|
+
tsf.completeInit( this );
|
564
552
|
});
|
565
553
|
// if filter widget is added after pager has initialized; then set filter init flag
|
566
554
|
if ( c.pager && c.pager.initialized && !wo.filter_initialized ) {
|
@@ -568,8 +556,30 @@
|
|
568
556
|
setTimeout( function() {
|
569
557
|
tsf.filterInitComplete( c );
|
570
558
|
}, 100 );
|
559
|
+
} else if ( !wo.filter_initialized ) {
|
560
|
+
tsf.completeInit( table );
|
571
561
|
}
|
572
562
|
},
|
563
|
+
completeInit: function( table ) {
|
564
|
+
// redefine 'c' & 'wo' so they update properly inside this callback
|
565
|
+
var c = table.config,
|
566
|
+
wo = c.widgetOptions,
|
567
|
+
filters = tsf.setDefaults( table, c, wo ) || [];
|
568
|
+
if ( filters.length ) {
|
569
|
+
// prevent delayInit from triggering a cache build if filters are empty
|
570
|
+
if ( !( c.delayInit && filters.join( '' ) === '' ) ) {
|
571
|
+
ts.setFilters( table, filters, true );
|
572
|
+
}
|
573
|
+
}
|
574
|
+
c.$table.triggerHandler( 'filterFomatterUpdate' );
|
575
|
+
// trigger init after setTimeout to prevent multiple filterStart/End/Init triggers
|
576
|
+
setTimeout( function() {
|
577
|
+
if ( !wo.filter_initialized ) {
|
578
|
+
tsf.filterInitComplete( c );
|
579
|
+
}
|
580
|
+
}, 100 );
|
581
|
+
},
|
582
|
+
|
573
583
|
// $cell parameter, but not the config, is passed to the filter_formatters,
|
574
584
|
// so we have to work with it instead
|
575
585
|
formatterUpdated: function( $cell, column ) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: Pager - updated
|
1
|
+
/*! Widget: Pager - updated 5/1/2016 (v2.26.0) */
|
2
2
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -182,8 +182,9 @@
|
|
182
182
|
if ( wo.pager_savePages && ts.storage ) {
|
183
183
|
t = ts.storage( table, wo.pager_storageKey ) || {}; // fixes #387
|
184
184
|
p.page = ( isNaN( t.page ) ? p.page : t.page ) || p.setPage || 0;
|
185
|
-
p.size = ( isNaN( t.size ) ? p.size : t.size ) || p.setSize || 10;
|
185
|
+
p.size = t.size === 'all' ? t.size : ( isNaN( t.size ) ? p.size : t.size ) || p.setSize || 10;
|
186
186
|
$.data( table, 'pagerLastSize', p.size );
|
187
|
+
p.$size.val( p.size );
|
187
188
|
}
|
188
189
|
|
189
190
|
// skipped rows
|
@@ -291,7 +292,7 @@
|
|
291
292
|
var $rows = c.$tbodies.eq( 0 ).children( 'tr' ).not( c.selectorRemove );
|
292
293
|
p.totalRows = $rows.length -
|
293
294
|
( wo.pager_countChildRows ? 0 : $rows.filter( '.' + c.cssChildRow ).length );
|
294
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
295
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
295
296
|
if ( $rows.length && c.rowsCopy && c.rowsCopy.length === 0 ) {
|
296
297
|
// make a copy of all table rows once the cache has been built
|
297
298
|
tsp.updateCache( c );
|
@@ -443,6 +444,7 @@
|
|
443
444
|
p = c.pager,
|
444
445
|
namespace = c.namespace + 'pager',
|
445
446
|
sz = tsp.parsePageSize( c, p.size, 'get' ); // don't allow dividing by zero
|
447
|
+
if ( sz === 'all' ) { sz = p.totalRows; }
|
446
448
|
if ( wo.pager_countChildRows ) { t[ t.length ] = c.cssChildRow; }
|
447
449
|
p.$size
|
448
450
|
.add( p.$goto )
|
@@ -456,10 +458,10 @@
|
|
456
458
|
c.filteredRows = p.filteredRows;
|
457
459
|
p.filteredPages = Math.ceil( p.filteredRows / sz ) || 0;
|
458
460
|
if ( tsp.getTotalPages( c, p ) >= 0 ) {
|
459
|
-
t = (
|
461
|
+
t = ( sz * p.page > p.filteredRows ) && completed;
|
460
462
|
p.page = t ? wo.pager_pageReset || 0 : p.page;
|
461
|
-
p.startRow = t ?
|
462
|
-
p.endRow = Math.min( p.filteredRows, p.totalRows,
|
463
|
+
p.startRow = t ? sz * p.page + 1 : ( p.filteredRows === 0 ? 0 : sz * p.page + 1 );
|
464
|
+
p.endRow = Math.min( p.filteredRows, p.totalRows, sz * ( p.page + 1 ) );
|
463
465
|
$out = p.$container.find( wo.pager_selectors.pageDisplay );
|
464
466
|
// form the output string (can now get a new output string from the server)
|
465
467
|
s = ( p.ajaxData && p.ajaxData.output ? p.ajaxData.output || wo.pager_output : wo.pager_output )
|
@@ -503,7 +505,7 @@
|
|
503
505
|
.off( 'change' + namespace )
|
504
506
|
.on( 'change' + namespace, function() {
|
505
507
|
var v = $( this ).val(),
|
506
|
-
pg = $( this ).hasClass( 'ts-startRow' ) ? Math.floor( v /
|
508
|
+
pg = $( this ).hasClass( 'ts-startRow' ) ? Math.floor( v / sz ) + 1 : v;
|
507
509
|
c.$table.triggerHandler( 'pageSet' + namespace, [ pg ] );
|
508
510
|
});
|
509
511
|
}
|
@@ -519,7 +521,7 @@
|
|
519
521
|
if ( wo.pager_savePages && ts.storage ) {
|
520
522
|
ts.storage( table, wo.pager_storageKey, {
|
521
523
|
page : p.page,
|
522
|
-
size : p.
|
524
|
+
size : sz === p.totalRows ? 'all' : sz
|
523
525
|
});
|
524
526
|
}
|
525
527
|
}
|
@@ -600,7 +602,8 @@
|
|
600
602
|
h = $.data( table, 'pagerSavedHeight' );
|
601
603
|
if ( h ) {
|
602
604
|
d = h - $b.height();
|
603
|
-
if ( d > 5 && $.data( table, 'pagerLastSize' ) === p.size &&
|
605
|
+
if ( d > 5 && $.data( table, 'pagerLastSize' ) === p.size &&
|
606
|
+
$b.children( 'tr:visible' ).length < ( p.size === 'all' ? p.totalRows : p.size ) ) {
|
604
607
|
$b.append( '<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice( 1 ) +
|
605
608
|
'" style="height:' + d + 'px;"></tr>' );
|
606
609
|
}
|
@@ -611,15 +614,17 @@
|
|
611
614
|
changeHeight: function( c ) {
|
612
615
|
var h,
|
613
616
|
table = c.table,
|
617
|
+
p = c.pager,
|
618
|
+
sz = p.size === 'all' ? p.totalRows : p.size,
|
614
619
|
$b = c.$tbodies.eq( 0 );
|
615
620
|
$b.find( 'tr.pagerSavedHeightSpacer' ).remove();
|
616
621
|
if ( !$b.children( 'tr:visible' ).length ) {
|
617
622
|
$b.append( '<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice( 1 ) + '"><td> </td></tr>' );
|
618
623
|
}
|
619
|
-
h = $b.children( 'tr' ).eq( 0 ).height() *
|
624
|
+
h = $b.children( 'tr' ).eq( 0 ).height() * sz;
|
620
625
|
$.data( table, 'pagerSavedHeight', h );
|
621
626
|
tsp.fixHeight( c );
|
622
|
-
$.data( table, 'pagerLastSize',
|
627
|
+
$.data( table, 'pagerLastSize', p.size );
|
623
628
|
},
|
624
629
|
|
625
630
|
hideRows: function( c ) {
|
@@ -629,8 +634,9 @@
|
|
629
634
|
p = c.pager,
|
630
635
|
wo = c.widgetOptions,
|
631
636
|
tbodyLen = c.$tbodies.length,
|
632
|
-
|
633
|
-
|
637
|
+
sz = p.size === 'all' ? p.totalRows : p.size,
|
638
|
+
start = ( p.page * sz ),
|
639
|
+
end = start + sz,
|
634
640
|
filtr = wo && wo.filter_filteredRow || 'filtered',
|
635
641
|
last = 0, // for cache indexing
|
636
642
|
size = 0; // size counter
|
@@ -677,7 +683,7 @@
|
|
677
683
|
namespace = c.namespace + 'pager',
|
678
684
|
size = p.$size.val();
|
679
685
|
p.size = tsp.parsePageSize( c, size, 'get' );
|
680
|
-
p.$size.val(
|
686
|
+
p.$size.val( p.size );
|
681
687
|
$.data( c.table, 'pagerLastSize', p.size );
|
682
688
|
tsp.pagerArrows( c );
|
683
689
|
if ( !c.widgetOptions.pager_removeRows ) {
|
@@ -701,7 +707,7 @@
|
|
701
707
|
c.$tbodies.eq( 0 ).empty();
|
702
708
|
|
703
709
|
// ajaxProcessing result: [ total, rows, headers ]
|
704
|
-
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len,
|
710
|
+
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len, sz,
|
705
711
|
$table = c.$table,
|
706
712
|
tds = '',
|
707
713
|
result = wo.pager_ajaxProcessing( data, table, xhr ) || [ 0, [] ],
|
@@ -793,9 +799,10 @@
|
|
793
799
|
if ( c.showProcessing ) {
|
794
800
|
ts.isProcessing( table ); // remove loading icon
|
795
801
|
}
|
802
|
+
sz = tsp.parsePageSize( c, p.size, 'get' );
|
796
803
|
// make sure last pager settings are saved, prevents multiple server side calls with
|
797
804
|
// the same parameters
|
798
|
-
p.totalPages = Math.ceil( p.totalRows /
|
805
|
+
p.totalPages = sz === 'all' ? 1 : Math.ceil( p.totalRows / sz );
|
799
806
|
p.last.totalRows = p.totalRows;
|
800
807
|
p.last.currentFilters = p.currentFilters;
|
801
808
|
p.last.sortList = ( c.sortList || [] ).join( ',' );
|
@@ -865,6 +872,7 @@
|
|
865
872
|
url = wo.pager_ajaxUrl ? wo.pager_ajaxUrl
|
866
873
|
// allow using '{page+1}' in the url string to switch to a non-zero based index
|
867
874
|
.replace( /\{page([\-+]\d+)?\}/, function( s, n ) { return p.page + ( n ? parseInt( n, 10 ) : 0 ); })
|
875
|
+
// this will pass "all" to server when size is set to "all"
|
868
876
|
.replace( /\{size\}/g, p.size ) : '',
|
869
877
|
sortList = c.sortList,
|
870
878
|
filterList = p.currentFilters || c.$table.data( 'lastSearch' ) || [],
|
@@ -909,8 +917,8 @@
|
|
909
917
|
wo = c.widgetOptions,
|
910
918
|
f = c.$table.hasClass('hasFilters'),
|
911
919
|
l = rows && rows.length || 0, // rows may be undefined
|
912
|
-
|
913
|
-
|
920
|
+
e = p.size === 'all' ? p.totalRows : p.size,
|
921
|
+
s = ( p.page * e );
|
914
922
|
if ( l < 1 ) {
|
915
923
|
if ( c.debug ) {
|
916
924
|
console.warn( 'Pager: >> No rows for pager to render' );
|
@@ -977,7 +985,7 @@
|
|
977
985
|
$.data( table, 'pagerLastPage', p.page );
|
978
986
|
$.data( table, 'pagerLastSize', p.size );
|
979
987
|
p.page = 0;
|
980
|
-
p.size =
|
988
|
+
p.size = 'all';
|
981
989
|
p.totalPages = 1;
|
982
990
|
c.$table
|
983
991
|
.addClass( 'pagerDisabled' )
|
@@ -1106,13 +1114,10 @@
|
|
1106
1114
|
// set to either set or get value
|
1107
1115
|
parsePageSize: function( c, size, mode ) {
|
1108
1116
|
var p = c.pager,
|
1109
|
-
s = parseInt( size, 10 ) || p.size || c.widgetOptions.pager_size || 10
|
1110
|
-
// if select does not contain an "all" option, use size
|
1111
|
-
setAll = p.$size.find( 'option[value="all"]' ).length ? 'all' : p.totalRows;
|
1117
|
+
s = parseInt( size, 10 ) || p.size || c.widgetOptions.pager_size || 10;
|
1112
1118
|
return /all/i.test( size ) || s === p.totalRows ?
|
1113
1119
|
// "get" to set `p.size` or "set" to set `p.$size.val()`
|
1114
|
-
( mode === 'get' ?
|
1115
|
-
( mode === 'get' ? s : p.size );
|
1120
|
+
'all' : ( mode === 'get' ? s : p.size );
|
1116
1121
|
},
|
1117
1122
|
|
1118
1123
|
parsePageNumber: function( c, p ) {
|
@@ -1130,8 +1135,8 @@
|
|
1130
1135
|
p.$size.val( tsp.parsePageSize( c, p.size, 'set' ) );
|
1131
1136
|
$.data( table, 'pagerLastPage', tsp.parsePageNumber( c, p ) );
|
1132
1137
|
$.data( table, 'pagerLastSize', p.size );
|
1133
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
1134
|
-
p.filteredPages = Math.ceil( p.filteredRows / p.size );
|
1138
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
1139
|
+
p.filteredPages = p.size === 'all' ? 1 : Math.ceil( p.filteredRows / p.size );
|
1135
1140
|
tsp.moveToPage( c, p, true );
|
1136
1141
|
},
|
1137
1142
|
|
@@ -1201,8 +1206,8 @@
|
|
1201
1206
|
p.page = $.data( table, 'pagerLastPage' ) || p.page || 0;
|
1202
1207
|
size = p.$size.find( 'option[selected]' ).val();
|
1203
1208
|
p.size = $.data( table, 'pagerLastSize' ) || tsp.parsePageSize( c, size, 'get' );
|
1204
|
-
p.$size.val(
|
1205
|
-
p.totalPages = Math.ceil( tsp.getTotalPages( c, p ) / p.size );
|
1209
|
+
p.$size.val( p.size ); // set page size
|
1210
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( tsp.getTotalPages( c, p ) / p.size );
|
1206
1211
|
c.$table.removeClass( 'pagerDisabled' );
|
1207
1212
|
// if table id exists, include page display with aria info
|
1208
1213
|
if ( table.id ) {
|
@@ -1230,7 +1235,7 @@
|
|
1230
1235
|
c.rowsCopy = rows;
|
1231
1236
|
p.totalRows = wo.pager_countChildRows ? c.$tbodies.eq( 0 ).children( 'tr' ).length : rows.length;
|
1232
1237
|
p.size = $.data( table, 'pagerLastSize' ) || p.size || wo.pager_size || p.setSize || 10;
|
1233
|
-
p.totalPages = Math.ceil( p.totalRows / p.size );
|
1238
|
+
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
1234
1239
|
tsp.moveToPage( c, p );
|
1235
1240
|
// update display here in case all rows are removed
|
1236
1241
|
tsp.updatePageDisplay( c, false );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: scroller - updated 4/
|
1
|
+
/*! Widget: scroller - updated 4/29/2016 (v2.25.9) *//*
|
2
2
|
Copyright (C) 2011 T. Connell & Associates, Inc.
|
3
3
|
|
4
4
|
Dual-licensed under the MIT and GPL licenses
|
@@ -828,6 +828,9 @@
|
|
828
828
|
|
829
829
|
$fixedColumn.removeClass( tscss.scrollerHideElement );
|
830
830
|
|
831
|
+
// adjust caption height, see #1202
|
832
|
+
$fixedColumn.find('caption').height( wo.scroller_$header.find( 'caption' ).height() );
|
833
|
+
|
831
834
|
wo.scroller_isBusy = false;
|
832
835
|
|
833
836
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: stickyHeaders - updated
|
1
|
+
/*! Widget: stickyHeaders - updated 5/1/2016 (v2.26.0) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.4.3+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -162,12 +162,14 @@
|
|
162
162
|
var offset = $table.offset(),
|
163
163
|
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
164
164
|
xWindow = $.isWindow( $xScroll[0] ),
|
165
|
-
|
166
|
-
|
167
|
-
|
165
|
+
attachTop = $attach.length ?
|
166
|
+
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
167
|
+
$yScroll.scrollTop(),
|
168
|
+
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
169
|
+
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
170
|
+
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
168
171
|
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
|
169
172
|
cssSettings = { visibility : isVisible };
|
170
|
-
|
171
173
|
if ($attach.length) {
|
172
174
|
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
173
175
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-tablesorter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jun Lin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|