jquery-tablesorter 1.13.1 → 1.13.2
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 -1
- data/lib/jquery-tablesorter/version.rb +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js +6 -6
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets-filter-formatter-select2.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets-filter-formatter.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +27 -17
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +9 -6
- 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: 4ca1be22fc4f48f78994645c994a19b4a81532eb
|
4
|
+
data.tar.gz: 4b116d3b7cca561fc5ba97c329be6312588836ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53ed8c07aad40c2a6499f8fc6bd4469d23f80301f0e45e8f884b281036ca3afadc578cf6876107767b85c2bf684d27353b4d0eb3099d14df23555b64745e660c
|
7
|
+
data.tar.gz: 8dd105b6bd4e7d4a996872088b4b3d8549642fa2d570254dcb5d23a28ce39c2d55de46be65d97b497b86c09a61c2a88b3cea71119a0f1da14ee45afb7104e011
|
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.2 (11/3/2014), [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -75,6 +75,7 @@ Avaliable theme names:
|
|
75
75
|
* theme.grey
|
76
76
|
* theme.ice
|
77
77
|
* theme.jui
|
78
|
+
* theme.metro-dark
|
78
79
|
|
79
80
|
pager theme:
|
80
81
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* tablesorter pager plugin
|
3
|
-
* updated 11/3/2014 (v2.18.
|
2
|
+
* tablesorter (FORK) pager plugin
|
3
|
+
* updated 11/3/2014 (v2.18.2)
|
4
4
|
*/
|
5
5
|
/*jshint browser:true, jquery:true, unused:false */
|
6
6
|
;(function($) {
|
@@ -161,7 +161,7 @@
|
|
161
161
|
c.filteredRows = p.filteredRows;
|
162
162
|
p.filteredPages = Math.ceil( p.filteredRows / sz ) || 0;
|
163
163
|
if ( Math.min( p.totalPages, p.filteredPages ) >= 0 ) {
|
164
|
-
t = (p.size * p.page > p.filteredRows);
|
164
|
+
t = (p.size * p.page > p.filteredRows) && completed;
|
165
165
|
p.startRow = (t) ? 1 : (p.filteredRows === 0 ? 0 : p.size * p.page + 1);
|
166
166
|
p.page = (t) ? 0 : p.page;
|
167
167
|
p.endRow = Math.min( p.filteredRows, p.totalRows, p.size * ( p.page + 1 ) );
|
@@ -831,10 +831,10 @@
|
|
831
831
|
|
832
832
|
$t
|
833
833
|
.unbind('filterInit filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize pageSet '.split(' ').join('.pager '))
|
834
|
-
.bind('filterInit.pager filterStart.pager', function() {
|
834
|
+
.bind('filterInit.pager filterStart.pager', function(e) {
|
835
835
|
p.currentFilters = c.$table.data('lastSearch');
|
836
836
|
// don't change page if filters are the same (pager updating, etc)
|
837
|
-
if (p.pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
837
|
+
if (e.type === 'filterStart' && p.pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
838
838
|
p.page = p.pageReset; // fixes #456 & #565
|
839
839
|
}
|
840
840
|
})
|
@@ -969,7 +969,7 @@
|
|
969
969
|
moveToPage(table, p);
|
970
970
|
$(table).trigger('pagerInitialized', p);
|
971
971
|
if ( !( c.widgetOptions.filter_initialized && ts.hasWidget(table, 'filter') ) ) {
|
972
|
-
updatePageDisplay(table,
|
972
|
+
updatePageDisplay(table, p, false);
|
973
973
|
}
|
974
974
|
}
|
975
975
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**!
|
2
|
-
* TableSorter 2.18.
|
2
|
+
* TableSorter (FORK) 2.18.2 - Client-side table sorting with ease!
|
3
3
|
* @requires jQuery v1.2.6+
|
4
4
|
*
|
5
5
|
* Copyright (c) 2007 Christian Bach
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* http://www.gnu.org/licenses/gpl.html
|
10
10
|
*
|
11
11
|
* @type jQuery
|
12
|
-
* @name tablesorter
|
12
|
+
* @name tablesorter (FORK)
|
13
13
|
* @cat Plugins/Tablesorter
|
14
14
|
* @author Christian Bach/christian.bach@polyester.se
|
15
15
|
* @contributor Rob Garrison/https://github.com/Mottie/tablesorter
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
var ts = this;
|
26
26
|
|
27
|
-
ts.version = "2.18.
|
27
|
+
ts.version = "2.18.2";
|
28
28
|
|
29
29
|
ts.parsers = [];
|
30
30
|
ts.widgets = [];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! Filter widget select2 formatter function - updated 7/17/2014 (v2.17.5)
|
2
|
-
* requires: jQuery 1.7.2+, tableSorter 2.16+, filter widget 2.16+ and select2 v3.4.6+ plugin
|
2
|
+
* requires: jQuery 1.7.2+, tableSorter (FORK) 2.16+, filter widget 2.16+ and select2 v3.4.6+ plugin
|
3
3
|
*/
|
4
4
|
/*jshint browser:true, jquery:true, unused:false */
|
5
5
|
/*global jQuery: false */
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! tableSorter 2.16+ widgets - updated 11/3/2014 (v2.18.
|
1
|
+
/*! tableSorter (FORK) 2.16+ widgets - updated 11/3/2014 (v2.18.2)
|
2
2
|
*
|
3
3
|
* Column Styles
|
4
4
|
* Column Filters
|
@@ -657,7 +657,7 @@ ts.filter = {
|
|
657
657
|
$(document)
|
658
658
|
.undelegate(wo.filter_reset, 'click.tsfilter')
|
659
659
|
.delegate(wo.filter_reset, 'click.tsfilter', function() {
|
660
|
-
// trigger a reset event, so other functions (
|
660
|
+
// trigger a reset event, so other functions (filter_formatter) know when to reset
|
661
661
|
c.$table.trigger('filterReset');
|
662
662
|
});
|
663
663
|
}
|
@@ -764,23 +764,27 @@ ts.filter = {
|
|
764
764
|
completed = function(){
|
765
765
|
wo.filter_initialized = true;
|
766
766
|
c.$table.trigger('filterInit', c);
|
767
|
-
ts.filter.findRows(c.table, c.$table.data('lastSearch')
|
767
|
+
ts.filter.findRows(c.table, c.$table.data('lastSearch') || []);
|
768
768
|
};
|
769
|
-
$.
|
770
|
-
if (val === 1) {
|
771
|
-
count++;
|
772
|
-
}
|
773
|
-
});
|
774
|
-
clearTimeout(wo.filter_initTimer);
|
775
|
-
if (!wo.filter_initialized && count === wo.filter_formatterCount) {
|
776
|
-
// filter widget initialized
|
769
|
+
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
777
770
|
completed();
|
778
|
-
} else
|
779
|
-
|
780
|
-
|
781
|
-
|
771
|
+
} else {
|
772
|
+
$.each( wo.filter_formatterInit, function(i, val) {
|
773
|
+
if (val === 1) {
|
774
|
+
count++;
|
775
|
+
}
|
776
|
+
});
|
777
|
+
clearTimeout(wo.filter_initTimer);
|
778
|
+
if (!wo.filter_initialized && count === wo.filter_formatterCount) {
|
779
|
+
// filter widget initialized
|
782
780
|
completed();
|
783
|
-
}
|
781
|
+
} else if (!wo.filter_initialized) {
|
782
|
+
// fall back in case a filter_formatter doesn't call
|
783
|
+
// $.tablesorter.filter.formatterUpdated($cell, column), and the count is off
|
784
|
+
wo.filter_initTimer = setTimeout(function(){
|
785
|
+
completed();
|
786
|
+
}, 500);
|
787
|
+
}
|
784
788
|
}
|
785
789
|
},
|
786
790
|
|
@@ -1114,10 +1118,16 @@ ts.filter = {
|
|
1114
1118
|
$(this).hasClass('filter-parsed');
|
1115
1119
|
}).get();
|
1116
1120
|
|
1117
|
-
if (c.debug) {
|
1121
|
+
if (c.debug) {
|
1122
|
+
ts.log('Starting filter widget search', filters);
|
1123
|
+
time = new Date();
|
1124
|
+
}
|
1118
1125
|
// filtered rows count
|
1119
1126
|
c.filteredRows = 0;
|
1120
1127
|
c.totalRows = 0;
|
1128
|
+
// combindedFilters are undefined on init
|
1129
|
+
combinedFilters = (filters || []).join('');
|
1130
|
+
|
1121
1131
|
for (tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
1122
1132
|
if ($tbodies.eq(tbodyIndex).hasClass(c.cssInfoBlock || ts.css.info)) { continue; } // ignore info blocks, issue #264
|
1123
1133
|
$tbody = ts.processTbody(table, $tbodies.eq(tbodyIndex), true);
|
@@ -192,7 +192,6 @@ tsp = ts.pager = {
|
|
192
192
|
p.ajax = false;
|
193
193
|
// Regular pager; all rows stored in memory
|
194
194
|
c.$table.trigger("appendCache", [{}, true]);
|
195
|
-
tsp.hideRowsSetup(table, c);
|
196
195
|
}
|
197
196
|
|
198
197
|
},
|
@@ -202,6 +201,10 @@ tsp = ts.pager = {
|
|
202
201
|
tsp.bindEvents(table, c);
|
203
202
|
tsp.setPageSize(table, 0, c); // page size 0 is ignored
|
204
203
|
|
204
|
+
if (!p.ajax) {
|
205
|
+
tsp.hideRowsSetup(table, c);
|
206
|
+
}
|
207
|
+
|
205
208
|
// pager initialized
|
206
209
|
p.initialized = true;
|
207
210
|
p.initializing = false;
|
@@ -209,7 +212,8 @@ tsp = ts.pager = {
|
|
209
212
|
c.$table.trigger('pagerInitialized', c);
|
210
213
|
// filter widget not initialized; it will update the output display & fire off the pagerComplete event
|
211
214
|
if ( !( c.widgetOptions.filter_initialized && ts.hasWidget(table, 'filter') ) ) {
|
212
|
-
|
215
|
+
// if ajax, then don't fire off pagerComplete
|
216
|
+
tsp.updatePageDisplay(table, c, !p.ajax);
|
213
217
|
}
|
214
218
|
},
|
215
219
|
|
@@ -221,10 +225,10 @@ tsp = ts.pager = {
|
|
221
225
|
|
222
226
|
c.$table
|
223
227
|
.off('filterInit filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize pageSet '.split(' ').join('.pager '))
|
224
|
-
.on('filterInit.pager filterStart.pager', function() {
|
228
|
+
.on('filterInit.pager filterStart.pager', function(e) {
|
225
229
|
p.currentFilters = c.$table.data('lastSearch');
|
226
230
|
// don't change page if filters are the same (pager updating, etc)
|
227
|
-
if (wo.pager_pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
231
|
+
if (e.type === 'filterStart' && wo.pager_pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
228
232
|
p.page = wo.pager_pageReset; // fixes #456 & #565
|
229
233
|
}
|
230
234
|
})
|
@@ -384,7 +388,7 @@ tsp = ts.pager = {
|
|
384
388
|
c.filteredRows = p.filteredRows;
|
385
389
|
p.filteredPages = Math.ceil( p.filteredRows / sz ) || 0;
|
386
390
|
if ( Math.min( p.totalPages, p.filteredPages ) >= 0 ) {
|
387
|
-
t = (p.size * p.page > p.filteredRows);
|
391
|
+
t = (p.size * p.page > p.filteredRows) && completed;
|
388
392
|
p.startRow = (t) ? 1 : (p.filteredRows === 0 ? 0 : p.size * p.page + 1);
|
389
393
|
p.page = (t) ? 0 : p.page;
|
390
394
|
p.endRow = Math.min( p.filteredRows, p.totalRows, p.size * ( p.page + 1 ) );
|
@@ -820,7 +824,6 @@ tsp = ts.pager = {
|
|
820
824
|
}
|
821
825
|
ts.processTbody(table, $tb, false);
|
822
826
|
}
|
823
|
-
|
824
827
|
tsp.updatePageDisplay(table, c);
|
825
828
|
|
826
829
|
wo.pager_startPage = p.page;
|
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.2
|
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-04 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.2.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
|