jquery-tablesorter 1.22.3 → 1.22.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/jquery.tablesorter.combined.js +17 -6
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +16 -5
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-input-select.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-grouping.js +6 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-mark.js +39 -10
- 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: 007bfb37837f29552a1fe96dae494796008dfc75
|
4
|
+
data.tar.gz: b83b347cb8192ec99001c4300e48c5929602dc03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 099f0aad67d2b14274c36439ab14f6e7ecf29aabe02c0e0f8d063c216dd6e699f6b892ee7792a961c148918323e66303e1bfb3ff0225fcb1ad4bc189173447c3
|
7
|
+
data.tar.gz: 29bf9c7067fcac6b6ba85c5f96ac481106f13d75beb61965a1e37a3897386ae67f1b82fede0fd1c9148899a3e25a3032b967c551f05edae72569d063027b90e3
|
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.27.
|
7
|
+
Current tablesorter version: 2.27.6 (9/1/2016), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 09-01-2016 (v2.27.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(jQuery) {
|
18
18
|
|
19
|
-
/*! TableSorter (FORK) v2.27.
|
19
|
+
/*! TableSorter (FORK) v2.27.6 *//*
|
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.6',
|
44
44
|
|
45
45
|
parsers : [],
|
46
46
|
widgets : [],
|
@@ -1639,8 +1639,9 @@
|
|
1639
1639
|
|
1640
1640
|
// sort multiple columns
|
1641
1641
|
multisort : function( c ) { /*jshint loopfunc:true */
|
1642
|
-
var tbodyIndex, sortTime, colMax, rows,
|
1642
|
+
var tbodyIndex, sortTime, colMax, rows, tmp,
|
1643
1643
|
table = c.table,
|
1644
|
+
sorter = [],
|
1644
1645
|
dir = 0,
|
1645
1646
|
textSorter = c.textSorter || '',
|
1646
1647
|
sortList = c.sortList,
|
@@ -1651,6 +1652,16 @@
|
|
1651
1652
|
return;
|
1652
1653
|
}
|
1653
1654
|
if ( c.debug ) { sortTime = new Date(); }
|
1655
|
+
// cache textSorter to optimize speed
|
1656
|
+
if ( typeof textSorter === 'object' ) {
|
1657
|
+
colMax = c.columns;
|
1658
|
+
while ( colMax-- ) {
|
1659
|
+
tmp = ts.getColumnData( table, textSorter, colMax );
|
1660
|
+
if ( typeof tmp === 'function' ) {
|
1661
|
+
sorter[ colMax ] = tmp;
|
1662
|
+
}
|
1663
|
+
}
|
1664
|
+
}
|
1654
1665
|
for ( tbodyIndex = 0; tbodyIndex < len; tbodyIndex++ ) {
|
1655
1666
|
colMax = c.cache[ tbodyIndex ].colMax;
|
1656
1667
|
rows = c.cache[ tbodyIndex ].normalized;
|
@@ -1689,9 +1700,9 @@
|
|
1689
1700
|
if ( typeof textSorter === 'function' ) {
|
1690
1701
|
// custom OVERALL text sorter
|
1691
1702
|
sort = textSorter( x[ col ], y[ col ], dir, col, table );
|
1692
|
-
} else if ( typeof
|
1703
|
+
} else if ( typeof sorter[ col ] === 'function' ) {
|
1693
1704
|
// custom text sorter for a SPECIFIC COLUMN
|
1694
|
-
sort =
|
1705
|
+
sort = sorter[ col ]( x[ col ], y[ col ], dir, col, table );
|
1695
1706
|
} else {
|
1696
1707
|
// fall back to natural sort
|
1697
1708
|
sort = ts[ 'sortNatural' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ], b[ col ], col, c );
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.27.
|
1
|
+
/*! TableSorter (FORK) v2.27.6 *//*
|
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.6',
|
26
26
|
|
27
27
|
parsers : [],
|
28
28
|
widgets : [],
|
@@ -1621,8 +1621,9 @@
|
|
1621
1621
|
|
1622
1622
|
// sort multiple columns
|
1623
1623
|
multisort : function( c ) { /*jshint loopfunc:true */
|
1624
|
-
var tbodyIndex, sortTime, colMax, rows,
|
1624
|
+
var tbodyIndex, sortTime, colMax, rows, tmp,
|
1625
1625
|
table = c.table,
|
1626
|
+
sorter = [],
|
1626
1627
|
dir = 0,
|
1627
1628
|
textSorter = c.textSorter || '',
|
1628
1629
|
sortList = c.sortList,
|
@@ -1633,6 +1634,16 @@
|
|
1633
1634
|
return;
|
1634
1635
|
}
|
1635
1636
|
if ( c.debug ) { sortTime = new Date(); }
|
1637
|
+
// cache textSorter to optimize speed
|
1638
|
+
if ( typeof textSorter === 'object' ) {
|
1639
|
+
colMax = c.columns;
|
1640
|
+
while ( colMax-- ) {
|
1641
|
+
tmp = ts.getColumnData( table, textSorter, colMax );
|
1642
|
+
if ( typeof tmp === 'function' ) {
|
1643
|
+
sorter[ colMax ] = tmp;
|
1644
|
+
}
|
1645
|
+
}
|
1646
|
+
}
|
1636
1647
|
for ( tbodyIndex = 0; tbodyIndex < len; tbodyIndex++ ) {
|
1637
1648
|
colMax = c.cache[ tbodyIndex ].colMax;
|
1638
1649
|
rows = c.cache[ tbodyIndex ].normalized;
|
@@ -1671,9 +1682,9 @@
|
|
1671
1682
|
if ( typeof textSorter === 'function' ) {
|
1672
1683
|
// custom OVERALL text sorter
|
1673
1684
|
sort = textSorter( x[ col ], y[ col ], dir, col, table );
|
1674
|
-
} else if ( typeof
|
1685
|
+
} else if ( typeof sorter[ col ] === 'function' ) {
|
1675
1686
|
// custom text sorter for a SPECIFIC COLUMN
|
1676
|
-
sort =
|
1687
|
+
sort = sorter[ col ]( x[ col ], y[ col ], dir, col, table );
|
1677
1688
|
} else {
|
1678
1689
|
// fall back to natural sort
|
1679
1690
|
sort = ts[ 'sortNatural' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ], b[ col ], col, c );
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated
|
7
|
+
/*! tablesorter (FORK) - updated 09-01-2016 (v2.27.6)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Parser: input & select - updated
|
1
|
+
/*! Parser: input & select - updated 9/1/2016 (v2.27.6) *//*
|
2
2
|
* for jQuery 1.7+ & tablesorter 2.7.11+
|
3
3
|
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
|
4
4
|
*/
|
@@ -135,7 +135,7 @@
|
|
135
135
|
$table.children( 'thead' ).find( 'input[type="checkbox"]' ).each( function() {
|
136
136
|
var column = $( this ).closest( 'td, th' ).attr( 'data-column' ),
|
137
137
|
vis = $rows.filter( '.' + checkboxClass + '-' + column ).length,
|
138
|
-
allChecked = vis === len;
|
138
|
+
allChecked = vis === len && len > 0;
|
139
139
|
if ( vis === 0 || allChecked ) {
|
140
140
|
this.checked = allChecked;
|
141
141
|
this.indeterminate = false;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: grouping - updated
|
1
|
+
/*! Widget: grouping - updated 9/1/2016 (v2.27.6) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -57,6 +57,7 @@
|
|
57
57
|
part === 'day' ? month + ' ' + time.getDate() :
|
58
58
|
part === 'week' ? tsg.findWeek( wo, time.getDay() ) :
|
59
59
|
part === 'time' ? tsg.findTime( wo, time ) :
|
60
|
+
part === 'hour' ? tsg.findTime( wo, time, 'hour' ) :
|
60
61
|
wo.group_dateString( time, c, $column );
|
61
62
|
} else {
|
62
63
|
return wo.group_dateInvalid;
|
@@ -78,7 +79,7 @@
|
|
78
79
|
return wo.group_week[ cldrWeek[ day ] ];
|
79
80
|
}
|
80
81
|
},
|
81
|
-
findTime : function( wo, time ) {
|
82
|
+
findTime : function( wo, time, part ) {
|
82
83
|
var suffix,
|
83
84
|
// CLDR returns { am: "AM", pm: "PM", ... }
|
84
85
|
isObj = wo.group_time.am && wo.group_time.pm,
|
@@ -89,6 +90,9 @@
|
|
89
90
|
hours = ( '00' + p24 ).slice(-2),
|
90
91
|
min = ( '00' + time.getMinutes() ).slice(-2);
|
91
92
|
suffix = wo.group_time[ isObj ? [ 'am', 'pm' ][ period ] : period ];
|
93
|
+
if ( part === 'hour' ) {
|
94
|
+
return hours;
|
95
|
+
}
|
92
96
|
return hours + ':' + min + ( wo.group_time24Hour ? '' : ' ' + ( suffix || '' ) );
|
93
97
|
},
|
94
98
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: mark.js - updated
|
1
|
+
/*! Widget: mark.js - updated 9/1/2016 (v2.27.6) *//*
|
2
2
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -11,9 +11,10 @@
|
|
11
11
|
if ( typeof $.fn.mark === 'function' ) {
|
12
12
|
var tmp,
|
13
13
|
update = c.widgetOptions.mark_tsUpdate;
|
14
|
-
c.$table.on( 'filterEnd.tsmark
|
14
|
+
c.$table.on( 'filterEnd.tsmark pagerComplete.tsmark' +
|
15
|
+
( update ? ' ' + update : '' ), function( e, filters ) {
|
15
16
|
// filterEnd passes "config" as the param
|
16
|
-
ts.mark.update( c, e.type ===
|
17
|
+
ts.mark.update( c, e.type === update ? filters : '' );
|
17
18
|
});
|
18
19
|
// Regex to split up a query
|
19
20
|
tmp = '(?:<|=|>|\\||\"|' + "\\'|" +
|
@@ -33,7 +34,8 @@
|
|
33
34
|
},
|
34
35
|
checkRegex : function( regex ) {
|
35
36
|
if ( regex instanceof RegExp ) {
|
36
|
-
// prevent lock up of mark.js
|
37
|
+
// prevent lock up of mark.js
|
38
|
+
// (see https://github.com/julmot/mark.js/issues/55)
|
37
39
|
var result = '\u0001\u0002\u0003\u0004\u0005'.match( regex );
|
38
40
|
return result === null || result.length < 5;
|
39
41
|
}
|
@@ -49,10 +51,27 @@
|
|
49
51
|
}
|
50
52
|
return results;
|
51
53
|
},
|
54
|
+
// used when "any" match is performed
|
55
|
+
ignoreColumns : function( c ) {
|
56
|
+
var wo = c.widgetOptions,
|
57
|
+
len = c.columns,
|
58
|
+
cols = [];
|
59
|
+
while (len--) {
|
60
|
+
if (wo.mark_tsIgnore[len] ||
|
61
|
+
$( c.$headerIndexed[len] ).hasClass( 'mark-ignore' ) ) {
|
62
|
+
cols[cols.length] = ':nth-child(' + (len + 1) + ')';
|
63
|
+
}
|
64
|
+
}
|
65
|
+
if (cols.length) {
|
66
|
+
return ':not(' + cols.join(',') + ')';
|
67
|
+
}
|
68
|
+
return '';
|
69
|
+
},
|
52
70
|
update : function( c, filters ) {
|
53
71
|
var options = {},
|
54
72
|
wo = c.widgetOptions,
|
55
|
-
setIgnoreCase = typeof wo.filter_ignoreCase === 'undefined' ? true :
|
73
|
+
setIgnoreCase = typeof wo.filter_ignoreCase === 'undefined' ? true :
|
74
|
+
wo.filter_ignoreCase,
|
56
75
|
regex = ts.mark.regex,
|
57
76
|
$rows = c.$table
|
58
77
|
.find( 'tbody tr' )
|
@@ -68,11 +87,16 @@
|
|
68
87
|
}
|
69
88
|
});
|
70
89
|
$.each( filters, function( indx, filter ) {
|
71
|
-
if ( filter
|
90
|
+
if ( filter &&
|
91
|
+
!( $(c.$headerIndexed[indx]).hasClass('mark-ignore') ||
|
92
|
+
wo.mark_tsIgnore[indx]
|
93
|
+
) ) {
|
72
94
|
var testRegex = null,
|
73
95
|
matches = filter,
|
74
96
|
useRegex = false,
|
75
|
-
col = indx === c.columns ?
|
97
|
+
col = indx === c.columns ?
|
98
|
+
ts.mark.ignoreColumns( c ) :
|
99
|
+
':nth-child(' + ( indx + 1 ) + ')';
|
76
100
|
// regular expression entered
|
77
101
|
if ( regex.pure.test( filter ) ) {
|
78
102
|
matches = regex.pure.exec( filter );
|
@@ -122,7 +146,10 @@
|
|
122
146
|
}
|
123
147
|
} else {
|
124
148
|
// pass an array of matches
|
125
|
-
$rows.children( col ).mark(
|
149
|
+
$rows.children( col ).mark(
|
150
|
+
ts.mark.cleanMatches( matches ),
|
151
|
+
options
|
152
|
+
);
|
126
153
|
}
|
127
154
|
}
|
128
155
|
});
|
@@ -132,14 +159,16 @@
|
|
132
159
|
ts.addWidget({
|
133
160
|
id: 'mark',
|
134
161
|
options: {
|
135
|
-
mark_tsUpdate : 'markUpdate'
|
162
|
+
mark_tsUpdate : 'markUpdate',
|
163
|
+
mark_tsIgnore : {}
|
136
164
|
},
|
137
165
|
init : function( table, thisWidget, c, wo ) {
|
138
166
|
ts.mark.init( c, wo );
|
139
167
|
},
|
140
168
|
remove : function( table, c ) {
|
141
169
|
var update = c.widgetOptions.mark_tsUpdate;
|
142
|
-
c.$table.off( 'filterEnd.tsmark
|
170
|
+
c.$table.off( 'filterEnd.tsmark pagerComplete.tsmark' +
|
171
|
+
( update ? ' ' + update : '' ) );
|
143
172
|
}
|
144
173
|
});
|
145
174
|
|
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.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-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|