jquery-tablesorter 1.13.2 → 1.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/jquery-tablesorter/version.rb +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +19 -6
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-cssStickyHeaders.js +53 -21
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.black-ice.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.blue.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.bootstrap.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.bootstrap_2.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.dark.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.default.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.dropbox.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.green.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.grey.css +2 -2
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.ice.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.jui.css +1 -1
- data/vendor/assets/stylesheets/jquery-tablesorter/theme.metro-dark.css +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 118a095f29f08043c86da826b130c99bde031eef
|
4
|
+
data.tar.gz: 2c3c3439dd14689e8aceedddcbb473c33a70c56d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a31cdb42000c4027b9ceb97d7e3337bad59fa67460d2d55a697ba61ed95f0a10185fd605951790f740029112f409ef689bcd1726035b0fb9674fec42e1c1e3
|
7
|
+
data.tar.gz: 6c5475bb17311b6df0f58acd007427899f0829e28fc0f256f867f2d587afdd328ba958f812bca8106bfea82e4b79bcb721aff23b06844c9aec1bfec5ae61cd64
|
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.18.
|
7
|
+
Current tablesorter version: 2.18.3 (11/7/2014), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -26,7 +26,7 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
Rails 3.1 and higher (tested up to 4.1)
|
28
28
|
|
29
|
-
Tested with ruby 1.9.3 - 2.1.
|
29
|
+
Tested with ruby 1.9.3 - 2.1.4
|
30
30
|
|
31
31
|
## Usage
|
32
32
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**!
|
2
|
-
* TableSorter (FORK) 2.18.
|
2
|
+
* TableSorter (FORK) 2.18.3 - Client-side table sorting with ease!
|
3
3
|
* @requires jQuery v1.2.6+
|
4
4
|
*
|
5
5
|
* Copyright (c) 2007 Christian Bach
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
var ts = this;
|
26
26
|
|
27
|
-
ts.version = "2.18.
|
27
|
+
ts.version = "2.18.3";
|
28
28
|
|
29
29
|
ts.parsers = [];
|
30
30
|
ts.widgets = [];
|
@@ -89,8 +89,11 @@
|
|
89
89
|
cssHeaderRow : '',
|
90
90
|
cssProcessing : '', // processing icon applied to header during sort/filter
|
91
91
|
|
92
|
-
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to the its parent
|
92
|
+
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to the its parent
|
93
93
|
cssIcon : 'tablesorter-icon', // if this class exists, a <i> will be added to the header automatically
|
94
|
+
cssIconNone : '', // class name added to the icon when there is no column sort
|
95
|
+
cssIconAsc : '', // class name added to the icon when the column has an ascending sort
|
96
|
+
cssIconDesc : '', // class name added to the icon when the column has a descending sort
|
94
97
|
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
|
95
98
|
cssAllowClicks : 'tablesorter-allowClicks', // class name added to table header which allows clicks to bubble up
|
96
99
|
|
@@ -528,13 +531,17 @@
|
|
528
531
|
len = list.length,
|
529
532
|
none = ts.css.sortNone + ' ' + c.cssNone,
|
530
533
|
css = [ts.css.sortAsc + ' ' + c.cssAsc, ts.css.sortDesc + ' ' + c.cssDesc],
|
534
|
+
cssIcon = [ c.cssIconAsc, c.cssIconDesc, c.cssIconNone ],
|
531
535
|
aria = ['ascending', 'descending'],
|
532
536
|
// find the footer
|
533
537
|
$t = $(table).find('tfoot tr').children().add(c.$extraHeaders).removeClass(css.join(' '));
|
534
538
|
// remove all header information
|
535
539
|
c.$headers
|
536
540
|
.removeClass(css.join(' '))
|
537
|
-
.addClass(none).attr('aria-sort', 'none')
|
541
|
+
.addClass(none).attr('aria-sort', 'none')
|
542
|
+
.find('.' + c.cssIcon)
|
543
|
+
.removeClass(cssIcon.join(' '))
|
544
|
+
.addClass(cssIcon[2]);
|
538
545
|
for (i = 0; i < len; i++) {
|
539
546
|
// direction = 2 means reset!
|
540
547
|
if (list[i][1] !== 2) {
|
@@ -543,7 +550,13 @@
|
|
543
550
|
if (f.length) {
|
544
551
|
for (j = 0; j < f.length; j++) {
|
545
552
|
if (!f[j].sortDisabled) {
|
546
|
-
f.eq(j)
|
553
|
+
f.eq(j)
|
554
|
+
.removeClass(none)
|
555
|
+
.addClass(css[list[i][1]])
|
556
|
+
.attr('aria-sort', aria[list[i][1]])
|
557
|
+
.find('.' + c.cssIcon)
|
558
|
+
.removeClass(cssIcon[2])
|
559
|
+
.addClass(cssIcon[list[i][1]]);
|
547
560
|
}
|
548
561
|
}
|
549
562
|
// add sorted class to footer & extra headers, if they exist
|
@@ -568,7 +581,7 @@
|
|
568
581
|
function fixColumnWidth(table) {
|
569
582
|
var colgroup, overallWidth,
|
570
583
|
c = table.config;
|
571
|
-
if (c.widthFixed && c.$table.
|
584
|
+
if (c.widthFixed && c.$table.children('colgroup').length === 0) {
|
572
585
|
colgroup = $('<colgroup>');
|
573
586
|
overallWidth = $(table).width();
|
574
587
|
// only add col for visible columns - fixes #371
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! tableSorter (FORK) 2.16+ widgets - updated 11/
|
1
|
+
/*! tableSorter (FORK) 2.16+ widgets - updated 11/7/2014 (v2.18.3)
|
2
2
|
*
|
3
3
|
* Column Styles
|
4
4
|
* Column Filters
|
@@ -821,7 +821,7 @@ ts.filter = {
|
|
821
821
|
for (column = 0; column < columns; column++) {
|
822
822
|
if (arry) {
|
823
823
|
buildFilter += '<td' + ( wo.filter_cellFilter[column] ? ' class="' + wo.filter_cellFilter[column] + '"' : '' ) + '></td>';
|
824
|
-
} else {
|
824
|
+
} else {
|
825
825
|
buildFilter += '<td' + ( wo.filter_cellFilter !== '' ? ' class="' + wo.filter_cellFilter + '"' : '' ) + '></td>';
|
826
826
|
}
|
827
827
|
}
|
@@ -1732,7 +1732,7 @@ ts.addWidget({
|
|
1732
1732
|
// onRenderHeader is defined, we need to do something about it (fixes #641)
|
1733
1733
|
if (c.onRenderHeader) {
|
1734
1734
|
$stickyThead.children('tr').children().each(function(index){
|
1735
|
-
// send second parameter
|
1735
|
+
// send second parameter
|
1736
1736
|
c.onRenderHeader.apply( $(this), [ index, c, $stickyTable ] );
|
1737
1737
|
});
|
1738
1738
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! tablesorter CSS Sticky Headers widget - updated 11/
|
1
|
+
/*! tablesorter CSS Sticky Headers widget - updated 11/7/2014 (v2.18.3)
|
2
2
|
* Requires a modern browser, tablesorter v2.8+
|
3
3
|
*/
|
4
4
|
/*jshint jquery:true, unused:false */
|
@@ -18,17 +18,45 @@
|
|
18
18
|
cssStickyHeaders_filteredToTop : true
|
19
19
|
},
|
20
20
|
init : function(table, thisWidget, c, wo) {
|
21
|
-
var
|
22
|
-
isFF = navigator.userAgent.toLowerCase().indexOf('firefox') > -1,
|
21
|
+
var ht, offst, adjustY,
|
23
22
|
$table = c.$table,
|
24
23
|
$attach = $(wo.cssStickyHeaders_attachTo),
|
24
|
+
isIE = 'ActiveXObject' in window, // target all versions of IE
|
25
25
|
namespace = c.namespace + 'cssstickyheader ',
|
26
26
|
$thead = $table.children('thead'),
|
27
27
|
$caption = $table.children('caption'),
|
28
28
|
$win = $attach.length ? $attach : $(window),
|
29
29
|
$parent = $table.parent().closest('table.' + ts.css.table),
|
30
30
|
$parentThead = $parent.length && ts.hasWidget($parent[0], 'cssStickyHeaders') ? $parent.children('thead') : [],
|
31
|
-
|
31
|
+
borderTopWidth = ( parseInt( $table.css('border-top-width'), 10 ) || 0 ),
|
32
|
+
lastCaptionSetting = wo.cssStickyHeaders_addCaption,
|
33
|
+
// table offset top changes while scrolling in FF
|
34
|
+
adjustOffsetTop = false,
|
35
|
+
addCaptionHeight = false,
|
36
|
+
setTransform = function( $elms, y ) {
|
37
|
+
var translate = y === 0 ? '' : 'translate(0px,' + y + 'px)';
|
38
|
+
$elms.css({
|
39
|
+
'transform' : translate,
|
40
|
+
'-ms-transform' : translate,
|
41
|
+
'-webkit-transform' : translate
|
42
|
+
});
|
43
|
+
};
|
44
|
+
|
45
|
+
// Firefox fixes
|
46
|
+
if ($caption.length) {
|
47
|
+
// Firefox does not include the caption height when getting the table height
|
48
|
+
// see https://bugzilla.mozilla.org/show_bug.cgi?id=820891, so lets detect it instead of browser sniff
|
49
|
+
ht = $table.height();
|
50
|
+
$caption.hide();
|
51
|
+
addCaptionHeight = $table.height() === ht;
|
52
|
+
$caption.show();
|
53
|
+
|
54
|
+
// Firefox changes the offset().top when translating the table caption
|
55
|
+
offst = $table.offset().top;
|
56
|
+
setTransform( $caption, 20 );
|
57
|
+
adjustOffsetTop = $table.offset().top !== offst;
|
58
|
+
setTransform( $caption, 0 );
|
59
|
+
}
|
32
60
|
|
33
61
|
$win
|
34
62
|
.unbind('scroll resize '.split(' ').join(namespace))
|
@@ -36,6 +64,13 @@
|
|
36
64
|
// make sure "wo" is current otherwise changes to widgetOptions
|
37
65
|
// are not dynamic (like the add caption button in the demo)
|
38
66
|
wo = c.widgetOptions;
|
67
|
+
|
68
|
+
if ( adjustOffsetTop ) {
|
69
|
+
// remove transform from caption to get the correct offset().top value
|
70
|
+
setTransform( $caption, 0 );
|
71
|
+
adjustY = $table.offset().top;
|
72
|
+
}
|
73
|
+
|
39
74
|
var top = $attach.length ? $attach.offset().top : $win.scrollTop(),
|
40
75
|
// add caption height; include table padding top & border-spacing or text may be above the fold (jQuery UI themes)
|
41
76
|
// border-spacing needed in Firefox, but not webkit... not sure if I should account for that
|
@@ -43,7 +78,9 @@
|
|
43
78
|
( parseInt( $table.css('padding-top'), 10 ) || 0 ) +
|
44
79
|
( parseInt( $table.css('border-spacing'), 10 ) || 0 ),
|
45
80
|
|
46
|
-
bottom = $table.height()
|
81
|
+
bottom = $table.height() + ( addCaptionHeight && wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) -
|
82
|
+
$thead.height() - ( $table.children('tfoot').height() || 0 ) -
|
83
|
+
( wo.cssStickyHeaders_addCaption ? captionHeight : ( addCaptionHeight ? 0 : captionHeight ) ),
|
47
84
|
|
48
85
|
parentTheadHeight = $parentThead.length ? $parentThead.height() : 0,
|
49
86
|
|
@@ -53,13 +90,15 @@
|
|
53
90
|
$parentThead.offset().top + parentTheadHeight - $win.scrollTop()
|
54
91
|
) : 0,
|
55
92
|
|
93
|
+
// in this case FF's offsetTop changes while scrolling, so we get a saved offsetTop before scrolling occurs
|
94
|
+
// but when the table is inside a wrapper ($attach) we need to continually update the offset top
|
95
|
+
tableOffsetTop = adjustOffsetTop ? adjustY : $table.offset().top,
|
96
|
+
|
97
|
+
offsetTop = addCaptionHeight ? tableOffsetTop - ( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) : tableOffsetTop,
|
98
|
+
|
56
99
|
// Detect nested tables - fixes #724
|
57
|
-
deltaY = top -
|
58
|
-
(
|
59
|
-
( wo.cssStickyHeaders_offset || 0 ) +
|
60
|
-
// Again, I dislike browser sniffing... but I have no idea why I need to include a captionHeight
|
61
|
-
// for Firefox here and not for Chrome. Even IE behaves, sorta!
|
62
|
-
( wo.cssStickyHeaders_addCaption ? ( isFF ? captionHeight : 0 ) : -captionHeight ),
|
100
|
+
deltaY = top - offsetTop + nestedStickyBottom + borderTopWidth + ( wo.cssStickyHeaders_offset || 0 ) -
|
101
|
+
( wo.cssStickyHeaders_addCaption ? ( addCaptionHeight ? captionHeight : 0 ) : captionHeight ),
|
63
102
|
|
64
103
|
finalY = deltaY > 0 && deltaY <= bottom ? deltaY : 0,
|
65
104
|
|
@@ -80,19 +119,12 @@
|
|
80
119
|
lastCaptionSetting = wo.cssStickyHeaders_addCaption;
|
81
120
|
// reset caption position if addCaption option is dynamically changed to false
|
82
121
|
if (!lastCaptionSetting) {
|
83
|
-
$caption
|
84
|
-
'transform' : '',
|
85
|
-
'-ms-transform' : '',
|
86
|
-
'-webkit-transform' : ''
|
87
|
-
});
|
122
|
+
setTransform( $caption, 0 );
|
88
123
|
}
|
89
124
|
}
|
90
125
|
|
91
|
-
$cells
|
92
|
-
|
93
|
-
'-ms-transform' : finalY === 0 ? '' : 'translate(0px,' + finalY + 'px)',
|
94
|
-
'-webkit-transform' : finalY === 0 ? '' : 'translate(0px,' + finalY + 'px)'
|
95
|
-
});
|
126
|
+
setTransform( $cells, finalY );
|
127
|
+
|
96
128
|
});
|
97
129
|
$table.unbind('filterEnd' + namespace).bind('filterEnd' + namespace, function() {
|
98
130
|
if (wo.cssStickyHeaders_filteredToTop) {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555), to(#3c3c3c));
|
22
22
|
background-image: -webkit-linear-gradient(top, #555, #3c3c3c);
|
23
23
|
background-image: -o-linear-gradient(top, #555, #3c3c3c);
|
24
|
-
background-image: linear-gradient(to bottom, #555,#3c3c3c);
|
24
|
+
background-image: linear-gradient(to bottom, #555,#3c3c3c);
|
25
25
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#555555', endColorstr='#3c3c3c',GradientType=0 );
|
26
26
|
background-repeat: repeat-x;
|
27
27
|
border-right: #555 1px solid;
|
@@ -205,7 +205,7 @@ caption {
|
|
205
205
|
line-height: 0;
|
206
206
|
cursor: pointer;
|
207
207
|
}
|
208
|
-
.tablesorter-grey .tablesorter-filter-row.hideme
|
208
|
+
.tablesorter-grey .tablesorter-filter-row.hideme * {
|
209
209
|
height: 1px;
|
210
210
|
min-height: 0;
|
211
211
|
border: 0;
|
@@ -152,7 +152,7 @@ Metro Dark Theme
|
|
152
152
|
line-height: 0;
|
153
153
|
cursor: pointer;
|
154
154
|
}
|
155
|
-
.tablesorter-metro-dark .tablesorter-filter-row.hideme
|
155
|
+
.tablesorter-metro-dark .tablesorter-filter-row.hideme * {
|
156
156
|
height: 1px;
|
157
157
|
min-height: 0;
|
158
158
|
border: 0;
|
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.13.
|
4
|
+
version: 1.13.3
|
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: 2014-11-
|
12
|
+
date: 2014-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.4.2
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Simple integration of jquery-tablesorter (Mottie's fork) into the Rails asset
|