jquery-tablesorter 1.20.4 → 1.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +9 -9
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +65 -46
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +25 -24
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +40 -22
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-huge-numbers.js +21 -0
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-editable.js +19 -7
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +34 -16
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-grouping.js +9 -7
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-math.js +17 -22
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +9 -9
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-print.js +6 -5
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-scroller.js +12 -8
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-stickyHeaders.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-storage.js +2 -2
- metadata +3 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated
|
1
|
+
/*! Widget: filter - updated 3/1/2016 (v2.25.5) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -45,6 +45,7 @@
|
|
45
45
|
filter_hideFilters : false, // collapse filter row when mouse leaves the area
|
46
46
|
filter_ignoreCase : true, // if true, make all searches case-insensitive
|
47
47
|
filter_liveSearch : true, // if true, search column content while the user types ( with a delay )
|
48
|
+
filter_matchType : { 'input': 'exact', 'select': 'exact' }, // global query settings ('exact' or 'match'); overridden by "filter-match" or "filter-exact" class
|
48
49
|
filter_onlyAvail : 'filter-onlyAvail', // a header with a select dropdown & this class name will only show available ( visible ) options within the drop down
|
49
50
|
filter_placeholder : { search : '', select : '' }, // default placeholder text ( overridden by any header 'data-placeholder' setting )
|
50
51
|
filter_reset : null, // jQuery selector string of an element used to reset the filters
|
@@ -971,7 +972,7 @@
|
|
971
972
|
end = c.columns - 1;
|
972
973
|
}
|
973
974
|
for ( ; start <= end; start++ ) {
|
974
|
-
columns.
|
975
|
+
columns[ columns.length ] = start;
|
975
976
|
}
|
976
977
|
// remove processed range from val
|
977
978
|
val = val.replace( ranges[ indx ], '' );
|
@@ -985,7 +986,7 @@
|
|
985
986
|
if ( singles[ i ] !== '' ) {
|
986
987
|
indx = parseInt( singles[ i ], 10 );
|
987
988
|
if ( indx < c.columns ) {
|
988
|
-
columns.
|
989
|
+
columns[ columns.length ] = indx;
|
989
990
|
}
|
990
991
|
}
|
991
992
|
}
|
@@ -993,7 +994,7 @@
|
|
993
994
|
// return all columns
|
994
995
|
if ( !columns.length ) {
|
995
996
|
for ( indx = 0; indx < c.columns; indx++ ) {
|
996
|
-
columns.
|
997
|
+
columns[ columns.length ] = indx;
|
997
998
|
}
|
998
999
|
}
|
999
1000
|
return columns;
|
@@ -1029,6 +1030,24 @@
|
|
1029
1030
|
}
|
1030
1031
|
return filterMatched;
|
1031
1032
|
},
|
1033
|
+
matchType: function( c, columnIndex ) {
|
1034
|
+
var isMatch,
|
1035
|
+
$el = c.$headerIndexed[ columnIndex ];
|
1036
|
+
// filter-exact > filter-match > filter_matchType for type
|
1037
|
+
if ( $el.hasClass( 'filter-exact' ) ) {
|
1038
|
+
isMatch = false;
|
1039
|
+
} else if ( $el.hasClass( 'filter-match' ) ) {
|
1040
|
+
isMatch = true;
|
1041
|
+
} else {
|
1042
|
+
// filter-select is not applied when filter_functions are used, so look for a select
|
1043
|
+
$el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
|
1044
|
+
isMatch = $el.length ?
|
1045
|
+
c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
|
1046
|
+
// default to exact, if no inputs found
|
1047
|
+
false;
|
1048
|
+
}
|
1049
|
+
return isMatch;
|
1050
|
+
},
|
1032
1051
|
processRow: function( c, data, vars ) {
|
1033
1052
|
var result, filterMatched,
|
1034
1053
|
fxn, ffxn, txt,
|
@@ -1102,12 +1121,11 @@
|
|
1102
1121
|
// ignore if filter is empty or disabled
|
1103
1122
|
if ( data.filter ) {
|
1104
1123
|
data.cache = data.cacheArray[ columnIndex ];
|
1105
|
-
result = data.rawArray[ columnIndex ] || '';
|
1124
|
+
result = data.parsed[ columnIndex ] ? data.cache : data.rawArray[ columnIndex ] || '';
|
1106
1125
|
data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
|
1107
1126
|
data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
|
1108
1127
|
data.exact.toLowerCase() : data.exact;
|
1109
|
-
|
1110
|
-
data.isMatch = c.$headerIndexed[ data.index ].hasClass( 'filter-match' );
|
1128
|
+
data.isMatch = tsf.matchType( c, columnIndex );
|
1111
1129
|
|
1112
1130
|
result = showRow; // if showRow is true, show that row
|
1113
1131
|
|
@@ -1302,7 +1320,7 @@
|
|
1302
1320
|
!( tsfRegex.isNeg1.test( val ) || tsfRegex.isNeg2.test( val ) ) &&
|
1303
1321
|
// if filtering using a select without a 'filter-match' class ( exact match ) - fixes #593
|
1304
1322
|
!( val !== '' && c.$filters && c.$filters.filter( '[data-column="' + indx + '"]' ).find( 'select' ).length &&
|
1305
|
-
!
|
1323
|
+
!tsf.matchType( c, indx ) );
|
1306
1324
|
}
|
1307
1325
|
}
|
1308
1326
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
@@ -1491,13 +1509,13 @@
|
|
1491
1509
|
// table cell to the parser format function
|
1492
1510
|
if ( txt.text ) {
|
1493
1511
|
txt.parsed = parsedTxt;
|
1494
|
-
parsed.
|
1512
|
+
parsed[ parsed.length ] = txt;
|
1495
1513
|
} else {
|
1496
|
-
parsed.
|
1514
|
+
parsed[ parsed.length ] = {
|
1497
1515
|
text : txt,
|
1498
1516
|
// check parser length - fixes #934
|
1499
1517
|
parsed : parsedTxt
|
1500
|
-
}
|
1518
|
+
};
|
1501
1519
|
}
|
1502
1520
|
}
|
1503
1521
|
// sort parsed select options
|
@@ -1522,7 +1540,7 @@
|
|
1522
1540
|
arry = [];
|
1523
1541
|
len = parsed.length;
|
1524
1542
|
for ( indx = 0; indx < len; indx++ ) {
|
1525
|
-
arry.
|
1543
|
+
arry[ arry.length ] = parsed[indx];
|
1526
1544
|
}
|
1527
1545
|
return arry;
|
1528
1546
|
}
|
@@ -1551,23 +1569,23 @@
|
|
1551
1569
|
if ( wo.filter_useParsedData ||
|
1552
1570
|
c.parsers[column].parsed ||
|
1553
1571
|
c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
|
1554
|
-
arry.
|
1572
|
+
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ column ];
|
1555
1573
|
// child row parsed data
|
1556
1574
|
if ( wo.filter_childRows && wo.filter_childByColumn ) {
|
1557
1575
|
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
|
1558
1576
|
for ( indx = 0; indx < childLen; indx++ ) {
|
1559
|
-
arry.
|
1577
|
+
arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
|
1560
1578
|
}
|
1561
1579
|
}
|
1562
1580
|
} else {
|
1563
1581
|
// get raw cached data instead of content directly from the cells
|
1564
|
-
arry.
|
1582
|
+
arry[ arry.length ] = cache.normalized[ rowIndex ][ c.columns ].raw[ column ];
|
1565
1583
|
// child row unparsed data
|
1566
1584
|
if ( wo.filter_childRows && wo.filter_childByColumn ) {
|
1567
1585
|
childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
|
1568
1586
|
for ( indx = 1; indx < childLen; indx++ ) {
|
1569
1587
|
child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
|
1570
|
-
arry.
|
1588
|
+
arry[ arry.length ] = '' + ts.getElementText( c, child, column );
|
1571
1589
|
}
|
1572
1590
|
}
|
1573
1591
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: grouping - updated
|
1
|
+
/*! Widget: grouping - updated 3/1/2016 (v2.25.5) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -92,9 +92,11 @@
|
|
92
92
|
return hours + ':' + min + ( wo.group_time24Hour ? '' : ' ' + ( suffix || '' ) );
|
93
93
|
},
|
94
94
|
|
95
|
-
update : function(table
|
96
|
-
if ($.isEmptyObject(
|
97
|
-
var
|
95
|
+
update : function(table) {
|
96
|
+
if ($.isEmptyObject(table.config.cache)) { return; }
|
97
|
+
var c = table.config,
|
98
|
+
wo = c.widgetOptions,
|
99
|
+
hasSort = typeof c.sortList[0] !== 'undefined',
|
98
100
|
data = {},
|
99
101
|
column = $.isArray( wo.group_forceColumn ) && typeof wo.group_forceColumn[0] !== 'undefined' ?
|
100
102
|
( wo.group_enforceSort && !hasSort ? -1 : wo.group_forceColumn[0] ) :
|
@@ -278,14 +280,14 @@
|
|
278
280
|
tsg.clearSavedGroups(table);
|
279
281
|
});
|
280
282
|
c.$table.on('pagerChange.tsgrouping', function(){
|
281
|
-
tsg.update(table
|
283
|
+
tsg.update(table);
|
282
284
|
});
|
283
285
|
},
|
284
286
|
|
285
287
|
clearSavedGroups: function(table){
|
286
288
|
if (table && ts.storage) {
|
287
289
|
ts.storage(table, 'tablesorter-groups', '');
|
288
|
-
tsg.update(table
|
290
|
+
tsg.update(table);
|
289
291
|
}
|
290
292
|
}
|
291
293
|
|
@@ -330,7 +332,7 @@
|
|
330
332
|
tsg.bindEvents(table, c, wo);
|
331
333
|
},
|
332
334
|
format: function(table, c, wo) {
|
333
|
-
tsg.update(table
|
335
|
+
tsg.update(table);
|
334
336
|
},
|
335
337
|
remove : function(table, c, wo){
|
336
338
|
c.$table
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: math - updated
|
1
|
+
/*! Widget: math - updated 3/1/2016 (v2.25.5) *//*
|
2
2
|
* Requires tablesorter v2.16+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -21,7 +21,7 @@
|
|
21
21
|
invalid : function( c, name, errorIndex ) {
|
22
22
|
// name = function returning invalid results
|
23
23
|
// errorIndex = math.error index with an explanation of the error
|
24
|
-
console.
|
24
|
+
console.warn( name, math.error[ errorIndex ] );
|
25
25
|
return c && c.widgetOptions.math_none || ''; // text for cell
|
26
26
|
},
|
27
27
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
if ( hasFilter || !isFiltered ) {
|
49
49
|
$cells = $row.children().not( '[' + wo.math_dataAttrib + '=ignore]' );
|
50
50
|
if ( wo.math_ignore.length ) {
|
51
|
-
$cells = $cells.filter( function(
|
51
|
+
$cells = $cells.filter( function() {
|
52
52
|
// using $.inArray is not optimal (needed for IE8)
|
53
53
|
return $.inArray( math.getCellIndex( $( this ) ), wo.math_ignore ) === -1;
|
54
54
|
});
|
@@ -87,7 +87,7 @@
|
|
87
87
|
if ( hasFilter ) {
|
88
88
|
$tr = $tr.filter( hasFilter );
|
89
89
|
}
|
90
|
-
$t = $tr.children().filter( function(
|
90
|
+
$t = $tr.children().filter( function() {
|
91
91
|
return math.getCellIndex( $( this ) ) === cIndex;
|
92
92
|
});
|
93
93
|
// ignore filtered rows & rows with data-math="ignore" (and starting row)
|
@@ -99,7 +99,7 @@
|
|
99
99
|
if ( mathAbove ) {
|
100
100
|
index = 0;
|
101
101
|
} else if ( $t.length ) {
|
102
|
-
arry.
|
102
|
+
arry[ arry.length ] = math.processText( c, $t );
|
103
103
|
}
|
104
104
|
}
|
105
105
|
index--;
|
@@ -115,13 +115,13 @@
|
|
115
115
|
if ( hasFilter ) {
|
116
116
|
$tr = $tr.filter( hasFilter );
|
117
117
|
}
|
118
|
-
$t = $tr.children().filter( function(
|
118
|
+
$t = $tr.children().filter( function() {
|
119
119
|
return math.getCellIndex( $( this ) ) === cIndex;
|
120
120
|
});
|
121
121
|
if ( ( hasFilter || !$tr.hasClass( filtered ) ) &&
|
122
122
|
$tr.not( mathIgnore ).length &&
|
123
123
|
$t.length ) {
|
124
|
-
arry.
|
124
|
+
arry[ arry.length ] = math.processText( c, $t );
|
125
125
|
}
|
126
126
|
}
|
127
127
|
} else {
|
@@ -132,13 +132,13 @@
|
|
132
132
|
if ( hasFilter ) {
|
133
133
|
$tr = $tr.filter( hasFilter );
|
134
134
|
}
|
135
|
-
$t = $tr.children().filter( function(
|
135
|
+
$t = $tr.children().filter( function() {
|
136
136
|
return math.getCellIndex( $( this ) ) === cIndex;
|
137
137
|
});
|
138
138
|
if ( ( hasFilter || !$tr.hasClass( filtered ) ) &&
|
139
139
|
$t.not( mathAttrs.join( ',' ) ).length &&
|
140
140
|
!$t.is( $el ) ) {
|
141
|
-
arry.
|
141
|
+
arry[ arry.length ] = math.processText( c, $t );
|
142
142
|
}
|
143
143
|
}
|
144
144
|
}
|
@@ -168,7 +168,7 @@
|
|
168
168
|
$t = $cells.eq( cellIndex );
|
169
169
|
col = math.getCellIndex( $t );
|
170
170
|
if ( !$t.filter( '[' + mathAttr + ']' ).length && $.inArray( col, wo.math_ignore ) < 0 ) {
|
171
|
-
arry.
|
171
|
+
arry[ arry.length ] = math.processText( c, $t );
|
172
172
|
}
|
173
173
|
}
|
174
174
|
}
|
@@ -177,13 +177,11 @@
|
|
177
177
|
},
|
178
178
|
|
179
179
|
setColumnIndexes : function( c ) {
|
180
|
-
|
181
|
-
// detach table from DOM to speed up column indexing
|
182
|
-
var $table = c.$table.detach(),
|
180
|
+
var $table = c.$table,
|
183
181
|
last = 1,
|
184
182
|
// only target rows with a colspan or rows included in a rowspan
|
185
183
|
$rows = $table.children( 'tbody' ).children().filter( function() {
|
186
|
-
var cells, indx,
|
184
|
+
var cells, indx,
|
187
185
|
$this = $( this ),
|
188
186
|
include = $this.children( '[colspan]' ).length > 0;
|
189
187
|
if ( last > 1 ) {
|
@@ -205,9 +203,6 @@
|
|
205
203
|
// to every tbody cell, just the ones where the .cellIndex property doesn't match
|
206
204
|
// the calculated cell index - hopefully fixes the lag issue in #1048
|
207
205
|
ts.computeColumnIndex( $rows, c );
|
208
|
-
$( '#_tablesorter_table_placeholder' )
|
209
|
-
.after( $table )
|
210
|
-
.remove();
|
211
206
|
},
|
212
207
|
|
213
208
|
getCellIndex : function( $cell ) {
|
@@ -250,11 +245,11 @@
|
|
250
245
|
len = $mathCells.length;
|
251
246
|
// get math filter, if any
|
252
247
|
// hasFilter = $row.attr( mathAttr + '-filter' ) || wo.math_rowFilter;
|
253
|
-
|
254
|
-
var $cell = $(
|
255
|
-
filter = $
|
248
|
+
for (indx = 0; indx < len; indx++) {
|
249
|
+
var $cell = $mathCells.eq( indx ),
|
250
|
+
filter = $cell.attr( mathAttr + '-filter' ) || wo.math_rowFilter;
|
256
251
|
filters[ filter ] = filters[ filter ] ? filters[ filter ].add( $cell ) : $cell;
|
257
|
-
}
|
252
|
+
}
|
258
253
|
$.each( filters, function( hasFilter, $cells ) {
|
259
254
|
changed = math.mathType( c, $cells, [ 'all' ], hasFilter ) || changed;
|
260
255
|
});
|
@@ -518,7 +513,7 @@
|
|
518
513
|
modes = [ el ];
|
519
514
|
maxCount = m;
|
520
515
|
} else if ( m === maxCount ) {
|
521
|
-
modes.
|
516
|
+
modes[ modes.length ] = el;
|
522
517
|
maxCount = m;
|
523
518
|
}
|
524
519
|
}
|
@@ -443,7 +443,7 @@
|
|
443
443
|
p = c.pager,
|
444
444
|
namespace = c.namespace + 'pager',
|
445
445
|
sz = tsp.parsePageSize( c, p.size, 'get' ); // don't allow dividing by zero
|
446
|
-
if ( wo.pager_countChildRows ) { t.
|
446
|
+
if ( wo.pager_countChildRows ) { t[ t.length ] = c.cssChildRow; }
|
447
447
|
p.$size
|
448
448
|
.add( p.$goto )
|
449
449
|
.removeClass( wo.pager_css.disabled )
|
@@ -542,10 +542,10 @@
|
|
542
542
|
optionPagesStartPage = largeCollection ? skipSetSize : 1;
|
543
543
|
|
544
544
|
for ( i = optionPagesStartPage; i <= pg; ) {
|
545
|
-
optionPages.
|
545
|
+
optionPages[ optionPages.length ] = i;
|
546
546
|
i = i + ( largeCollection ? skipSetSize : 1 );
|
547
547
|
}
|
548
|
-
optionPages.
|
548
|
+
optionPages[ optionPages.length ] = pg;
|
549
549
|
|
550
550
|
if ( largeCollection ) {
|
551
551
|
focusOptionPages = [];
|
@@ -558,7 +558,7 @@
|
|
558
558
|
if ( endPage > pg ) { endPage = pg; }
|
559
559
|
// construct an array to get a focus set around the current page
|
560
560
|
for ( i = startPage; i <= endPage ; i++ ) {
|
561
|
-
focusOptionPages.
|
561
|
+
focusOptionPages[ focusOptionPages.length ] = i;
|
562
562
|
}
|
563
563
|
|
564
564
|
// keep unique values
|
@@ -649,7 +649,7 @@
|
|
649
649
|
} else {
|
650
650
|
$rows[ rowIndex ].style.display = ( size >= start && size < end ) ? '' : 'none';
|
651
651
|
if ( last !== size && size >= start && size < end ) {
|
652
|
-
p.cacheIndex.
|
652
|
+
p.cacheIndex[ p.cacheIndex.length ] = rowIndex;
|
653
653
|
last = size;
|
654
654
|
}
|
655
655
|
// don't count child rows
|
@@ -875,7 +875,7 @@
|
|
875
875
|
sortCol = sortCol[ 1 ];
|
876
876
|
len = sortList.length;
|
877
877
|
for ( indx = 0; indx < len; indx++ ) {
|
878
|
-
arry.
|
878
|
+
arry[ arry.length ] = sortCol + '[' + sortList[ indx ][ 0 ] + ']=' + sortList[ indx ][ 1 ];
|
879
879
|
}
|
880
880
|
// if the arry is empty, just add the col parameter... '&{sortList:col}' becomes '&col'
|
881
881
|
url = url.replace( /\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/g, arry.length ? arry.join( '&' ) : sortCol );
|
@@ -886,7 +886,7 @@
|
|
886
886
|
len = filterList.length;
|
887
887
|
for ( indx = 0; indx < len; indx++ ) {
|
888
888
|
if ( filterList[ indx ] ) {
|
889
|
-
arry.
|
889
|
+
arry[ arry.length ] = filterCol + '[' + indx + ']=' + encodeURIComponent( filterList[ indx ] );
|
890
890
|
}
|
891
891
|
}
|
892
892
|
// if the arry is empty, just add the fcol parameter... '&{filterList:fcol}' becomes '&fcol'
|
@@ -945,7 +945,7 @@
|
|
945
945
|
count++;
|
946
946
|
if ( count > s && added <= e ) {
|
947
947
|
added++;
|
948
|
-
p.cacheIndex.
|
948
|
+
p.cacheIndex[ p.cacheIndex.length ] = index;
|
949
949
|
$tb.append( rows[ index ] );
|
950
950
|
}
|
951
951
|
}
|
@@ -1015,7 +1015,7 @@
|
|
1015
1015
|
normalized = c.cache[ 0 ].normalized;
|
1016
1016
|
p.totalRows = normalized.length;
|
1017
1017
|
for ( index = 0; index < p.totalRows; index++ ) {
|
1018
|
-
rows.
|
1018
|
+
rows[ rows.length ] = normalized[ index ][ c.columns ].$row;
|
1019
1019
|
}
|
1020
1020
|
c.rowsCopy = rows;
|
1021
1021
|
tsp.moveToPage( c, p, true );
|
@@ -1,9 +1,9 @@
|
|
1
|
-
/* Widget: print - updated
|
1
|
+
/* Widget: print - updated 3/1/2016 (v2.25.5) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.2.6+
|
3
3
|
*/
|
4
4
|
/*jshint browser:true, jquery:true, unused:false */
|
5
5
|
/*global jQuery: false */
|
6
|
-
;(function($){
|
6
|
+
;(function($) {
|
7
7
|
'use strict';
|
8
8
|
|
9
9
|
var ts = $.tablesorter,
|
@@ -17,10 +17,11 @@
|
|
17
17
|
init : function(c) {
|
18
18
|
c.$table
|
19
19
|
.unbind(printTable.event)
|
20
|
-
.bind(printTable.event, function(){
|
20
|
+
.bind(printTable.event, function() {
|
21
21
|
// explicitly use table.config.widgetOptions because we want
|
22
22
|
// the most up-to-date values; not the 'wo' from initialization
|
23
23
|
printTable.process(c, c.widgetOptions);
|
24
|
+
return false;
|
24
25
|
});
|
25
26
|
},
|
26
27
|
|
@@ -38,7 +39,7 @@
|
|
38
39
|
'@media print { .print_widget_hidden { display: none; } }';
|
39
40
|
|
40
41
|
// replace content with data-attribute content
|
41
|
-
$table.find('[' + wo.print_dataAttrib + ']').each(function(){
|
42
|
+
$table.find('[' + wo.print_dataAttrib + ']').each(function() {
|
42
43
|
$this = $(this);
|
43
44
|
$this.text( $this.attr(wo.print_dataAttrib) );
|
44
45
|
});
|
@@ -137,7 +138,7 @@
|
|
137
138
|
init: function(table, thisWidget, c) {
|
138
139
|
printTable.init(c);
|
139
140
|
},
|
140
|
-
remove: function(table, c){
|
141
|
+
remove: function(table, c) {
|
141
142
|
printTable.remove(c);
|
142
143
|
}
|
143
144
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: scroller - updated
|
1
|
+
/*! Widget: scroller - updated 3/1/2016 (v2.25.5) *//*
|
2
2
|
Copyright (C) 2011 T. Connell & Associates, Inc.
|
3
3
|
|
4
4
|
Dual-licensed under the MIT and GPL licenses
|
@@ -186,7 +186,7 @@
|
|
186
186
|
},
|
187
187
|
|
188
188
|
setup : function( c, wo ) {
|
189
|
-
var
|
189
|
+
var tbHt, $hdr, $t, $hCells, $fCells, $tableWrap, events, tmp, detectedWidth,
|
190
190
|
$win = $( window ),
|
191
191
|
tsScroller = ts.scroller,
|
192
192
|
namespace = c.namespace + 'tsscroller',
|
@@ -211,9 +211,10 @@
|
|
211
211
|
wo.scroller_barSetWidth = detectedWidth !== null ? detectedWidth : 15;
|
212
212
|
}
|
213
213
|
|
214
|
-
|
214
|
+
tmp = $table.children( 'caption' );
|
215
215
|
|
216
216
|
$hdr = $( '<table class="' + $table.attr( 'class' ) + '" cellpadding=0 cellspacing=0>' +
|
217
|
+
( tmp.length ? tmp[ 0 ].outerHTML : '' ) +
|
217
218
|
$table.children( 'thead' )[ 0 ].outerHTML + '</table>' );
|
218
219
|
wo.scroller_$header = $hdr.addClass( c.namespace.slice( 1 ) + '_extra_table' );
|
219
220
|
|
@@ -247,8 +248,10 @@
|
|
247
248
|
.wrap( '<div class="' + tscss.scrollerHeader + '" />' )
|
248
249
|
.find( '.' + tscss.header );
|
249
250
|
|
250
|
-
// use max-height, so the height resizes dynamically while filtering
|
251
|
-
|
251
|
+
// if max-height is greater than 0 use max-height, so the height resizes dynamically while filtering
|
252
|
+
// else let the table not have a vertical scroll
|
253
|
+
$table.wrap( '<div class="' + tscss.scrollerTable +
|
254
|
+
( wo.scroller_height > 0 ? '" style="max-height:' + wo.scroller_height + 'px;">' : '">' ) );
|
252
255
|
$tableWrap = $table.parent();
|
253
256
|
|
254
257
|
// make scroller header sortable
|
@@ -260,9 +263,8 @@
|
|
260
263
|
}
|
261
264
|
|
262
265
|
$table
|
263
|
-
.
|
266
|
+
.children( 'thead, caption' )
|
264
267
|
.addClass( tscss.scrollerHideElement );
|
265
|
-
|
266
268
|
tbHt = $tableWrap.parent().height();
|
267
269
|
|
268
270
|
// The header will always jump into view if scrolling the table body
|
@@ -444,7 +446,7 @@
|
|
444
446
|
.width( setWidth + temp );
|
445
447
|
|
446
448
|
// hide original table thead
|
447
|
-
$table.children( 'thead' ).addClass( tscss.scrollerHideElement );
|
449
|
+
$table.children( 'thead, caption' ).addClass( tscss.scrollerHideElement );
|
448
450
|
|
449
451
|
// update fixed column sizes
|
450
452
|
tsScroller.updateFixed( c, wo );
|
@@ -479,6 +481,8 @@
|
|
479
481
|
.removeClass( tscss.scrollerWrap )
|
480
482
|
.attr( 'id', '' );
|
481
483
|
|
484
|
+
$fixedColumn.find('caption').html(' ');
|
485
|
+
|
482
486
|
if ( wo.scroller_addFixedOverlay ) {
|
483
487
|
$fixedColumn.append( '<div class="' + tscss.scrollerFixedPanel + '">' );
|
484
488
|
}
|