jquery-tablesorter 1.22.4 → 1.22.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/jquery-tablesorter/version.rb +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js +38 -27
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +12 -11
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +4 -4
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +8 -7
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +7 -6
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-mark.js +2 -4
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +40 -29
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-repeatheaders.js +3 -3
- data/vendor/assets/stylesheets/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.css +1 -1
- 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: 68b984c5f81c91e335a23cdd9083215177d5140e
|
4
|
+
data.tar.gz: b950cc5f6ef0e12044737a0e9f57eca02182f008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2982446b36b6fa2a2ea4d0762a32b05c233bc8640e8137abe15cadb305c445b89ab59a44d729462f4fc15ab7bf62d9b33020ce32cb864a0887d0e04c2dc0ff8e
|
7
|
+
data.tar.gz: 63b876b827c240be7ed78450b9ec976b2d76263ca138dd2f5bdf28502e638c16586196367e84965731765a951490dddd3b0484925aa9939008fadfe54dd3225b
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# jQuery
|
1
|
+
# jQuery tablesorter plugin for Rails
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/jquery-tablesorter.png)](http://badge.fury.io/rb/jquery-tablesorter)
|
4
4
|
|
5
|
-
Simple integration of
|
5
|
+
Simple integration of jQuery tablesorter ([Mottie's fork]) into the asset pipeline.
|
6
6
|
|
7
|
-
Current tablesorter version: 2.27.
|
7
|
+
Current tablesorter version: 2.27.7 (9/23/2016), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
## Requirements
|
26
26
|
|
27
|
-
It should work with Rails 3.2 and higher (tested up to
|
27
|
+
It should work with Rails 3.2 and higher (tested up to 5) as well as with ruby 1.9.3 - 2.3.x.
|
28
28
|
Each release is always tested with the latest version of both.
|
29
29
|
|
30
30
|
## Usage
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* tablesorter (FORK) pager plugin
|
3
|
-
* updated
|
3
|
+
* updated 9/23/2016 (v2.27.7)
|
4
4
|
*/
|
5
5
|
/*jshint browser:true, jquery:true, unused:false */
|
6
6
|
;(function($) {
|
@@ -182,27 +182,33 @@
|
|
182
182
|
p.startRow = (t) ? sz * p.page + 1 : (p.filteredRows === 0 ? 0 : sz * p.page + 1);
|
183
183
|
p.endRow = Math.min( p.filteredRows, p.totalRows, sz * ( p.page + 1 ) );
|
184
184
|
$out = p.$container.find(p.cssPageDisplay);
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
185
|
+
|
186
|
+
// Output param can be callback for custom rendering or string
|
187
|
+
if (typeof p.output === 'function') {
|
188
|
+
s = p.output(table, p);
|
189
|
+
} else {
|
190
|
+
// form the output string (can now get a new output string from the server)
|
191
|
+
s = ( p.ajaxData && p.ajaxData.output ? p.ajaxData.output || p.output : p.output )
|
192
|
+
// {page} = one-based index; {page+#} = zero based index +/- value
|
193
|
+
.replace(/\{page([\-+]\d+)?\}/gi, function(m, n){
|
194
|
+
return p.totalPages ? p.page + (n ? parseInt(n, 10) : 1) : 0;
|
195
|
+
})
|
196
|
+
// {totalPages}, {extra}, {extra:0} (array) or {extra : key} (object)
|
197
|
+
.replace(/\{\w+(\s*:\s*\w+)?\}/gi, function(m){
|
198
|
+
var len, indx,
|
199
|
+
str = m.replace(/[{}\s]/g, ''),
|
200
|
+
extra = str.split(':'),
|
201
|
+
data = p.ajaxData,
|
202
|
+
// return zero for default page/row numbers
|
203
|
+
deflt = /(rows?|pages?)$/i.test(str) ? 0 : '';
|
204
|
+
if (/(startRow|page)/.test(extra[0]) && extra[1] === 'input') {
|
205
|
+
len = ('' + (extra[0] === 'page' ? p.totalPages : p.totalRows)).length;
|
206
|
+
indx = extra[0] === 'page' ? p.page + 1 : p.startRow;
|
207
|
+
return '<input type="text" class="ts-' + extra[0] + '" style="max-width:' + len + 'em" value="' + indx + '"/>';
|
208
|
+
}
|
209
|
+
return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt;
|
210
|
+
});
|
211
|
+
}
|
206
212
|
if ( p.$goto.length ) {
|
207
213
|
t = '';
|
208
214
|
options = buildPageSelect( table, p );
|
@@ -865,7 +871,7 @@
|
|
865
871
|
},
|
866
872
|
|
867
873
|
enablePager = function(table, p, triggered) {
|
868
|
-
var info, size,
|
874
|
+
var info, size, $el,
|
869
875
|
c = table.config;
|
870
876
|
p.$size.add(p.$goto).add(p.$container.find('.ts-startRow, .ts-page'))
|
871
877
|
.removeClass(p.cssDisabled)
|
@@ -878,10 +884,15 @@
|
|
878
884
|
p.$size.val( p.size ); // set page size
|
879
885
|
p.totalPages = p.size === 'all' ? 1 : Math.ceil( getTotalPages( table, p ) / p.size );
|
880
886
|
// if table id exists, include page display with aria info
|
881
|
-
if ( table.id ) {
|
882
|
-
|
883
|
-
|
884
|
-
|
887
|
+
if ( table.id && !c.$table.attr( 'aria-describedby' ) ) {
|
888
|
+
$el = p.$container.find( p.cssPageDisplay );
|
889
|
+
info = $el.attr( 'id' );
|
890
|
+
if ( !info ) {
|
891
|
+
// only add pageDisplay id if it doesn't exist - see #1288
|
892
|
+
info = table.id + '_pager_info';
|
893
|
+
$el.attr( 'id', info );
|
894
|
+
}
|
895
|
+
c.$table.attr( 'aria-describedby', info );
|
885
896
|
}
|
886
897
|
changeHeight(table, p);
|
887
898
|
if ( triggered ) {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated 09-
|
7
|
+
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
|
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.27.
|
19
|
+
/*! TableSorter (FORK) v2.27.7 *//*
|
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.27.
|
43
|
+
version : '2.27.7',
|
44
44
|
|
45
45
|
parsers : [],
|
46
46
|
widgets : [],
|
@@ -251,7 +251,7 @@
|
|
251
251
|
// save the settings where they read
|
252
252
|
$.data( table, 'tablesorter', c );
|
253
253
|
if ( c.debug ) {
|
254
|
-
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter' );
|
254
|
+
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
255
255
|
$.data( table, 'startoveralltimer', new Date() );
|
256
256
|
}
|
257
257
|
|
@@ -353,7 +353,7 @@
|
|
353
353
|
table.hasInitialized = true;
|
354
354
|
table.isProcessing = false;
|
355
355
|
if ( c.debug ) {
|
356
|
-
console.log( 'Overall initialization time:
|
356
|
+
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
357
357
|
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
358
358
|
}
|
359
359
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
@@ -3137,7 +3137,7 @@
|
|
3137
3137
|
|
3138
3138
|
})(jQuery);
|
3139
3139
|
|
3140
|
-
/*! Widget: filter - updated
|
3140
|
+
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
|
3141
3141
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3142
3142
|
* by Rob Garrison
|
3143
3143
|
*/
|
@@ -3970,9 +3970,9 @@
|
|
3970
3970
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
3971
3971
|
if ( table.config.widgetOptions.filter_initialized &&
|
3972
3972
|
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
3973
|
-
( event.type === 'change'
|
3974
|
-
|
3975
|
-
|
3973
|
+
( event.type === 'change' || event.type === 'input' ) &&
|
3974
|
+
this.value !== c.lastSearch[column] )
|
3975
|
+
) {
|
3976
3976
|
event.preventDefault();
|
3977
3977
|
// init search with no delay
|
3978
3978
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -4687,6 +4687,7 @@
|
|
4687
4687
|
var cts, txt, indx, len, parsedTxt, str,
|
4688
4688
|
c = table.config,
|
4689
4689
|
validColumn = typeof column !== 'undefined' && column !== null && column >= 0 && column < c.columns,
|
4690
|
+
direction = validColumn ? c.$headerIndexed[ column ].hasClass( 'filter-select-sort-desc' ) : false,
|
4690
4691
|
parsed = [];
|
4691
4692
|
// get unique elements and sort the list
|
4692
4693
|
// if $.tablesorter.sortText exists ( not in the original tablesorter ),
|
@@ -4727,8 +4728,8 @@
|
|
4727
4728
|
// sort parsed select options
|
4728
4729
|
cts = c.textSorter || '';
|
4729
4730
|
parsed.sort( function( a, b ) {
|
4730
|
-
var x = a.parsed,
|
4731
|
-
y = b.parsed;
|
4731
|
+
var x = direction ? b.parsed : a.parsed,
|
4732
|
+
y = direction ? a.parsed : b.parsed;
|
4732
4733
|
if ( validColumn && typeof cts === 'function' ) {
|
4733
4734
|
// custom OVERALL text sorter
|
4734
4735
|
return cts( x, y, true, column, table );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.27.
|
1
|
+
/*! TableSorter (FORK) v2.27.7 *//*
|
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.27.
|
25
|
+
version : '2.27.7',
|
26
26
|
|
27
27
|
parsers : [],
|
28
28
|
widgets : [],
|
@@ -233,7 +233,7 @@
|
|
233
233
|
// save the settings where they read
|
234
234
|
$.data( table, 'tablesorter', c );
|
235
235
|
if ( c.debug ) {
|
236
|
-
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter' );
|
236
|
+
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
237
237
|
$.data( table, 'startoveralltimer', new Date() );
|
238
238
|
}
|
239
239
|
|
@@ -335,7 +335,7 @@
|
|
335
335
|
table.hasInitialized = true;
|
336
336
|
table.isProcessing = false;
|
337
337
|
if ( c.debug ) {
|
338
|
-
console.log( 'Overall initialization time:
|
338
|
+
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
339
339
|
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
340
340
|
}
|
341
341
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated 09-
|
7
|
+
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -382,7 +382,7 @@
|
|
382
382
|
|
383
383
|
})(jQuery);
|
384
384
|
|
385
|
-
/*! Widget: filter - updated
|
385
|
+
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
|
386
386
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
387
387
|
* by Rob Garrison
|
388
388
|
*/
|
@@ -1215,9 +1215,9 @@
|
|
1215
1215
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
1216
1216
|
if ( table.config.widgetOptions.filter_initialized &&
|
1217
1217
|
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
1218
|
-
( event.type === 'change'
|
1219
|
-
|
1220
|
-
|
1218
|
+
( event.type === 'change' || event.type === 'input' ) &&
|
1219
|
+
this.value !== c.lastSearch[column] )
|
1220
|
+
) {
|
1221
1221
|
event.preventDefault();
|
1222
1222
|
// init search with no delay
|
1223
1223
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -1932,6 +1932,7 @@
|
|
1932
1932
|
var cts, txt, indx, len, parsedTxt, str,
|
1933
1933
|
c = table.config,
|
1934
1934
|
validColumn = typeof column !== 'undefined' && column !== null && column >= 0 && column < c.columns,
|
1935
|
+
direction = validColumn ? c.$headerIndexed[ column ].hasClass( 'filter-select-sort-desc' ) : false,
|
1935
1936
|
parsed = [];
|
1936
1937
|
// get unique elements and sort the list
|
1937
1938
|
// if $.tablesorter.sortText exists ( not in the original tablesorter ),
|
@@ -1972,8 +1973,8 @@
|
|
1972
1973
|
// sort parsed select options
|
1973
1974
|
cts = c.textSorter || '';
|
1974
1975
|
parsed.sort( function( a, b ) {
|
1975
|
-
var x = a.parsed,
|
1976
|
-
y = b.parsed;
|
1976
|
+
var x = direction ? b.parsed : a.parsed,
|
1977
|
+
y = direction ? a.parsed : b.parsed;
|
1977
1978
|
if ( validColumn && typeof cts === 'function' ) {
|
1978
1979
|
// custom OVERALL text sorter
|
1979
1980
|
return cts( x, y, true, column, table );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated
|
1
|
+
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -831,9 +831,9 @@
|
|
831
831
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
832
832
|
if ( table.config.widgetOptions.filter_initialized &&
|
833
833
|
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
834
|
-
( event.type === 'change'
|
835
|
-
|
836
|
-
|
834
|
+
( event.type === 'change' || event.type === 'input' ) &&
|
835
|
+
this.value !== c.lastSearch[column] )
|
836
|
+
) {
|
837
837
|
event.preventDefault();
|
838
838
|
// init search with no delay
|
839
839
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
@@ -1548,6 +1548,7 @@
|
|
1548
1548
|
var cts, txt, indx, len, parsedTxt, str,
|
1549
1549
|
c = table.config,
|
1550
1550
|
validColumn = typeof column !== 'undefined' && column !== null && column >= 0 && column < c.columns,
|
1551
|
+
direction = validColumn ? c.$headerIndexed[ column ].hasClass( 'filter-select-sort-desc' ) : false,
|
1551
1552
|
parsed = [];
|
1552
1553
|
// get unique elements and sort the list
|
1553
1554
|
// if $.tablesorter.sortText exists ( not in the original tablesorter ),
|
@@ -1588,8 +1589,8 @@
|
|
1588
1589
|
// sort parsed select options
|
1589
1590
|
cts = c.textSorter || '';
|
1590
1591
|
parsed.sort( function( a, b ) {
|
1591
|
-
var x = a.parsed,
|
1592
|
-
y = b.parsed;
|
1592
|
+
var x = direction ? b.parsed : a.parsed,
|
1593
|
+
y = direction ? a.parsed : b.parsed;
|
1593
1594
|
if ( validColumn && typeof cts === 'function' ) {
|
1594
1595
|
// custom OVERALL text sorter
|
1595
1596
|
return cts( x, y, true, column, table );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: mark.js - updated 9/
|
1
|
+
/*! Widget: mark.js - updated 9/23/2016 (v2.27.7) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -70,8 +70,6 @@
|
|
70
70
|
update : function( c, filters ) {
|
71
71
|
var options = {},
|
72
72
|
wo = c.widgetOptions,
|
73
|
-
setIgnoreCase = typeof wo.filter_ignoreCase === 'undefined' ? true :
|
74
|
-
wo.filter_ignoreCase,
|
75
73
|
regex = ts.mark.regex,
|
76
74
|
$rows = c.$table
|
77
75
|
.find( 'tbody tr' )
|
@@ -139,7 +137,7 @@
|
|
139
137
|
if ( useRegex && matches && matches.length ) {
|
140
138
|
matches = new RegExp(
|
141
139
|
ts.mark.cleanMatches( matches ).join( '.*' ),
|
142
|
-
'gm'
|
140
|
+
'gm'
|
143
141
|
);
|
144
142
|
if ( ts.mark.checkRegex( matches ) ) {
|
145
143
|
$rows.children( col ).markRegExp( matches, options );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: Pager - updated
|
1
|
+
/*! Widget: Pager - updated 9/23/2016 (v2.27.7) */
|
2
2
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -464,30 +464,36 @@
|
|
464
464
|
p.startRow = t ? sz * p.page + 1 : ( p.filteredRows === 0 ? 0 : sz * p.page + 1 );
|
465
465
|
p.endRow = Math.min( p.filteredRows, p.totalRows, sz * ( p.page + 1 ) );
|
466
466
|
$out = p.$container.find( wo.pager_selectors.pageDisplay );
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
467
|
+
|
468
|
+
// Output param can be callback for custom rendering or string
|
469
|
+
if ( typeof wo.pager_output === 'function' ) {
|
470
|
+
s = wo.pager_output( table, p );
|
471
|
+
} else {
|
472
|
+
// form the output string (can now get a new output string from the server)
|
473
|
+
s = ( p.ajaxData && p.ajaxData.output ? p.ajaxData.output || wo.pager_output : wo.pager_output )
|
474
|
+
// {page} = one-based index; {page+#} = zero based index +/- value
|
475
|
+
.replace( /\{page([\-+]\d+)?\}/gi, function( m, n ) {
|
476
|
+
return p.totalPages ? p.page + ( n ? parseInt( n, 10 ) : 1 ) : 0;
|
477
|
+
})
|
478
|
+
// {totalPages}, {extra}, {extra:0} (array) or {extra : key} (object)
|
479
|
+
.replace( /\{\w+(\s*:\s*\w+)?\}/gi, function( m ) {
|
480
|
+
var len, indx,
|
481
|
+
str = m.replace( /[{}\s]/g, '' ),
|
482
|
+
extra = str.split( ':' ),
|
483
|
+
data = p.ajaxData,
|
484
|
+
// return zero for default page/row numbers
|
485
|
+
deflt = /(rows?|pages?)$/i.test( str ) ? 0 : '';
|
486
|
+
if ( /(startRow|page)/.test( extra[ 0 ] ) && extra[ 1 ] === 'input' ) {
|
487
|
+
len = ( '' + ( extra[ 0 ] === 'page' ? p.totalPages : p.totalRows ) ).length;
|
488
|
+
indx = extra[ 0 ] === 'page' ? p.page + 1 : p.startRow;
|
489
|
+
return '<input type="text" class="ts-' + extra[ 0 ] +
|
490
|
+
'" style="max-width:' + len + 'em" value="' + indx + '"/>';
|
491
|
+
}
|
492
|
+
return extra.length > 1 && data && data[ extra[ 0 ] ] ?
|
493
|
+
data[ extra[ 0 ] ][ extra[ 1 ] ] :
|
494
|
+
p[ str ] || ( data ? data[ str ] : deflt ) || deflt;
|
495
|
+
});
|
496
|
+
}
|
491
497
|
if ( p.$goto.length ) {
|
492
498
|
t = '';
|
493
499
|
options = tsp.buildPageSelect( c, p );
|
@@ -1199,7 +1205,7 @@
|
|
1199
1205
|
},
|
1200
1206
|
|
1201
1207
|
enablePager: function( c, triggered ) {
|
1202
|
-
var info, size,
|
1208
|
+
var info, size, $el,
|
1203
1209
|
table = c.table,
|
1204
1210
|
p = c.pager;
|
1205
1211
|
p.isDisabled = false;
|
@@ -1210,9 +1216,14 @@
|
|
1210
1216
|
p.totalPages = p.size === 'all' ? 1 : Math.ceil( tsp.getTotalPages( c, p ) / p.size );
|
1211
1217
|
c.$table.removeClass( 'pagerDisabled' );
|
1212
1218
|
// if table id exists, include page display with aria info
|
1213
|
-
if ( table.id ) {
|
1214
|
-
|
1215
|
-
|
1219
|
+
if ( table.id && !c.$table.attr( 'aria-describedby' ) ) {
|
1220
|
+
$el = p.$container.find( c.widgetOptions.pager_selectors.pageDisplay );
|
1221
|
+
info = $el.attr( 'id' );
|
1222
|
+
if ( !info ) {
|
1223
|
+
// only add pageDisplay id if it doesn't exist - see #1288
|
1224
|
+
info = table.id + '_pager_info';
|
1225
|
+
$el.attr( 'id', info );
|
1226
|
+
}
|
1216
1227
|
c.$table.attr( 'aria-describedby', info );
|
1217
1228
|
}
|
1218
1229
|
tsp.changeHeight( c );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
/*! Widget: repeatHeaders - updated 9/23/2016 (v2.27.7) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* Original by Christian Bach from the example-widgets.html demo
|
4
4
|
*/
|
@@ -19,8 +19,8 @@
|
|
19
19
|
if (!wo.repeatHeaders) {
|
20
20
|
h = '<tr class="repeated-header ' + c.selectorRemove.slice(1) + '">';
|
21
21
|
for (i = 0; i < c.columns; i++) {
|
22
|
-
//
|
23
|
-
h += '<th>' + $.trim( c.$headers.eq(i).
|
22
|
+
// repeat the content of the current header (including child elements)
|
23
|
+
h += '<th>' + $.trim( c.$headers.eq(i).html() ) + '</th>';
|
24
24
|
}
|
25
25
|
// 'remove-me' class was added in case the table needs to be updated, the 'remove-me' rows will be
|
26
26
|
// removed prior to the update to prevent including the rows in the update - see 'selectorRemove' option
|
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.22.
|
4
|
+
version: 1.22.5
|
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-09-
|
12
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|