jquery-tablesorter 1.20.3 → 1.20.4
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 +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js +25 -10
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +14 -11
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +8 -7
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +6 -4
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-columnSelector.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-editable.js +19 -14
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +5 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-grouping.js +6 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +38 -20
- 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: a801d7462954ff16232a6d19abb2b92c925709df
|
4
|
+
data.tar.gz: f511a89a1a1289dcec25706f029e9a33bab1f4e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7cc271bef8d4555f313813b25fb3cae1956d66502ef8b2ef80ea2056b042f5893c47a2ddbb208d5aa436ece7e777058fed87ae5f78c04c233d8b02d038dab62
|
7
|
+
data.tar.gz: de7d11e9d9e4e964c5c959f613d8fd1cfbeb4a30fa3e888143464bcf4a15ca384f532f9ab8f8db326dc1e352727da45e7d228979a526fa79f8b85a51f5c892b9
|
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.25.
|
7
|
+
Current tablesorter version: 2.25.4 (2/15/2016), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -508,14 +508,7 @@
|
|
508
508
|
|
509
509
|
}
|
510
510
|
if (!p.initialized) {
|
511
|
-
p
|
512
|
-
p.initializing = false;
|
513
|
-
if (table.config.debug) {
|
514
|
-
console.log('Pager: Triggering pagerInitialized');
|
515
|
-
}
|
516
|
-
$(table).triggerHandler( 'pagerInitialized', p );
|
517
|
-
ts.applyWidget( table );
|
518
|
-
updatePageDisplay(table, p);
|
511
|
+
pagerInitialized(table, p);
|
519
512
|
}
|
520
513
|
},
|
521
514
|
|
@@ -711,7 +704,8 @@
|
|
711
704
|
|
712
705
|
moveToPage = function(table, p, pageMoved) {
|
713
706
|
if ( p.isDisabled ) { return; }
|
714
|
-
var
|
707
|
+
var tmp,
|
708
|
+
c = table.config,
|
715
709
|
$t = $(table),
|
716
710
|
l = p.last;
|
717
711
|
if ( pageMoved !== false && p.initialized && ts.isEmptyObject(c.cache)) {
|
@@ -747,7 +741,17 @@
|
|
747
741
|
optAjaxUrl : p.ajaxUrl || ''
|
748
742
|
};
|
749
743
|
if (p.ajax) {
|
750
|
-
|
744
|
+
if ( !p.processAjaxOnInit && !ts.isEmptyObject(p.initialRows) ) {
|
745
|
+
p.processAjaxOnInit = true;
|
746
|
+
tmp = p.initialRows;
|
747
|
+
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
748
|
+
( c.debug ? console.error('Pager: no initial total page set!') || 0 : 0 );
|
749
|
+
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
750
|
+
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
751
|
+
pagerInitialized( table, p );
|
752
|
+
} else {
|
753
|
+
getAjax(table, p);
|
754
|
+
}
|
751
755
|
} else if (!p.ajax) {
|
752
756
|
renderTable(table, c.rowsCopy, p);
|
753
757
|
}
|
@@ -827,6 +831,17 @@
|
|
827
831
|
moveToPage(table, p);
|
828
832
|
},
|
829
833
|
|
834
|
+
pagerInitialized = function(table, p) {
|
835
|
+
p.initialized = true;
|
836
|
+
p.initializing = false;
|
837
|
+
if (table.config.debug) {
|
838
|
+
console.log('Pager: Triggering pagerInitialized');
|
839
|
+
}
|
840
|
+
$(table).triggerHandler( 'pagerInitialized', p );
|
841
|
+
ts.applyWidget( table );
|
842
|
+
updatePageDisplay(table, p);
|
843
|
+
},
|
844
|
+
|
830
845
|
destroyPager = function(table, p) {
|
831
846
|
var c = table.config,
|
832
847
|
namespace = c.namespace + 'pager',
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
|
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.25.
|
19
|
+
/*! TableSorter (FORK) v2.25.4 *//*
|
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.25.
|
42
|
+
version : '2.25.4',
|
43
43
|
|
44
44
|
parsers : [],
|
45
45
|
widgets : [],
|
@@ -195,7 +195,7 @@
|
|
195
195
|
|
196
196
|
},
|
197
197
|
|
198
|
-
// digit sort text location
|
198
|
+
// digit sort, text location
|
199
199
|
string : {
|
200
200
|
max : 1,
|
201
201
|
min : -1,
|
@@ -1920,6 +1920,7 @@
|
|
1920
1920
|
},
|
1921
1921
|
|
1922
1922
|
applyWidgetId : function( table, id, init ) {
|
1923
|
+
table = $(table)[0];
|
1923
1924
|
var applied, time, name,
|
1924
1925
|
c = table.config,
|
1925
1926
|
wo = c.widgetOptions,
|
@@ -2051,6 +2052,10 @@
|
|
2051
2052
|
for ( index = 0; index < len; index++ ) {
|
2052
2053
|
widget = ts.getWidgetById( name[ index ] );
|
2053
2054
|
indx = $.inArray( name[ index ], c.widgets );
|
2055
|
+
// don't remove the widget from config.widget if refreshing
|
2056
|
+
if ( indx >= 0 && refreshing !== true ) {
|
2057
|
+
c.widgets.splice( indx, 1 );
|
2058
|
+
}
|
2054
2059
|
if ( widget && widget.remove ) {
|
2055
2060
|
if ( c.debug ) {
|
2056
2061
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
@@ -2058,10 +2063,6 @@
|
|
2058
2063
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
2059
2064
|
c.widgetInit[ name[ index ] ] = false;
|
2060
2065
|
}
|
2061
|
-
// don't remove the widget from config.widget if refreshing
|
2062
|
-
if ( indx >= 0 && refreshing !== true ) {
|
2063
|
-
c.widgets.splice( indx, 1 );
|
2064
|
-
}
|
2065
2066
|
}
|
2066
2067
|
},
|
2067
2068
|
|
@@ -3090,7 +3091,7 @@
|
|
3090
3091
|
|
3091
3092
|
})(jQuery);
|
3092
3093
|
|
3093
|
-
/*! Widget: filter - updated
|
3094
|
+
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
|
3094
3095
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3095
3096
|
* by Rob Garrison
|
3096
3097
|
*/
|
@@ -3891,8 +3892,9 @@
|
|
3891
3892
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
3892
3893
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
3893
3894
|
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
3895
|
+
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
3894
3896
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
3895
|
-
( event.type === '
|
3897
|
+
( event.type === 'input' && this.value === '' ) ) {
|
3896
3898
|
event.preventDefault();
|
3897
3899
|
// init search with no delay
|
3898
3900
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -4301,7 +4303,8 @@
|
|
4301
4303
|
c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
|
4302
4304
|
|
4303
4305
|
vars.functions[ columnIndex ] =
|
4304
|
-
ts.getColumnData( table, wo.filter_functions, columnIndex )
|
4306
|
+
ts.getColumnData( table, wo.filter_functions, columnIndex ) ||
|
4307
|
+
c.$headerIndexed[ columnIndex ].hasClass( 'filter-select' );
|
4305
4308
|
vars.defaultColFilter[ columnIndex ] =
|
4306
4309
|
ts.getColumnData( table, wo.filter_defaultFilter, columnIndex ) || '';
|
4307
4310
|
vars.excludeFilter[ columnIndex ] =
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.25.
|
1
|
+
/*! TableSorter (FORK) v2.25.4 *//*
|
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.25.
|
24
|
+
version : '2.25.4',
|
25
25
|
|
26
26
|
parsers : [],
|
27
27
|
widgets : [],
|
@@ -177,7 +177,7 @@
|
|
177
177
|
|
178
178
|
},
|
179
179
|
|
180
|
-
// digit sort text location
|
180
|
+
// digit sort, text location
|
181
181
|
string : {
|
182
182
|
max : 1,
|
183
183
|
min : -1,
|
@@ -1902,6 +1902,7 @@
|
|
1902
1902
|
},
|
1903
1903
|
|
1904
1904
|
applyWidgetId : function( table, id, init ) {
|
1905
|
+
table = $(table)[0];
|
1905
1906
|
var applied, time, name,
|
1906
1907
|
c = table.config,
|
1907
1908
|
wo = c.widgetOptions,
|
@@ -2033,6 +2034,10 @@
|
|
2033
2034
|
for ( index = 0; index < len; index++ ) {
|
2034
2035
|
widget = ts.getWidgetById( name[ index ] );
|
2035
2036
|
indx = $.inArray( name[ index ], c.widgets );
|
2037
|
+
// don't remove the widget from config.widget if refreshing
|
2038
|
+
if ( indx >= 0 && refreshing !== true ) {
|
2039
|
+
c.widgets.splice( indx, 1 );
|
2040
|
+
}
|
2036
2041
|
if ( widget && widget.remove ) {
|
2037
2042
|
if ( c.debug ) {
|
2038
2043
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
@@ -2040,10 +2045,6 @@
|
|
2040
2045
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
2041
2046
|
c.widgetInit[ name[ index ] ] = false;
|
2042
2047
|
}
|
2043
|
-
// don't remove the widget from config.widget if refreshing
|
2044
|
-
if ( indx >= 0 && refreshing !== true ) {
|
2045
|
-
c.widgets.splice( indx, 1 );
|
2046
|
-
}
|
2047
2048
|
}
|
2048
2049
|
},
|
2049
2050
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 02-15-2016 (v2.25.4)*/
|
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
|
375
|
+
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
|
376
376
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
377
377
|
* by Rob Garrison
|
378
378
|
*/
|
@@ -1173,8 +1173,9 @@
|
|
1173
1173
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
1174
1174
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
1175
1175
|
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
1176
|
+
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
1176
1177
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
1177
|
-
( event.type === '
|
1178
|
+
( event.type === 'input' && this.value === '' ) ) {
|
1178
1179
|
event.preventDefault();
|
1179
1180
|
// init search with no delay
|
1180
1181
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -1583,7 +1584,8 @@
|
|
1583
1584
|
c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
|
1584
1585
|
|
1585
1586
|
vars.functions[ columnIndex ] =
|
1586
|
-
ts.getColumnData( table, wo.filter_functions, columnIndex )
|
1587
|
+
ts.getColumnData( table, wo.filter_functions, columnIndex ) ||
|
1588
|
+
c.$headerIndexed[ columnIndex ].hasClass( 'filter-select' );
|
1587
1589
|
vars.defaultColFilter[ columnIndex ] =
|
1588
1590
|
ts.getColumnData( table, wo.filter_defaultFilter, columnIndex ) || '';
|
1589
1591
|
vars.excludeFilter[ columnIndex ] =
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Widget: columnSelector (responsive table widget) - updated
|
1
|
+
/* Widget: columnSelector (responsive table widget) - updated 2/15/2016 (v2.25.4) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Justin Hallett & Rob Garrison
|
4
4
|
*/
|
@@ -478,8 +478,8 @@
|
|
478
478
|
},
|
479
479
|
remove: function(table, c, wo, refreshing) {
|
480
480
|
var csel = c.selector;
|
481
|
+
if ( csel) { csel.$container.empty(); }
|
481
482
|
if ( refreshing || !csel ) { return; }
|
482
|
-
csel.$container.empty();
|
483
483
|
if (csel.$popup) { csel.$popup.empty(); }
|
484
484
|
csel.$style.remove();
|
485
485
|
csel.$breakpoints.remove();
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: editable - updated
|
1
|
+
/*! Widget: editable - updated 2/15/2016 (v2.25.4) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -27,20 +27,25 @@
|
|
27
27
|
|
28
28
|
selectAll: function( cell ) {
|
29
29
|
setTimeout( function() {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
range
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
30
|
+
if ( document.queryCommandSupported( 'SelectAll' ) ) {
|
31
|
+
document.execCommand( 'selectAll', false, null );
|
32
|
+
} else {
|
33
|
+
// select all text in contenteditable
|
34
|
+
// see http://stackoverflow.com/a/6150060/145346
|
35
|
+
var range, selection;
|
36
|
+
if ( document.body.createTextRange ) {
|
37
|
+
range = document.body.createTextRange();
|
38
|
+
range.moveToElementText( cell );
|
39
|
+
range.select();
|
40
|
+
} else if ( window.getSelection ) {
|
41
|
+
selection = window.getSelection();
|
42
|
+
range = document.createRange();
|
43
|
+
range.selectNodeContents( cell );
|
44
|
+
selection.removeAllRanges();
|
45
|
+
selection.addRange( range );
|
46
|
+
}
|
43
47
|
}
|
48
|
+
// need delay of at least 100ms or last contenteditable will get refocused
|
44
49
|
}, 100 );
|
45
50
|
},
|
46
51
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated
|
1
|
+
/*! Widget: filter - updated 2/15/2016 (v2.25.4) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -799,8 +799,9 @@
|
|
799
799
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
800
800
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
801
801
|
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
802
|
+
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
802
803
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
803
|
-
( event.type === '
|
804
|
+
( event.type === 'input' && this.value === '' ) ) {
|
804
805
|
event.preventDefault();
|
805
806
|
// init search with no delay
|
806
807
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -1209,7 +1210,8 @@
|
|
1209
1210
|
c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
|
1210
1211
|
|
1211
1212
|
vars.functions[ columnIndex ] =
|
1212
|
-
ts.getColumnData( table, wo.filter_functions, columnIndex )
|
1213
|
+
ts.getColumnData( table, wo.filter_functions, columnIndex ) ||
|
1214
|
+
c.$headerIndexed[ columnIndex ].hasClass( 'filter-select' );
|
1213
1215
|
vars.defaultColFilter[ columnIndex ] =
|
1214
1216
|
ts.getColumnData( table, wo.filter_defaultFilter, columnIndex ) || '';
|
1215
1217
|
vars.excludeFilter[ columnIndex ] =
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: grouping - updated
|
1
|
+
/*! Widget: grouping - updated 2/15/2016 (v2.25.4) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -251,10 +251,14 @@
|
|
251
251
|
$this.toggleClass('collapsed');
|
252
252
|
// nextUntil requires jQuery 1.4+
|
253
253
|
$this.nextUntil('tr.group-header').toggleClass('group-hidden', $this.hasClass('collapsed') );
|
254
|
+
isCollapsed = $this.hasClass('collapsed');
|
255
|
+
// reapply zebra widget after opening collapsed group - see #1156
|
256
|
+
if (!isCollapsed && ts.hasWidget(c.$table, 'zebra')) {
|
257
|
+
ts.applyWidgetId(c.$table, 'zebra');
|
258
|
+
}
|
254
259
|
// save collapsed groups
|
255
260
|
if (wo.group_saveGroups && ts.storage) {
|
256
261
|
$groups = c.$table.find('.group-header');
|
257
|
-
isCollapsed = $this.hasClass('collapsed');
|
258
262
|
if (!wo.group_collapsedGroups[wo.group_collapsedGroup]) {
|
259
263
|
wo.group_collapsedGroups[wo.group_collapsedGroup] = [];
|
260
264
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: Pager - updated
|
1
|
+
/*! Widget: Pager - updated 2/15/2016 (v2.25.4) */
|
2
2
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -436,7 +436,7 @@
|
|
436
436
|
},
|
437
437
|
|
438
438
|
updatePageDisplay: function( c, completed ) {
|
439
|
-
if ( c.pager.initializing ) { return; }
|
439
|
+
if ( c.pager && c.pager.initializing ) { return; }
|
440
440
|
var s, t, $out, options, indx, len,
|
441
441
|
table = c.table,
|
442
442
|
wo = c.widgetOptions,
|
@@ -1030,7 +1030,8 @@
|
|
1030
1030
|
if ( pageMoved !== false && p.initialized && $.isEmptyObject( c.cache ) ) {
|
1031
1031
|
return tsp.updateCache( c );
|
1032
1032
|
}
|
1033
|
-
var
|
1033
|
+
var tmp,
|
1034
|
+
table = c.table,
|
1034
1035
|
wo = c.widgetOptions,
|
1035
1036
|
l = p.last;
|
1036
1037
|
|
@@ -1068,7 +1069,17 @@
|
|
1068
1069
|
optAjaxUrl: wo.pager_ajaxUrl
|
1069
1070
|
};
|
1070
1071
|
if ( p.ajax ) {
|
1071
|
-
|
1072
|
+
if ( !wo.pager_processAjaxOnInit && !$.isEmptyObject(wo.pager_initialRows) ) {
|
1073
|
+
wo.pager_processAjaxOnInit = true;
|
1074
|
+
tmp = wo.pager_initialRows;
|
1075
|
+
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
1076
|
+
( c.debug ? console.error('Pager: no initial total page set!') || 0 : 0 );
|
1077
|
+
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
1078
|
+
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
1079
|
+
tsp.updatePageDisplay( c, false );
|
1080
|
+
} else {
|
1081
|
+
tsp.getAjax( c );
|
1082
|
+
}
|
1072
1083
|
} else if ( !p.ajax ) {
|
1073
1084
|
tsp.renderTable( c, c.rowsCopy );
|
1074
1085
|
}
|
@@ -1154,25 +1165,32 @@
|
|
1154
1165
|
destroyPager: function( c, refreshing ) {
|
1155
1166
|
var table = c.table,
|
1156
1167
|
p = c.pager,
|
1157
|
-
s = c.widgetOptions.pager_selectors,
|
1168
|
+
s = c.widgetOptions.pager_selectors || {},
|
1158
1169
|
ctrls = [ s.first, s.prev, s.next, s.last, s.gotoPage, s.pageSize ].join( ',' ),
|
1159
1170
|
namespace = c.namespace + 'pager';
|
1160
|
-
|
1161
|
-
|
1162
|
-
p
|
1163
|
-
|
1164
|
-
.
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1171
|
+
// check pager object in case two successive pager destroys are triggered
|
1172
|
+
// e.g. "destroyPager" then "removeWidget" - see #1155
|
1173
|
+
if ( p ) {
|
1174
|
+
p.initialized = false;
|
1175
|
+
c.$table.off( namespace );
|
1176
|
+
p.$container
|
1177
|
+
// hide pager
|
1178
|
+
.hide()
|
1179
|
+
// unbind pager controls
|
1180
|
+
.find( ctrls )
|
1181
|
+
.off( namespace );
|
1182
|
+
if ( refreshing ) { return; }
|
1183
|
+
c.appender = null; // remove pager appender function
|
1184
|
+
tsp.showAllRows( c );
|
1185
|
+
if ( ts.storage ) {
|
1186
|
+
ts.storage( table, c.widgetOptions.pager_storageKey, '' );
|
1187
|
+
}
|
1188
|
+
p.$container = null;
|
1189
|
+
p.$goto = null;
|
1190
|
+
p.$size = null;
|
1191
|
+
c.pager = null;
|
1192
|
+
c.rowsCopy = null;
|
1173
1193
|
}
|
1174
|
-
delete table.config.pager;
|
1175
|
-
delete table.config.rowsCopy;
|
1176
1194
|
},
|
1177
1195
|
|
1178
1196
|
enablePager: function( c, triggered ) {
|
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.20.
|
4
|
+
version: 1.20.4
|
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-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|