jquery-tablesorter 1.12.1 → 1.12.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d57d330a80b51accce3abd18b155fdc9d5bcf78
4
- data.tar.gz: 9606f1dd2b1fab6e6c6701ff8cb665f1b32f1f6a
3
+ metadata.gz: 9a9fef9e55fa0f429cfc6e395a74cb7409b0caae
4
+ data.tar.gz: f0f56588cd17f5cc605031f94f2e2032980781b9
5
5
  SHA512:
6
- metadata.gz: 9c38d8e463b16af2634b959fe1da80530899565e55adc9e9cf0c136534e15ef3a4ec481311d77318d6a0ff12bcb229b4f116e5d3c1cf5d73f396242fdb0ef034
7
- data.tar.gz: 1913baee25edf188ced214be19a75f5a5a36bf3d2667b53c59c34b3a3dca66c61e88e508b0cd5b5ba5cca11d113cfa0161220a32ceb51e7f9788c905c6557cdc
6
+ metadata.gz: 40578fd063f0ecb0b276b5ef7eafbe2ece5f1320b3b137a4ecb5337c5f38f4538cdeb2b6942cc9aff6ec3b947fe48da85e76c8e9ef47f8eef134e2a4ca49a137
7
+ data.tar.gz: c332bbf0a7f920f2889ceac65817b5dcbca4563234cb1e8b3fa559d070a5bde09cf723f0d6e54cd3d0440261a313d26b9c763c5388c65202d1ccd31442d17d7b
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.17.1 (5/28/2014), [documentation]
7
+ Current tablesorter version: 2.17.2 (6/18/2014), [documentation]
8
8
 
