jquery-tablesorter 1.21.3 → 1.21.4
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 +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +48 -30
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +6 -6
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +42 -24
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-columnSelector.js +18 -13
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-select2.js +41 -23
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +24 -16
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-grouping.js +7 -8
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-resizable.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-scroller.js +5 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-uitheme.js +16 -6
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-view.js +6 -3
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.bootstrap.css +7 -0
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.bootstrap_2.css +6 -0
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.dropbox.css +2 -4
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.grey.css +1 -2
- 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: 00d5cfb816cce8b645193c850e6ae99698cb2516
|
4
|
+
data.tar.gz: 5af380402f10f667792a92c6fff45c6675ad963b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 910fb98292ba03abcbe9936aa464912c2c320665aed95906e681ce9ea07ee60c398be04b65094cc743518c99e3dbc83cb3deaa2f987affc5d65176601028d5f3
|
7
|
+
data.tar.gz: c40b9a23019d3ef3d0ec431f50c6ef2bef63f5fb375257f36d50d6baeb425b15b5cc1b69453fb9015e405d0fcb962cbe20c71a27340090865c2a19efe6ca6670
|
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.26.
|
7
|
+
Current tablesorter version: 2.26.6 (7/11/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 7/11/2016 (v2.26.6)
|
4
4
|
*/
|
5
5
|
/*jshint browser:true, jquery:true, unused:false */
|
6
6
|
;(function($) {
|
@@ -783,7 +783,7 @@
|
|
783
783
|
// set to either set or get value
|
784
784
|
parsePageSize = function( p, size, mode ) {
|
785
785
|
var s = parseInt( size, 10 ) || p.size || p.settings.size || 10;
|
786
|
-
return /all/i.test( size ) || s === p.totalRows ?
|
786
|
+
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
787
787
|
// "get" to get `p.size` or "set" to set `p.$size.val()`
|
788
788
|
'all' : ( mode === 'get' ? s : p.size );
|
789
789
|
},
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
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.26.
|
19
|
+
/*! TableSorter (FORK) v2.26.6 *//*
|
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.26.
|
42
|
+
version : '2.26.6',
|
43
43
|
|
44
44
|
parsers : [],
|
45
45
|
widgets : [],
|
@@ -1777,14 +1777,14 @@
|
|
1777
1777
|
regex = ts.regex;
|
1778
1778
|
// first try and sort Hex codes
|
1779
1779
|
if ( regex.hex.test( b ) ) {
|
1780
|
-
aNum = parseInt( a.match( regex.hex ), 16 );
|
1781
|
-
bNum = parseInt( b.match( regex.hex ), 16 );
|
1780
|
+
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
1781
|
+
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
1782
1782
|
if ( aNum < bNum ) { return -1; }
|
1783
1783
|
if ( aNum > bNum ) { return 1; }
|
1784
1784
|
}
|
1785
1785
|
// chunk/tokenize
|
1786
|
-
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1787
|
-
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1786
|
+
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1787
|
+
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1788
1788
|
max = Math.max( aNum.length, bNum.length );
|
1789
1789
|
// natural sorting through split numeric strings and default strings
|
1790
1790
|
for ( indx = 0; indx < max; indx++ ) {
|
@@ -2839,7 +2839,7 @@
|
|
2839
2839
|
|
2840
2840
|
})(jQuery, window, document);
|
2841
2841
|
|
2842
|
-
/*! Widget: uitheme - updated
|
2842
|
+
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
2843
2843
|
;(function ($) {
|
2844
2844
|
'use strict';
|
2845
2845
|
var ts = $.tablesorter || {};
|
@@ -2897,7 +2897,7 @@
|
|
2897
2897
|
id: 'uitheme',
|
2898
2898
|
priority: 10,
|
2899
2899
|
format: function(table, c, wo) {
|
2900
|
-
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
2900
|
+
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
2901
2901
|
themesAll = ts.themes,
|
2902
2902
|
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
2903
2903
|
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
@@ -2964,10 +2964,20 @@
|
|
2964
2964
|
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
2965
2965
|
.addClass(themes.icons || '');
|
2966
2966
|
}
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
.
|
2967
|
+
// filter widget initializes after uitheme
|
2968
|
+
if (c.widgets.indexOf('filter') > -1) {
|
2969
|
+
tmp = function() {
|
2970
|
+
$table.children('thead').children('.' + ts.css.filterRow)
|
2971
|
+
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
2972
|
+
.addClass(themes.filterRow || '');
|
2973
|
+
};
|
2974
|
+
if (wo.filter_initialized) {
|
2975
|
+
tmp();
|
2976
|
+
} else {
|
2977
|
+
$table.one('filterInit', function() {
|
2978
|
+
tmp();
|
2979
|
+
});
|
2980
|
+
}
|
2971
2981
|
}
|
2972
2982
|
}
|
2973
2983
|
for (i = 0; i < c.columns; i++) {
|
@@ -3104,7 +3114,7 @@
|
|
3104
3114
|
|
3105
3115
|
})(jQuery);
|
3106
3116
|
|
3107
|
-
/*! Widget: filter - updated
|
3117
|
+
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
3108
3118
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3109
3119
|
* by Rob Garrison
|
3110
3120
|
*/
|
@@ -3891,12 +3901,13 @@
|
|
3891
3901
|
.attr( 'data-lastSearchTime', new Date().getTime() )
|
3892
3902
|
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
3893
3903
|
.bind( 'keydown' + namespace, function( event ) {
|
3894
|
-
if ( event.which === tskeyCodes.escape && !
|
3904
|
+
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
3895
3905
|
// prevent keypress event
|
3896
3906
|
return false;
|
3897
3907
|
}
|
3898
3908
|
})
|
3899
3909
|
.bind( 'keyup' + namespace, function( event ) {
|
3910
|
+
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
3900
3911
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
3901
3912
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
3902
3913
|
// emulate what webkit does.... escape clears the filter
|
@@ -3923,7 +3934,8 @@
|
|
3923
3934
|
// don't get cached data, in case data-column changes dynamically
|
3924
3935
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
3925
3936
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
3926
|
-
if (
|
3937
|
+
if ( table.config.widgetOptions.filter_initialized &&
|
3938
|
+
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
3927
3939
|
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
3928
3940
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
3929
3941
|
( event.type === 'input' && this.value === '' ) ) {
|
@@ -3972,7 +3984,7 @@
|
|
3972
3984
|
// show/hide filter row as needed
|
3973
3985
|
c.$table
|
3974
3986
|
.find( '.' + tscss.filterRow )
|
3975
|
-
.triggerHandler(
|
3987
|
+
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
3976
3988
|
}
|
3977
3989
|
// return if the last search is the same; but filter === false when updating the search
|
3978
3990
|
// see example-widget-filter.html filter toggle buttons
|
@@ -4005,26 +4017,34 @@
|
|
4005
4017
|
return false;
|
4006
4018
|
}
|
4007
4019
|
},
|
4020
|
+
hideFiltersCheck: function( c ) {
|
4021
|
+
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
4022
|
+
var val = c.widgetOptions.filter_hideFilters( c );
|
4023
|
+
if (typeof val === 'boolean') {
|
4024
|
+
return val;
|
4025
|
+
}
|
4026
|
+
}
|
4027
|
+
return ts.getFilters( c.$table ).join( '' ) === '';
|
4028
|
+
},
|
4008
4029
|
hideFilters: function( c, $table ) {
|
4009
|
-
var timer
|
4010
|
-
|
4011
|
-
|
4030
|
+
var timer;
|
4031
|
+
( $table || c.$table )
|
4032
|
+
.find( '.' + tscss.filterRow )
|
4033
|
+
.addClass( tscss.filterRowHide )
|
4012
4034
|
.bind( 'mouseenter mouseleave', function( e ) {
|
4013
4035
|
// save event object - http://bugs.jquery.com/ticket/12140
|
4014
4036
|
var event = e,
|
4015
|
-
$
|
4037
|
+
$row = $( this );
|
4016
4038
|
clearTimeout( timer );
|
4017
4039
|
timer = setTimeout( function() {
|
4018
4040
|
if ( /enter|over/.test( event.type ) ) {
|
4019
|
-
$
|
4041
|
+
$row.removeClass( tscss.filterRowHide );
|
4020
4042
|
} else {
|
4021
4043
|
// don't hide if input has focus
|
4022
4044
|
// $( ':focus' ) needs jQuery 1.6+
|
4023
|
-
if ( $( document.activeElement ).closest( 'tr' )[0] !== $
|
4045
|
+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
4024
4046
|
// don't hide row if any filter has a value
|
4025
|
-
|
4026
|
-
$filterRow.addClass( tscss.filterRowHide );
|
4027
|
-
}
|
4047
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
4028
4048
|
}
|
4029
4049
|
}
|
4030
4050
|
}, 200 );
|
@@ -4036,9 +4056,7 @@
|
|
4036
4056
|
timer = setTimeout( function() {
|
4037
4057
|
clearTimeout( timer );
|
4038
4058
|
// don't hide row if any filter has a value
|
4039
|
-
|
4040
|
-
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
4041
|
-
}
|
4059
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
4042
4060
|
}, 200 );
|
4043
4061
|
});
|
4044
4062
|
},
|
@@ -5232,7 +5250,7 @@
|
|
5232
5250
|
|
5233
5251
|
})(jQuery, window);
|
5234
5252
|
|
5235
|
-
/*! Widget: resizable - updated 6/28/
|
5253
|
+
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
5236
5254
|
/*jshint browser:true, jquery:true, unused:false */
|
5237
5255
|
;(function ($, window) {
|
5238
5256
|
'use strict';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.26.
|
1
|
+
/*! TableSorter (FORK) v2.26.6 *//*
|
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.26.
|
24
|
+
version : '2.26.6',
|
25
25
|
|
26
26
|
parsers : [],
|
27
27
|
widgets : [],
|
@@ -1759,14 +1759,14 @@
|
|
1759
1759
|
regex = ts.regex;
|
1760
1760
|
// first try and sort Hex codes
|
1761
1761
|
if ( regex.hex.test( b ) ) {
|
1762
|
-
aNum = parseInt( a.match( regex.hex ), 16 );
|
1763
|
-
bNum = parseInt( b.match( regex.hex ), 16 );
|
1762
|
+
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
1763
|
+
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
1764
1764
|
if ( aNum < bNum ) { return -1; }
|
1765
1765
|
if ( aNum > bNum ) { return 1; }
|
1766
1766
|
}
|
1767
1767
|
// chunk/tokenize
|
1768
|
-
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1769
|
-
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1768
|
+
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1769
|
+
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
1770
1770
|
max = Math.max( aNum.length, bNum.length );
|
1771
1771
|
// natural sorting through split numeric strings and default strings
|
1772
1772
|
for ( indx = 0; indx < max; indx++ ) {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -107,7 +107,7 @@
|
|
107
107
|
|
108
108
|
})(jQuery, window, document);
|
109
109
|
|
110
|
-
/*! Widget: uitheme - updated
|
110
|
+
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
111
111
|
;(function ($) {
|
112
112
|
'use strict';
|
113
113
|
var ts = $.tablesorter || {};
|
@@ -165,7 +165,7 @@
|
|
165
165
|
id: 'uitheme',
|
166
166
|
priority: 10,
|
167
167
|
format: function(table, c, wo) {
|
168
|
-
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
168
|
+
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
169
169
|
themesAll = ts.themes,
|
170
170
|
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
171
171
|
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
@@ -232,10 +232,20 @@
|
|
232
232
|
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
233
233
|
.addClass(themes.icons || '');
|
234
234
|
}
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
.
|
235
|
+
// filter widget initializes after uitheme
|
236
|
+
if (c.widgets.indexOf('filter') > -1) {
|
237
|
+
tmp = function() {
|
238
|
+
$table.children('thead').children('.' + ts.css.filterRow)
|
239
|
+
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
240
|
+
.addClass(themes.filterRow || '');
|
241
|
+
};
|
242
|
+
if (wo.filter_initialized) {
|
243
|
+
tmp();
|
244
|
+
} else {
|
245
|
+
$table.one('filterInit', function() {
|
246
|
+
tmp();
|
247
|
+
});
|
248
|
+
}
|
239
249
|
}
|
240
250
|
}
|
241
251
|
for (i = 0; i < c.columns; i++) {
|
@@ -372,7 +382,7 @@
|
|
372
382
|
|
373
383
|
})(jQuery);
|
374
384
|
|
375
|
-
/*! Widget: filter - updated
|
385
|
+
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
376
386
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
377
387
|
* by Rob Garrison
|
378
388
|
*/
|
@@ -1159,12 +1169,13 @@
|
|
1159
1169
|
.attr( 'data-lastSearchTime', new Date().getTime() )
|
1160
1170
|
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
1161
1171
|
.bind( 'keydown' + namespace, function( event ) {
|
1162
|
-
if ( event.which === tskeyCodes.escape && !
|
1172
|
+
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
1163
1173
|
// prevent keypress event
|
1164
1174
|
return false;
|
1165
1175
|
}
|
1166
1176
|
})
|
1167
1177
|
.bind( 'keyup' + namespace, function( event ) {
|
1178
|
+
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
1168
1179
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
1169
1180
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
1170
1181
|
// emulate what webkit does.... escape clears the filter
|
@@ -1191,7 +1202,8 @@
|
|
1191
1202
|
// don't get cached data, in case data-column changes dynamically
|
1192
1203
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
1193
1204
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
1194
|
-
if (
|
1205
|
+
if ( table.config.widgetOptions.filter_initialized &&
|
1206
|
+
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
1195
1207
|
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
1196
1208
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
1197
1209
|
( event.type === 'input' && this.value === '' ) ) {
|
@@ -1240,7 +1252,7 @@
|
|
1240
1252
|
// show/hide filter row as needed
|
1241
1253
|
c.$table
|
1242
1254
|
.find( '.' + tscss.filterRow )
|
1243
|
-
.triggerHandler(
|
1255
|
+
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
1244
1256
|
}
|
1245
1257
|
// return if the last search is the same; but filter === false when updating the search
|
1246
1258
|
// see example-widget-filter.html filter toggle buttons
|
@@ -1273,26 +1285,34 @@
|
|
1273
1285
|
return false;
|
1274
1286
|
}
|
1275
1287
|
},
|
1288
|
+
hideFiltersCheck: function( c ) {
|
1289
|
+
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
1290
|
+
var val = c.widgetOptions.filter_hideFilters( c );
|
1291
|
+
if (typeof val === 'boolean') {
|
1292
|
+
return val;
|
1293
|
+
}
|
1294
|
+
}
|
1295
|
+
return ts.getFilters( c.$table ).join( '' ) === '';
|
1296
|
+
},
|
1276
1297
|
hideFilters: function( c, $table ) {
|
1277
|
-
var timer
|
1278
|
-
|
1279
|
-
|
1298
|
+
var timer;
|
1299
|
+
( $table || c.$table )
|
1300
|
+
.find( '.' + tscss.filterRow )
|
1301
|
+
.addClass( tscss.filterRowHide )
|
1280
1302
|
.bind( 'mouseenter mouseleave', function( e ) {
|
1281
1303
|
// save event object - http://bugs.jquery.com/ticket/12140
|
1282
1304
|
var event = e,
|
1283
|
-
$
|
1305
|
+
$row = $( this );
|
1284
1306
|
clearTimeout( timer );
|
1285
1307
|
timer = setTimeout( function() {
|
1286
1308
|
if ( /enter|over/.test( event.type ) ) {
|
1287
|
-
$
|
1309
|
+
$row.removeClass( tscss.filterRowHide );
|
1288
1310
|
} else {
|
1289
1311
|
// don't hide if input has focus
|
1290
1312
|
// $( ':focus' ) needs jQuery 1.6+
|
1291
|
-
if ( $( document.activeElement ).closest( 'tr' )[0] !== $
|
1313
|
+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
1292
1314
|
// don't hide row if any filter has a value
|
1293
|
-
|
1294
|
-
$filterRow.addClass( tscss.filterRowHide );
|
1295
|
-
}
|
1315
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
1296
1316
|
}
|
1297
1317
|
}
|
1298
1318
|
}, 200 );
|
@@ -1304,9 +1324,7 @@
|
|
1304
1324
|
timer = setTimeout( function() {
|
1305
1325
|
clearTimeout( timer );
|
1306
1326
|
// don't hide row if any filter has a value
|
1307
|
-
|
1308
|
-
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
1309
|
-
}
|
1327
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
1310
1328
|
}, 200 );
|
1311
1329
|
});
|
1312
1330
|
},
|
@@ -2500,7 +2518,7 @@
|
|
2500
2518
|
|
2501
2519
|
})(jQuery, window);
|
2502
2520
|
|
2503
|
-
/*! Widget: resizable - updated 6/28/
|
2521
|
+
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
2504
2522
|
/*jshint browser:true, jquery:true, unused:false */
|
2505
2523
|
;(function ($, window) {
|
2506
2524
|
'use strict';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Widget: columnSelector (responsive table widget) - updated
|
1
|
+
/* Widget: columnSelector (responsive table widget) - updated 7/11/2016 (v2.26.6) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Justin Hallett & Rob Garrison
|
4
4
|
*/
|
@@ -348,7 +348,7 @@
|
|
348
348
|
}
|
349
349
|
// only add resize end if using media queries
|
350
350
|
if ( hasSpans && wo.columnSelector_mediaquery ) {
|
351
|
-
nspace = c.namespace
|
351
|
+
nspace = c.namespace + 'columnselector';
|
352
352
|
// Setup window.resizeEnd event
|
353
353
|
$window
|
354
354
|
.off( nspace )
|
@@ -365,15 +365,18 @@
|
|
365
365
|
adjustColspans: function(c, wo) {
|
366
366
|
var index, cols, col, span, end, $cell,
|
367
367
|
colSel = c.selector,
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
368
|
+
filtered = wo.filter_filteredRow || 'filtered',
|
369
|
+
autoModeOn = wo.columnSelector_mediaquery && colSel.auto,
|
370
|
+
// find all header/footer cells in case a regular column follows a colspan; see #1238
|
371
|
+
$headers = c.$table.children( 'thead, tfoot' ).children().children()
|
372
|
+
.add( $(c.namespace + '_extra_table').children( 'thead, tfoot' ).children().children() ),
|
373
|
+
len = $headers.length;
|
374
|
+
for ( index = 0; index < len; index++ ) {
|
375
|
+
$cell = $headers.eq(index);
|
376
|
+
col = parseInt( $cell.attr('data-column'), 10 ) || $cell[0].cellIndex;
|
377
|
+
span = parseInt( $cell.attr('data-col-span'), 10 ) || 1;
|
378
|
+
end = col + span;
|
379
|
+
if ( span > 1 ) {
|
377
380
|
for ( cols = col; cols < end; cols++ ) {
|
378
381
|
if ( !autoModeOn && colSel.states[ cols ] === false ||
|
379
382
|
autoModeOn && c.$headerIndexed[ cols ] && !c.$headerIndexed[ cols ].is(':visible') ) {
|
@@ -381,10 +384,12 @@
|
|
381
384
|
}
|
382
385
|
}
|
383
386
|
if ( span ) {
|
384
|
-
$cell.removeClass(
|
387
|
+
$cell.removeClass( filtered )[0].colSpan = span;
|
385
388
|
} else {
|
386
|
-
$cell.addClass(
|
389
|
+
$cell.addClass( filtered );
|
387
390
|
}
|
391
|
+
} else if ( typeof colSel.states[ col ] !== 'undefined' ) {
|
392
|
+
$cell.toggleClass( filtered, !colSel.states[ col ] );
|
388
393
|
}
|
389
394
|
}
|
390
395
|
},
|
data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-select2.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter, select2 formatter function - updated
|
1
|
+
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) *//*
|
2
2
|
* requires: jQuery 1.7.2+, tableSorter (FORK) 2.16+, filter widget 2.16+
|
3
3
|
and select2 v3.4.6+ plugin (this code is NOT compatible with select2 v4+)
|
4
4
|
*/
|
@@ -25,28 +25,40 @@
|
|
25
25
|
|
26
26
|
}, select2Def ),
|
27
27
|
arry, data,
|
28
|
-
|
28
|
+
// add class to $cell since it may point to a removed DOM node
|
29
|
+
// after a "refreshWidgets"; see #1237
|
30
|
+
c = $cell.addClass('select2col' + indx).closest('table')[0].config,
|
29
31
|
wo = c.widgetOptions,
|
30
32
|
// Add a hidden input to hold the range values
|
31
33
|
$input = $('<input class="filter" type="hidden">')
|
32
34
|
.appendTo($cell)
|
33
35
|
// hidden filter update namespace trigger by filter widget
|
34
36
|
.bind('change' + c.namespace + 'filter', function(){
|
35
|
-
var val = this.value;
|
36
|
-
|
37
|
-
$cell.find('.select2').select2('val', val);
|
37
|
+
var val = convertRegex(this.value);
|
38
|
+
c.$table.find('.select2col' + indx + ' .select2').select2('val', val);
|
38
39
|
updateSelect2();
|
39
40
|
}),
|
40
41
|
$header = c.$headerIndexed[indx],
|
41
42
|
onlyAvail = $header.hasClass(wo.filter_onlyAvail),
|
42
|
-
$shcell = [],
|
43
43
|
matchPrefix = o.match ? '' : '^',
|
44
44
|
matchSuffix = o.match ? '' : '$',
|
45
|
+
flags = wo.filter_ignoreCase ? 'i' : '',
|
46
|
+
|
47
|
+
convertRegex = function(val) {
|
48
|
+
// value = '/(^x$|^y$)/' => ['x','y']
|
49
|
+
return val
|
50
|
+
.replace(/^\/\(\^?/, '')
|
51
|
+
.replace(/\$\|\^/g, '|')
|
52
|
+
.replace(/\$?\)\/i?$/g, '')
|
53
|
+
// unescape special regex characters
|
54
|
+
.replace(/\\/g, '')
|
55
|
+
.split('|');
|
56
|
+
},
|
45
57
|
|
46
58
|
// this function updates the hidden input and adds the current values to the header cell text
|
47
59
|
updateSelect2 = function() {
|
48
60
|
var arry = false,
|
49
|
-
v =
|
61
|
+
v = c.$table.find('.select2col' + indx + ' .select2').select2('val') || o.value || '';
|
50
62
|
// convert array to string
|
51
63
|
if ($.isArray(v)) {
|
52
64
|
arry = true;
|
@@ -60,12 +72,16 @@
|
|
60
72
|
}
|
61
73
|
$input
|
62
74
|
// add regex, so we filter exact numbers
|
63
|
-
.val(
|
75
|
+
.val(
|
76
|
+
$.isArray(v) && v.length && v.join('') !== '' ?
|
77
|
+
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
|
78
|
+
''
|
79
|
+
)
|
64
80
|
.trigger('search').end()
|
65
81
|
.find('.select2').select2('val', v);
|
66
82
|
// update sticky header cell
|
67
|
-
if (
|
68
|
-
|
83
|
+
if (c.widgetOptions.$sticky) {
|
84
|
+
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
69
85
|
}
|
70
86
|
},
|
71
87
|
|
@@ -91,12 +107,13 @@
|
|
91
107
|
// data options are already defined
|
92
108
|
if (!(o.ajax && !$.isEmptyObject(o.ajax)) && !o.data) {
|
93
109
|
updateOptions();
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
c.$table.bind('filterEnd', function(){
|
111
|
+
updateOptions();
|
112
|
+
c.$table
|
113
|
+
.find('.select2col' + indx)
|
114
|
+
.add(c.widgetOptions.$sticky && c.widgetOptions.$sticky.find('.select2col' + indx))
|
115
|
+
.find('.select2').select2(o);
|
116
|
+
});
|
100
117
|
}
|
101
118
|
|
102
119
|
// add a select2 hidden input!
|
@@ -109,10 +126,10 @@
|
|
109
126
|
});
|
110
127
|
|
111
128
|
// update select2 from filter hidden input, in case of saved filters
|
112
|
-
c.$table.bind('filterFomatterUpdate', function(){
|
129
|
+
c.$table.bind('filterFomatterUpdate', function() {
|
113
130
|
// value = '/(^x$|^y$)/' => 'x,y'
|
114
|
-
var val = c.$table.data('lastSearch')[indx] || '';
|
115
|
-
|
131
|
+
var val = convertRegex(c.$table.data('lastSearch')[indx] || '');
|
132
|
+
$cell = c.$table.find('.select2col' + indx);
|
116
133
|
$cell.find('.select2').select2('val', val);
|
117
134
|
updateSelect2();
|
118
135
|
ts.filter.formatterUpdated($cell, indx);
|
@@ -120,25 +137,26 @@
|
|
120
137
|
|
121
138
|
// has sticky headers?
|
122
139
|
c.$table.bind('stickyHeadersInit', function(){
|
123
|
-
$shcell = c.widgetOptions.$sticky.find('.' +
|
140
|
+
var $shcell = c.widgetOptions.$sticky.find('.select2col' + indx).empty();
|
124
141
|
// add a select2!
|
125
142
|
$('<input class="select2 select2-' + indx + '" type="hidden">')
|
126
143
|
.val(o.value)
|
127
144
|
.appendTo($shcell)
|
128
145
|
.select2(o)
|
129
146
|
.bind('change', function(){
|
130
|
-
|
147
|
+
c.$table.find('.select2col' + indx)
|
148
|
+
.find('.select2')
|
149
|
+
.select2('val', c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val') );
|
131
150
|
updateSelect2();
|
132
151
|
});
|
133
152
|
if (o.cellText) {
|
134
153
|
$shcell.prepend('<label>' + o.cellText + '</label>');
|
135
154
|
}
|
136
|
-
|
137
155
|
});
|
138
156
|
|
139
157
|
// on reset
|
140
158
|
c.$table.bind('filterReset', function(){
|
141
|
-
|
159
|
+
c.$table.find('.select2col' + indx).find('.select2').select2('val', o.value || '');
|
142
160
|
setTimeout(function(){
|
143
161
|
updateSelect2();
|
144
162
|
}, 0);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: filter - updated
|
1
|
+
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -785,12 +785,13 @@
|
|
785
785
|
.attr( 'data-lastSearchTime', new Date().getTime() )
|
786
786
|
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
787
787
|
.bind( 'keydown' + namespace, function( event ) {
|
788
|
-
if ( event.which === tskeyCodes.escape && !
|
788
|
+
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
789
789
|
// prevent keypress event
|
790
790
|
return false;
|
791
791
|
}
|
792
792
|
})
|
793
793
|
.bind( 'keyup' + namespace, function( event ) {
|
794
|
+
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
794
795
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
795
796
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
796
797
|
// emulate what webkit does.... escape clears the filter
|
@@ -817,7 +818,8 @@
|
|
817
818
|
// don't get cached data, in case data-column changes dynamically
|
818
819
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
819
820
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
820
|
-
if (
|
821
|
+
if ( table.config.widgetOptions.filter_initialized &&
|
822
|
+
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
821
823
|
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
822
824
|
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
823
825
|
( event.type === 'input' && this.value === '' ) ) {
|
@@ -866,7 +868,7 @@
|
|
866
868
|
// show/hide filter row as needed
|
867
869
|
c.$table
|
868
870
|
.find( '.' + tscss.filterRow )
|
869
|
-
.triggerHandler(
|
871
|
+
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
870
872
|
}
|
871
873
|
// return if the last search is the same; but filter === false when updating the search
|
872
874
|
// see example-widget-filter.html filter toggle buttons
|
@@ -899,26 +901,34 @@
|
|
899
901
|
return false;
|
900
902
|
}
|
901
903
|
},
|
904
|
+
hideFiltersCheck: function( c ) {
|
905
|
+
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
906
|
+
var val = c.widgetOptions.filter_hideFilters( c );
|
907
|
+
if (typeof val === 'boolean') {
|
908
|
+
return val;
|
909
|
+
}
|
910
|
+
}
|
911
|
+
return ts.getFilters( c.$table ).join( '' ) === '';
|
912
|
+
},
|
902
913
|
hideFilters: function( c, $table ) {
|
903
|
-
var timer
|
904
|
-
|
905
|
-
|
914
|
+
var timer;
|
915
|
+
( $table || c.$table )
|
916
|
+
.find( '.' + tscss.filterRow )
|
917
|
+
.addClass( tscss.filterRowHide )
|
906
918
|
.bind( 'mouseenter mouseleave', function( e ) {
|
907
919
|
// save event object - http://bugs.jquery.com/ticket/12140
|
908
920
|
var event = e,
|
909
|
-
$
|
921
|
+
$row = $( this );
|
910
922
|
clearTimeout( timer );
|
911
923
|
timer = setTimeout( function() {
|
912
924
|
if ( /enter|over/.test( event.type ) ) {
|
913
|
-
$
|
925
|
+
$row.removeClass( tscss.filterRowHide );
|
914
926
|
} else {
|
915
927
|
// don't hide if input has focus
|
916
928
|
// $( ':focus' ) needs jQuery 1.6+
|
917
|
-
if ( $( document.activeElement ).closest( 'tr' )[0] !== $
|
929
|
+
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
918
930
|
// don't hide row if any filter has a value
|
919
|
-
|
920
|
-
$filterRow.addClass( tscss.filterRowHide );
|
921
|
-
}
|
931
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
922
932
|
}
|
923
933
|
}
|
924
934
|
}, 200 );
|
@@ -930,9 +940,7 @@
|
|
930
940
|
timer = setTimeout( function() {
|
931
941
|
clearTimeout( timer );
|
932
942
|
// don't hide row if any filter has a value
|
933
|
-
|
934
|
-
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
935
|
-
}
|
943
|
+
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
936
944
|
}, 200 );
|
937
945
|
});
|
938
946
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: grouping - updated
|
1
|
+
/*! Widget: grouping - updated 7/11/2016 (v2.26.6) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -151,12 +151,10 @@
|
|
151
151
|
}
|
152
152
|
}
|
153
153
|
}
|
154
|
-
|
155
154
|
// save collapsed groups
|
156
155
|
if ( wo.group_saveGroups &&
|
157
156
|
!$.isEmptyObject( wo.group_collapsedGroups ) &&
|
158
157
|
wo.group_collapsedGroups[ wo.group_collapsedGroup ].length ) {
|
159
|
-
|
160
158
|
name = $row.find( '.group-name' ).text().toLowerCase() + $row.attr( 'data-group-index' );
|
161
159
|
isHidden = $.inArray( name, wo.group_collapsedGroups[ wo.group_collapsedGroup ] ) > -1;
|
162
160
|
$row.toggleClass( 'collapsed', isHidden );
|
@@ -172,7 +170,7 @@
|
|
172
170
|
var name = ( data.currentGroup || '' ).replace(/</g, '<').replace(/>/g, '>');
|
173
171
|
return '<tr class="group-header ' + c.selectorRemove.slice(1) +
|
174
172
|
'" unselectable="on" ' + ( c.tabIndex ? 'tabindex="0" ' : '' ) + 'data-group-index="' +
|
175
|
-
|
173
|
+
data.groupIndex + '">' +
|
176
174
|
'<td colspan="' + c.columns + '">' +
|
177
175
|
( wo.group_collapsible ? '<i/>' : '' ) +
|
178
176
|
'<span class="group-name">' + name + '</span>' +
|
@@ -183,8 +181,8 @@
|
|
183
181
|
// save current grouping
|
184
182
|
var saveName, direction,
|
185
183
|
savedGroup = false;
|
186
|
-
if (wo.group_collapsible && wo.group_saveGroups
|
187
|
-
wo.group_collapsedGroups = ts.storage( c.table, 'tablesorter-groups' ) || {};
|
184
|
+
if (wo.group_collapsible && wo.group_saveGroups) {
|
185
|
+
wo.group_collapsedGroups = ts.storage && ts.storage( c.table, 'tablesorter-groups' ) || {};
|
188
186
|
// include direction when saving groups (reversed numbers shows different range values)
|
189
187
|
direction = 'dir' + c.sortList[0][1];
|
190
188
|
// combine column, sort direction & grouping as save key
|
@@ -234,9 +232,10 @@
|
|
234
232
|
}
|
235
233
|
data.$row.before( tsg.groupHeaderHTML( c, wo, data ) );
|
236
234
|
if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) {
|
237
|
-
// all groups start collapsed
|
238
|
-
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup );
|
235
|
+
// all groups start collapsed; data.groupIndex is 1 more than the expected index.
|
236
|
+
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup + data.groupIndex );
|
239
237
|
}
|
238
|
+
data.groupIndex++;
|
240
239
|
}
|
241
240
|
},
|
242
241
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: Pager - updated
|
1
|
+
/*! Widget: Pager - updated 7/11/2016 (v2.26.6) */
|
2
2
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -1085,7 +1085,7 @@
|
|
1085
1085
|
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
1086
1086
|
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
1087
1087
|
tsp.updatePageDisplay( c, false );
|
1088
|
-
} else {
|
1088
|
+
} else if (p.initialized) {
|
1089
1089
|
tsp.getAjax( c );
|
1090
1090
|
}
|
1091
1091
|
} else if ( !p.ajax ) {
|
@@ -1115,7 +1115,7 @@
|
|
1115
1115
|
parsePageSize: function( c, size, mode ) {
|
1116
1116
|
var p = c.pager,
|
1117
1117
|
s = parseInt( size, 10 ) || p.size || c.widgetOptions.pager_size || 10;
|
1118
|
-
return /all/i.test( size ) || s === p.totalRows ?
|
1118
|
+
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
1119
1119
|
// "get" to set `p.size` or "set" to set `p.$size.val()`
|
1120
1120
|
'all' : ( mode === 'get' ? s : p.size );
|
1121
1121
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: scroller - updated
|
1
|
+
/*! Widget: scroller - updated 7/11/2016 (v2.26.6) *//*
|
2
2
|
Copyright (C) 2011 T. Connell & Associates, Inc.
|
3
3
|
|
4
4
|
Dual-licensed under the MIT and GPL licenses
|
@@ -370,6 +370,8 @@
|
|
370
370
|
$tableWrap = $table.parent(),
|
371
371
|
$hdr = wo.scroller_$header,
|
372
372
|
$foot = wo.scroller_$footer,
|
373
|
+
$win = $(window),
|
374
|
+
position = [ $win.scrollLeft(), $win.scrollTop() ],
|
373
375
|
id = c.namespace.slice( 1 ) + 'tsscroller',
|
374
376
|
// Hide other scrollers so we can resize
|
375
377
|
$div = $( 'div.' + tscss.scrollerWrap + '[id!="' + id + '"]' )
|
@@ -459,6 +461,8 @@
|
|
459
461
|
.find( '.' + tscss.scrollerFixed )
|
460
462
|
.find( '.' + tscss.scrollerTable )
|
461
463
|
.scrollTop( wo.scroller_saved[1] );
|
464
|
+
$win.scrollLeft( position[0] );
|
465
|
+
$win.scrollTop( position[1] );
|
462
466
|
|
463
467
|
// update resizable widget handles
|
464
468
|
setTimeout( function() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: uitheme - updated
|
1
|
+
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
2
2
|
;(function ($) {
|
3
3
|
'use strict';
|
4
4
|
var ts = $.tablesorter || {};
|
@@ -56,7 +56,7 @@
|
|
56
56
|
id: 'uitheme',
|
57
57
|
priority: 10,
|
58
58
|
format: function(table, c, wo) {
|
59
|
-
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
59
|
+
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
60
60
|
themesAll = ts.themes,
|
61
61
|
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
62
62
|
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
@@ -123,10 +123,20 @@
|
|
123
123
|
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
124
124
|
.addClass(themes.icons || '');
|
125
125
|
}
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
.
|
126
|
+
// filter widget initializes after uitheme
|
127
|
+
if (c.widgets.indexOf('filter') > -1) {
|
128
|
+
tmp = function() {
|
129
|
+
$table.children('thead').children('.' + ts.css.filterRow)
|
130
|
+
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
131
|
+
.addClass(themes.filterRow || '');
|
132
|
+
};
|
133
|
+
if (wo.filter_initialized) {
|
134
|
+
tmp();
|
135
|
+
} else {
|
136
|
+
$table.one('filterInit', function() {
|
137
|
+
tmp();
|
138
|
+
});
|
139
|
+
}
|
130
140
|
}
|
131
141
|
}
|
132
142
|
for (i = 0; i < c.columns; i++) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Widget: view (beta) - updated
|
1
|
+
/* Widget: view (beta) - updated 7/11/2016 (v2.26.6) */
|
2
2
|
/* By Justin F. Hallett (https://github.com/TheSin-)
|
3
3
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
4
4
|
*/
|
@@ -100,7 +100,10 @@
|
|
100
100
|
var content = $(v).html();
|
101
101
|
// Add 2 spans, one is dropped when using .html()
|
102
102
|
var span = $('<span />').append($('<span/>', attrs).append(content));
|
103
|
-
tmpl = tmpl.replace(reg, span.html());
|
103
|
+
tmpl = tmpl.replace(new RegExp(reg, 'g'), span.html());
|
104
|
+
|
105
|
+
reg = '{col' + k + ':raw}';
|
106
|
+
tmpl = tmpl.replace(new RegExp(reg, 'g'), $(v).text());
|
104
107
|
});
|
105
108
|
|
106
109
|
var $tmpl = $(tmpl);
|
@@ -115,6 +118,7 @@
|
|
115
118
|
});
|
116
119
|
|
117
120
|
$(wo.view_container).append($container);
|
121
|
+
c.$table.triggerHandler('viewComplete');
|
118
122
|
},
|
119
123
|
|
120
124
|
removeView: function(c, wo) {
|
@@ -151,7 +155,6 @@
|
|
151
155
|
c.$table.on('tablesorter-ready', function() {
|
152
156
|
view.buildToolBar(c, wo);
|
153
157
|
view.buildView(c, wo);
|
154
|
-
c.$table.triggerHandler('viewComplete');
|
155
158
|
});
|
156
159
|
},
|
157
160
|
|
@@ -23,10 +23,17 @@
|
|
23
23
|
cursor: default;
|
24
24
|
}
|
25
25
|
|
26
|
+
.tablesorter-bootstrap .tablesorter-header.sorter-false i.tablesorter-icon {
|
27
|
+
display: none;
|
28
|
+
}
|
29
|
+
|
26
30
|
.tablesorter-bootstrap .tablesorter-header-inner {
|
27
31
|
position: relative;
|
28
32
|
padding: 4px 18px 4px 4px;
|
29
33
|
}
|
34
|
+
.tablesorter-bootstrap .sorter-false .tablesorter-header-inner {
|
35
|
+
padding: 4px;
|
36
|
+
}
|
30
37
|
|
31
38
|
/* bootstrap uses <i> for icons */
|
32
39
|
.tablesorter-bootstrap .tablesorter-header i.tablesorter-icon {
|
@@ -34,11 +34,17 @@
|
|
34
34
|
.tablesorter-bootstrap .sorter-false {
|
35
35
|
cursor: default;
|
36
36
|
}
|
37
|
+
.tablesorter-bootstrap .tablesorter-header.sorter-false i.tablesorter-icon {
|
38
|
+
display: none;
|
39
|
+
}
|
37
40
|
|
38
41
|
.tablesorter-bootstrap .tablesorter-header-inner {
|
39
42
|
position: relative;
|
40
43
|
padding: 4px 18px 4px 4px;
|
41
44
|
}
|
45
|
+
.tablesorter-bootstrap .sorter-false .tablesorter-header-inner {
|
46
|
+
padding: 4px;
|
47
|
+
}
|
42
48
|
|
43
49
|
/* bootstrap uses <i> for icons */
|
44
50
|
.tablesorter-bootstrap .tablesorter-header i.tablesorter-icon {
|
@@ -79,10 +79,8 @@
|
|
79
79
|
cursor: default;
|
80
80
|
}
|
81
81
|
|
82
|
-
.tablesorter-dropbox thead .sorter-false i.tablesorter-icon
|
83
|
-
|
84
|
-
background-image: none;
|
85
|
-
padding: 4px;
|
82
|
+
.tablesorter-dropbox thead .sorter-false i.tablesorter-icon {
|
83
|
+
display: none;
|
86
84
|
}
|
87
85
|
|
88
86
|
/* tbody */
|
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.21.
|
4
|
+
version: 1.21.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-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|