9
9
  Any issue associated with the js/css files, please report to [Mottie's fork].
10
10
 
@@ -1,3 +1,3 @@
1
1
  module JqueryTablesorter
2
- VERSION = '1.12.1'
2
+ VERSION = '1.12.2'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * tablesorter pager plugin
3
- * updated 5/28/2014 (v2.17.1)
3
+ * updated 6/18/2014 (v2.17.2)
4
4
  */
5
5
  /*jshint browser:true, jquery:true, unused:false */
6
6
  ;(function($) {
@@ -221,7 +221,7 @@
221
221
  var i,
222
222
  lastIndex = 0,
223
223
  c = table.config,
224
- rows = c.$tbodies.eq(0).children(),
224
+ rows = c.$tbodies.eq(0).children('tr'),
225
225
  l = rows.length,
226
226
  s = ( p.page * p.size ),
227
227
  e = s + p.size,
@@ -289,7 +289,7 @@
289
289
  exception === 'timeout' ? 'Time out error' :
290
290
  exception === 'abort' ? 'Ajax Request aborted' :
291
291
  'Uncaught error: ' + xhr.statusText + ' [' + xhr.status + ']' );
292
- c.$tbodies.eq(0).detach();
292
+ c.$tbodies.eq(0).children().detach();
293
293
  p.totalRows = 0;
294
294
  } else {
295
295
  // process ajax object
@@ -311,7 +311,8 @@
311
311
  if (d instanceof jQuery) {
312
312
  if (p.processAjaxOnInit) {
313
313
  // append jQuery object
314
- c.$tbodies.eq(0).detach().append(d);
314
+ c.$tbodies.eq(0).children().detach();
315
+ c.$tbodies.eq(0).append(d);
315
316
  }
316
317
  } else if (l) {
317
318
  // build table from array
@@ -332,7 +333,7 @@
332
333
  // only add new header text if the length matches
333
334
  if ( th && th.length === hl ) {
334
335
  hsh = $t.hasClass('hasStickyHeaders');
335
- $sh = hsh ? c.widgetOptions.$sticky.children('thead:first').children().children() : '';
336
+ $sh = hsh ? c.widgetOptions.$sticky.children('thead:first').children('tr').children() : '';
336
337
  $f = $t.find('tfoot tr:first').children();
337
338
  // don't change td headers (may contain pager)
338
339
  c.$headers.filter('th').each(function(j){
@@ -655,7 +656,7 @@
655
656
  p = c.pager;
656
657
  if ( !p.ajax ) {
657
658
  c.rowsCopy = rows;
658
- p.totalRows = p.countChildRows ? c.$tbodies.eq(0).children().length : rows.length;
659
+ p.totalRows = p.countChildRows ? c.$tbodies.eq(0).children('tr').length : rows.length;
659
660
  p.size = $.data(table, 'pagerLastSize') || p.size || 10;
660
661
  p.totalPages = Math.ceil( p.totalRows / p.size );
661
662
  renderTable(table, rows, p);
@@ -730,7 +731,7 @@
730
731
  .bind('update updateRows updateAll addRows '.split(' ').join('.pager '), function(e){
731
732
  e.stopPropagation();
732
733
  fixHeight(table, p);
733
- var $rows = c.$tbodies.eq(0).children();
734
+ var $rows = c.$tbodies.eq(0).children('tr');
734
735
  p.totalRows = $rows.length - ( p.countChildRows ? 0 : $rows.filter('.' + c.cssChildRow).length );
735
736
  p.totalPages = Math.ceil( p.totalRows / p.size );
736
737
  updatePageDisplay(table, p);
@@ -1,5 +1,5 @@
1
1
  /**!
2
- * TableSorter 2.17.1 - Client-side table sorting with ease!
2
+ * TableSorter 2.17.2 - 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.17.1";
27
+ ts.version = "2.17.2";
28
28
 
29
29
  ts.parsers = [];
30
30
  ts.widgets = [];
@@ -1205,7 +1205,7 @@
1205
1205
  };
1206
1206
 
1207
1207
  ts.clearTableBody = function(table) {
1208
- $(table)[0].config.$tbodies.detach();
1208
+ $(table)[0].config.$tbodies.children().detach();
1209
1209
  };
1210
1210
 
1211
1211
  ts.bindEvents = function(table, $headers, core){
@@ -1,4 +1,4 @@
1
- /*! Filter widget formatter functions - updated 4/27/2014 (v2.16.2)
1
+ /*! Filter widget formatter functions - updated 6/18/2014 (v2.17.2)
2
2
  * requires: tableSorter 2.15+ and jQuery 1.4.3+
3
3
  *
4
4
  * uiSpinner (jQuery UI spinner)
@@ -574,7 +574,7 @@ tsff = ts.filterFormatter = {
574
574
  } else {
575
575
  num = (tsff.updateCompare($cell, $input, o)[1]).toString() || '';
576
576
  // differeniate 1388556000000 from 1/1/2014 using \d{5} regex
577
- num = num !== '' ? /\d{5}/g.test(num) ? Number(num) : num || '' : '';
577
+ num = num !== '' ? /\d{5}/g.test(num) ? new Date(Number(num)) : num || '' : '';
578
578
  }
579
579
  $cell.add($shcell).find('.date').datepicker( 'setDate', num || null );
580
580
  setTimeout(function(){
@@ -718,6 +718,11 @@ tsff = ts.filterFormatter = {
718
718
  // less than date (from date empty)
719
719
  to = val.replace(/<=/, '') || '';
720
720
  }
721
+
722
+ // differeniate 1388556000000 from 1/1/2014 using \d{5} regex
723
+ from = from !== '' ? /\d{5}/g.test(from) ? new Date(Number(from)) : from || '' : '';
724
+ to = to !== '' ? /\d{5}/g.test(to) ? new Date(Number(to)) : to || '' : '';
725
+
721
726
  $cell.add($shcell).find('.dateFrom').datepicker('setDate', from || null);
722
727
  $cell.add($shcell).find('.dateTo').datepicker('setDate', to || null);
723
728
  // give datepicker time to process
@@ -1,4 +1,4 @@
1
- /*! tableSorter 2.16+ widgets - updated 5/28/2014 (v2.17.1)
1
+ /*! tableSorter 2.16+ widgets - updated 6/18/2014 (v2.17.2)
2
2
  *
3
3
  * Column Styles
4
4
  * Column Filters
@@ -681,13 +681,16 @@ ts.filter = {
681
681
  filters = ts.filter.setDefaults(table, c, wo) || [];
682
682
  if (filters.length) {
683
683
  ts.setFilters(table, filters, true);
684
+ // ts.filter.checkFilters(table, filters);
684
685
  }
685
686
  c.$table.trigger('filterFomatterUpdate');
686
- ts.filter.checkFilters(table, filters);
687
+ if (!wo.filter_initialized) {
688
+ // filter widget initialized
689
+ wo.filter_initialized = true;
690
+ c.$table.trigger('filterInit');
691
+ }
687
692
  });
688
- // filter widget initialized
689
- wo.filter_initialized = true;
690
- c.$table.trigger('filterInit');
693
+
691
694
  },
692
695
  setDefaults: function(table, c, wo) {
693
696
  var isArray, saved, indx,
@@ -820,6 +823,7 @@ ts.filter = {
820
823
  // add filter array back into inputs
821
824
  if (filterArray) {
822
825
  ts.setFilters( table, filters, false, skipFirst !== true );
826
+ if (!wo.filter_initialized) { c.lastCombinedFilter = ''; }
823
827
  }
824
828
  if (wo.filter_hideFilters) {
825
829
  // show/hide filter row as needed
@@ -834,7 +838,7 @@ ts.filter = {
834
838
  c.lastCombinedFilter = null;
835
839
  c.lastSearch = [];
836
840
  }
837
- c.$table.trigger('filterStart', [filters]);
841
+ if (wo.filter_initialized) { c.$table.trigger('filterStart', [filters]); }
838
842
  if (c.showProcessing) {
839
843
  // give it time for the processing icon to kick in
840
844
  setTimeout(function() {
@@ -1074,7 +1078,7 @@ ts.filter = {
1074
1078
  if (c.debug) {
1075
1079
  ts.benchmark("Completed filter widget search", time);
1076
1080
  }
1077
- c.$table.trigger('filterEnd');
1081
+ if (wo.filter_initialized) { c.$table.trigger('filterEnd'); }
1078
1082
  setTimeout(function(){
1079
1083
  c.$table.trigger('applyWidgets'); // make sure zebra widget is applied
1080
1084
  }, 0);
@@ -1116,7 +1120,7 @@ ts.filter = {
1116
1120
  $.each(arry, function(i, v){
1117
1121
  // parse array data using set column parser; this DOES NOT pass the original
1118
1122
  // table cell to the parser format function
1119
- parsed.push({ t : v, p : c.parsers && c.parsers[column].format( v, table, [], column ) || v });
1123
+ parsed.push({ t : v, p : c.parsers && c.parsers[column].format( v, table, [], column ) });
1120
1124
  });
1121
1125
 
1122
1126
  // sort parsed select options
@@ -1,4 +1,4 @@
1
- /* Pager widget (beta) for TableSorter 5/28/2014 (v2.17.1) */
1
+ /* Pager widget (beta) for TableSorter 6/18/2014 (v2.17.2) */
2
2
  /*jshint browser:true, jquery:true, unused:false */
3
3
  ;(function($){
4
4
  "use strict";
@@ -153,7 +153,7 @@ tsp = ts.pager = {
153
153
  p.$goto = p.$container.find(s.goto);
154
154
  // page size selector
155
155
  p.$size = p.$container.find(s.pageSize);
156
- p.totalRows = c.$tbodies.eq(0).children().length;
156
+ p.totalRows = c.$tbodies.eq(0).children('tr').length;
157
157
  p.oldAjaxSuccess = p.oldAjaxSuccess || wo.pager_ajaxObject.success;
158
158
  c.appender = tsp.appender;
159
159
  if (ts.filter && $.inArray('filter', c.widgets) >= 0) {
@@ -247,7 +247,7 @@ tsp = ts.pager = {
247
247
  .on('update updateRows updateAll addRows '.split(' ').join('.pager '), function(e){
248
248
  e.stopPropagation();
249
249
  tsp.fixHeight(table, c);
250
- var $rows = c.$tbodies.eq(0).children();
250
+ var $rows = c.$tbodies.eq(0).children('tr');
251
251
  p.totalRows = $rows.length - ( c.widgetOptions.pager_countChildRows ? 0 : $rows.filter('.' + c.cssChildRow).length );
252
252
  p.totalPages = Math.ceil( p.totalRows / p.size );
253
253
  tsp.updatePageDisplay(table, c);
@@ -428,7 +428,7 @@ tsp = ts.pager = {
428
428
  lastIndex = 0,
429
429
  p = c.pager,
430
430
  wo = c.widgetOptions,
431
- rows = c.$tbodies.eq(0).children(),
431
+ rows = c.$tbodies.eq(0).children('tr'),
432
432
  l = rows.length,
433
433
  s = ( p.page * p.size ),
434
434
  e = s + p.size,
@@ -491,7 +491,7 @@ tsp = ts.pager = {
491
491
  ts.log('Ajax Error', xhr, exception);
492
492
  }
493
493
  ts.showError(table, exception.message + ' (' + xhr.status + ')');
494
- c.$tbodies.eq(0).detach();
494
+ c.$tbodies.eq(0).children().detach();
495
495
  p.totalRows = 0;
496
496
  } else {
497
497
  // process ajax object
@@ -513,7 +513,8 @@ tsp = ts.pager = {
513
513
  if (d instanceof jQuery) {
514
514
  if (wo.pager_processAjaxOnInit) {
515
515
  // append jQuery object
516
- c.$tbodies.eq(0).detach().append(d);
516
+ c.$tbodies.eq(0).children().detach();
517
+ c.$tbodies.eq(0).append(d);
517
518
  }
518
519
  } else if (l) {
519
520
  // build table from array
@@ -534,7 +535,7 @@ tsp = ts.pager = {
534
535
  // only add new header text if the length matches
535
536
  if ( th && th.length === hl ) {
536
537
  hsh = $t.hasClass('hasStickyHeaders');
537
- $sh = hsh ? wo.$sticky.children('thead:first').children().children() : '';
538
+ $sh = hsh ? wo.$sticky.children('thead:first').children('tr').children() : '';
538
539
  $f = $t.find('tfoot tr:first').children();
539
540
  // don't change td headers (may contain pager)
540
541
  c.$headers.filter('th').each(function(j){
@@ -862,7 +863,7 @@ tsp = ts.pager = {
862
863
  p = c.pager;
863
864
  if ( !p.ajax ) {
864
865
  c.rowsCopy = rows;
865
- p.totalRows = c.widgetOptions.pager_countChildRows ? c.$tbodies.eq(0).children().length : rows.length;
866
+ p.totalRows = c.widgetOptions.pager_countChildRows ? c.$tbodies.eq(0).children('tr').length : rows.length;
866
867
  p.size = $.data(table, 'pagerLastSize') || p.size || wo.pager_size || 10;
867
868
  p.totalPages = Math.ceil( p.totalRows / p.size );
868
869
  tsp.moveToPage(table, p, true);
@@ -1,5 +1,5 @@
1
- /* Print widget (beta) for TableSorter 5/22/2014 (v2.17.0)
2
- * Requires tablesorter v2.8+ and jQuery 1.7+
1
+ /* Print widget (beta) for TableSorter 6/18/2014 (v2.17.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 */
@@ -15,8 +15,8 @@ printTable = ts.printTable = {
15
15
 
16
16
  init : function(c) {
17
17
  c.$table
18
- .off(printTable.event)
19
- .on(printTable.event, function(){
18
+ .unbind(printTable.event)
19
+ .bind(printTable.event, function(){
20
20
  // explicitly use table.config.widgetOptions because we want
21
21
  // the most up-to-date values; not the "wo" from initialization
22
22
  printTable.process(c, c.widgetOptions);
@@ -82,8 +82,9 @@ printTable = ts.printTable = {
82
82
  '<style>' + style + '</style>' +
83
83
  '</head><body>' + data + '</body></html>'
84
84
  );
85
- generator.print();
86
85
  generator.document.close();
86
+ generator.print();
87
+ generator.close();
87
88
  return true;
88
89
  },
89
90
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  Resizable scroller widget for the jQuery tablesorter plugin
12
12
 
13
- Version 2.0 - modified by Rob Garrison 4/12/2013; updated 5/22/2014 (v2.17.0)
13
+ Version 2.0 - modified by Rob Garrison 4/12/2013; updated 6/18/2014 (v2.17.2)
14
14
  Requires jQuery v1.7+
15
15
  Requires the tablesorter plugin, v2.8+, available at http://mottie.github.com/tablesorter/docs/
16
16
 
@@ -22,7 +22,7 @@
22
22
  widgets: ['zebra', 'scroller'],
23
23
  widgetOptions : {
24
24
  scroller_height : 300, // height of scroll window
25
- scroller_barWidth : 17, // scroll bar width
25
+ scroller_barWidth : 18, // scroll bar width
26
26
  scroller_jumpToHeader : true, // header snap to browser top when scrolling the tbody
27
27
  scroller_idPrefix : 's_' // cloned thead id prefix (random number added to end)
28
28
  }
@@ -53,8 +53,12 @@ ts.window_resize = function(){
53
53
  // Add extra scroller css
54
54
  $(function(){
55
55
  var s = '<style>' +
56
+ '.tablesorter-scroller-reset { width: auto !important; } ' +
57
+ '.tablesorter-scroller { text-align: left; overflow: hidden; }' +
58
+ '.tablesorter-scroller-header { overflow: hidden; }' +
56
59
  '.tablesorter-scroller-header table.tablesorter { margin-bottom: 0; }' +
57
- '.tablesorter-scroller-table table.tablesorter { margin-top: 0; } ' +
60
+ '.tablesorter-scroller-table { overflow-y: scroll; }' +
61
+ '.tablesorter-scroller-table table.tablesorter { margin-top: 0; overflow: scroll; } ' +
58
62
  '.tablesorter-scroller-table .tablesorter-filter-row, .tablesorter-scroller-table tfoot { display: none; }' +
59
63
  '.tablesorter-scroller-table table.tablesorter thead tr.tablesorter-headerRow * {' +
60
64
  'line-height:0;height:0;border:none;background-image:none;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;' +
@@ -67,21 +71,21 @@ ts.addWidget({
67
71
  priority: 60, // run after the filter widget
68
72
  options: {
69
73
  scroller_height : 300,
70
- scroller_barWidth : 17,
74
+ scroller_barWidth : 18,
71
75
  scroller_jumpToHeader: true,
72
76
  scroller_idPrefix : 's_'
73
77
  },
74
78
  init: function(table, thisWidget, c, wo){
75
79
  var $win = $(window);
76
- //Setup window.resizeEnd event
80
+ // Setup window.resizeEnd event
77
81
  $win
78
82
  .bind('resize', ts.window_resize)
79
83
  .bind('resizeEnd', function() {
80
84
  // init is run before format, so scroller_resizeWidth
81
85
  // won't be defined within the "c" or "wo" parameters
82
86
  if (typeof table.config.widgetOptions.scroller_resizeWidth === 'function') {
83
- //IE calls resize when you modify content, so we have to unbind the resize event
84
- //so we don't end up with an infinite loop. we can rebind after we're done.
87
+ // IE calls resize when you modify content, so we have to unbind the resize event
88
+ // so we don't end up with an infinite loop. we can rebind after we're done.
85
89
  $win.unbind('resize', ts.window_resize);
86
90
  table.config.widgetOptions.scroller_resizeWidth();
87
91
  $win.bind('resize', ts.window_resize);
@@ -97,11 +101,11 @@ ts.addWidget({
97
101
  h = wo.scroller_height || 300;
98
102
  t = $tbl.find('tbody').height();
99
103
  if (t !== 0 && h > t) { h = t + 10; } // Table is less than h px
100
- id = wo.scroller_id = wo.scroller_idPrefix + Math.floor(Math.random() * 101);
104
+ id = wo.scroller_id = wo.scroller_idPrefix + Math.floor(Math.random() * 1001);
101
105
 
102
106
  $hdr = $('<table class="' + $tbl.attr('class') + '" cellpadding=0 cellspacing=0><thead>' + $tbl.find('thead:first').html() + '</thead></table>');
103
107
  $tbl
104
- .wrap('<div id="' + id + '" class="tablesorter-scroller" style="text-align:left;" />')
108
+ .wrap('<div id="' + id + '" class="tablesorter-scroller" />')
105
109
  .before($hdr)
106
110
  .find('.tablesorter-filter-row').addClass('hideme');
107
111
 
@@ -109,7 +113,7 @@ ts.addWidget({
109
113
  .wrap('<div class="tablesorter-scroller-header" style="width:' + $tbl.width() + ';" />')
110
114
  .find('.' + ts.css.header);
111
115
 
112
- $tbl.wrap('<div class="tablesorter-scroller-table" style="height:' + h + 'px;width:' + $tbl.width() + ';overflow-y:scroll;" />');
116
+ $tbl.wrap('<div class="tablesorter-scroller-table" style="height:' + h + 'px;width:' + $tbl.width() + ';" />');
113
117
 
114
118
  // make scroller header sortable
115
119
  ts.bindEvents(table, $cells);
@@ -120,46 +124,57 @@ ts.addWidget({
120
124
  }
121
125
 
122
126
  resize = function(){
123
- var d,
124
- //Hide other scrollers so we can resize
127
+ var d, b, $h, $th, w,
128
+ // Hide other scrollers so we can resize
125
129
  $div = $('div.scroller[id != "' + id + '"]').hide();
126
130
 
127
131
  $tbl.find('thead').show();
128
132
 
129
- //Reset sizes so parent can resize.
130
- $hdr
131
- .width(0)
132
- .parent().width(0)
133
- .find('th,td').width(0);
134
-
133
+ // Reset sizes so parent can resize.
135
134
  $tbl
136
- .width(0)
137
- .find('thead').find('th,td').width(0);
135
+ .addClass('tablesorter-scroller-reset')
136
+ .find('thead').find('.tablesorter-header-inner').addClass('tablesorter-scroller-reset');
138
137
  d = $tbl.parent();
139
- d.width(0);
138
+ d.addClass('tablesorter-scroller-reset');
140
139
 
141
140
  d.parent().trigger('resize');
141
+
142
142
  // Shrink a bit to accommodate scrollbar
143
143
  d.width( d.parent().innerWidth() - ( d.parent().hasScrollBar() ? wo.scroller_barWidth : 0 ) );
144
-
145
- $tbl.width( d.innerWidth() - ( d.hasScrollBar() ? wo.scroller_barWidth : 0 ) );
146
- $tbl.find('thead').find('th,td').filter(':visible').each(function(i, c){
147
- var $th = $(c),
148
- //Wrap in browser detect??
149
- w = parseInt( $th.css('min-width').replace('auto', '0').replace(/(px|em)/, ''), 10 );
150
- if ( $th.width() < w ) {
151
- $th.width(w);
152
- } else {
153
- w = $th.width();
144
+ w = d.innerWidth() - ( d.hasScrollBar() ? wo.scroller_barWidth : 0 );
145
+ $tbl.width( w );
146
+ $hdr.width( w );
147
+ $hdr.parent().width( w );
148
+
149
+ $tbl.closest('.tablesorter-scroller').find('.tablesorter-scroller-reset').removeClass('tablesorter-scroller-reset');
150
+
151
+ // include left & right border widths
152
+ b = parseInt( $tbl.css('border-left-width'), 10 ) + parseInt( $tbl.css('border-right-width'), 10 );
153
+ $h = $hdr.find('thead').children().children();
154
+
155
+ // adjust cloned header to match original table width - includes wrappers, headers, and header inner div
156
+ $tbl.find('thead').children().children().each(function(i, c){
157
+ $th = $(c).find('.tablesorter-header-inner');
158
+ if ($th.length) {
159
+ // I have no idea why this is in here anymore LOL
160
+ w = parseInt( $th.css('min-width').replace('auto', '0').replace(/(px|em)/, ''), 10 );
161
+ if ( $th.width() < w ) {
162
+ $th.width(w);
163
+ } else {
164
+ w = $th.width();
165
+ }
166
+ $h.eq(i)
167
+ .find('.tablesorter-header-inner').width(w - b)
168
+ // set inner width first
169
+ .parent()
170
+ .width( $th.parent().width() - b );
154
171
  }
155
- $hdr.find('th,td').eq(i).width(w);
156
172
  });
157
173
 
158
- $hdr.width($tbl.innerWidth());
159
174
  $div.show();
160
175
  };
161
176
 
162
- //Expose to external calls
177
+ // Expose to external calls
163
178
  wo.scroller_resizeWidth = resize;
164
179
 
165
180
  resize();
@@ -168,6 +183,7 @@ ts.addWidget({
168
183
  c.isScrolling = true;
169
184
 
170
185
  t = $tbl.parent().parent().height();
186
+
171
187
  // The header will always jump into view if scrolling the table body
172
188
  $tbl.parent().bind('scroll', function(){
173
189
  if (wo.scroller_jumpToHeader) {
@@ -176,11 +192,12 @@ ts.addWidget({
176
192
  $win.scrollTop( $hdr.offset().top );
177
193
  }
178
194
  }
195
+ $hdr.parent().scrollLeft( $(this).scrollLeft() );
179
196
  });
180
197
 
181
198
  }
182
199
 
183
- //Sorting, so scroll to top
200
+ // Sorting, so scroll to top
184
201
  $tbl.parent().animate({ scrollTop: 0 }, 'fast');
185
202
 
186
203
  },
@@ -43,11 +43,10 @@
43
43
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAMAAADOvxanAAAAVFBMVEUAAABCQkJZWVkZGRnJyckgICAZGRkZGRn8/PweHh4dHR0aGhoaGhpUVFQbGxvQ0NDc3NxMTExSUlIbGxvr6+s4ODhKSkogICAtLS00NDQzMzMnJydSEPrQAAAAGHRSTlMA1ssZRLgdAQbDyisqsZo8QdXUq0r9xPepSRwiAAAAX0lEQVQI13XHSQKAIAwEwQAKxn13Ev7/T2Pu9qmarJKPXIicI4PH4hxaKNrhm2S8bJK5h4YzKHrzJNtK6yYT/TdXzpS5zuYg4MSQYF6i4IHExdw1UVRi05HPrrvT53a+qyMFC9t04gcAAAAASUVORK5CYII=);
44
44
  }
45
45
 
46
- /* white unsorted icon
47
- .tablesorter-bootstrap .bootstrap-icon-unsorted {
46
+ /* white unsorted icon */
47
+ .tablesorter-bootstrap .icon-white.bootstrap-icon-unsorted {
48
48
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOBAMAAAALT/umAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMA4EXKBtQqvR0+sxmalc142gAAAFdJREFUCNdjYGDoamAAAjZbMxCVfvd6AgMDd+3du9UMDKx3hWSvMjBwXZww8RYDGuC53NB8h4GB8a617UUGBs7Yu3cjGRhYVO9eVQFKOskKOQApFmUgBwBZ+xXRTttNdAAAAABJRU5ErkJggg==);
49
49
  }
50
- */
51
50
 
52
51
  /* since bootstrap (table-striped) uses nth-child(), we just use this to add a zebra stripe color */
53
52
  .tablesorter-bootstrap > tbody > tr.odd > td,
@@ -80,7 +79,6 @@
80
79
  /* filter widget */
81
80
  .tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter {
82
81
  width: 98%;
83
- height: auto;
84
82
  margin: 0 auto;
85
83
  padding: 4px 6px;
86
84
  color: #333;
@@ -48,10 +48,17 @@
48
48
  line-height: 14px;
49
49
  display: inline-block;
50
50
  }
51
+
52
+ /* black unsorted icon */
51
53
  .tablesorter-bootstrap .bootstrap-icon-unsorted {
52
54
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAYAAAD5YeaVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWVJREFUeNqUUL9Lw2AUTGP8mqGlpBQkNeCSRcckEBcHq1jImMElToKuDvpHFMGhU0BQcHBwLji6CE1B4uB/INQsDi4d2jQ/fPeZxo764OV6915f7lLJ81xot9tCURXqdVEUr7IsO6ffH9Q5BlEUCaLwWxWqTcbYnaIoh0Dw4gAvcWlxq1qt9hqNxg6hUGAP+uIPUrGs0qXLer2+v/pTX6QpxLtkc2U2m53ACb8sSdIDXerSEms2m6+DweAICA4d89KGbduf9MpEVdXQ9/2LVqv1CASHjjn3iq/x1xKFfxQPqGnada1W86bT6SiO42OS3qk3KPStLMvbk8nkfjwen/LLuq6blFymMB0KdUPSGhAcOualjX6/f0bCiC7NaWGPQr0BwaFjzn0gYJqmLAiCA8/zni3LmhuGkQPBoWPOPwQeaPIqD4fDruu6L6Zp5kBw6IudchmdJAkLw3DXcZwnIPjy/FuAAQCiqqWWCAFKcwAAAABJRU5ErkJggg==);
53
55
  }
54
56
 
57
+ /* white unsorted icon */
58
+ .tablesorter-bootstrap .icon-white.bootstrap-icon-unsorted {
59
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOBAMAAAALT/umAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMA4EXKBtQqvR0+sxmalc142gAAAFdJREFUCNdjYGDoamAAAjZbMxCVfvd6AgMDd+3du9UMDKx3hWSvMjBwXZww8RYDGuC53NB8h4GB8a617UUGBs7Yu3cjGRhYVO9eVQFKOskKOQApFmUgBwBZ+xXRTttNdAAAAABJRU5ErkJggg==);
60
+ }
61
+
55
62
  /* since bootstrap (table-striped) uses nth-child(), we just use this to add a zebra stripe color */
56
63
  .tablesorter-bootstrap tr.odd td {
57
64
  background-color: #f9f9f9;
@@ -79,7 +86,6 @@ caption {
79
86
  /* filter widget */
80
87
  .tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter {
81
88
  width: 98%;
82
- height: auto;
83
89
  margin: 0 auto;
84
90
  padding: 4px 6px;
85
91
  background-color: #fff;
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.12.1
4
+ version: 1.12.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-05-29 00:00:00.000000000 Z
12
+ date: 2014-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties