jquery-tablesorter-rails4 0.0.1

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.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/javascripts/jquery_tablesorter/jquery.metadata.js +116 -0
  8. data/app/assets/javascripts/jquery_tablesorter/jquery.tablesorter.js +1477 -0
  9. data/app/assets/javascripts/jquery_tablesorter/jquery.tablesorter.widgets-filter-formatter.js +924 -0
  10. data/app/assets/javascripts/jquery_tablesorter/jquery.tablesorter.widgets.js +1210 -0
  11. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-date-iso8601.js +34 -0
  12. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-date-month.js +32 -0
  13. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-date-two-digit-year.js +68 -0
  14. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-date-weekday.js +32 -0
  15. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-date.js +36 -0
  16. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-feet-inch-fraction.js +63 -0
  17. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-ignore-articles.js +47 -0
  18. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-input-select.js +78 -0
  19. data/app/assets/javascripts/jquery_tablesorter/parsers/parser-metric.js +77 -0
  20. data/app/assets/javascripts/jquery_tablesorter/widgets/widget-editable.js +68 -0
  21. data/app/assets/javascripts/jquery_tablesorter/widgets/widget-grouping.js +114 -0
  22. data/app/assets/javascripts/jquery_tablesorter/widgets/widget-repeatheaders.js +50 -0
  23. data/app/assets/javascripts/jquery_tablesorter/widgets/widget-scroller.js +240 -0
  24. data/app/assets/stylesheets/jquery_tablesorter/filter.formatter.css +183 -0
  25. data/app/assets/stylesheets/jquery_tablesorter/theme.black-ice.css +180 -0
  26. data/app/assets/stylesheets/jquery_tablesorter/theme.blue.css +215 -0
  27. data/app/assets/stylesheets/jquery_tablesorter/theme.bootstrap.css +139 -0
  28. data/app/assets/stylesheets/jquery_tablesorter/theme.dark.css +181 -0
  29. data/app/assets/stylesheets/jquery_tablesorter/theme.default.css +183 -0
  30. data/app/assets/stylesheets/jquery_tablesorter/theme.dropbox.css +201 -0
  31. data/app/assets/stylesheets/jquery_tablesorter/theme.green.css +198 -0
  32. data/app/assets/stylesheets/jquery_tablesorter/theme.grey.css +234 -0
  33. data/app/assets/stylesheets/jquery_tablesorter/theme.ice.css +189 -0
  34. data/app/assets/stylesheets/jquery_tablesorter/theme.jui.css +145 -0
  35. data/jquery-tablesorter-rails4.gemspec +25 -0
  36. data/lib/jquery-tablesorter-rails4.rb +1 -0
  37. data/lib/jquery/tablesorter/rails4.rb +10 -0
  38. data/lib/jquery/tablesorter/rails4/engine.rb +8 -0
  39. data/lib/jquery/tablesorter/rails4/version.rb +7 -0
  40. metadata +124 -0
@@ -0,0 +1,68 @@
1
+ /*! tablesorter Editable Content widget - updated 4/12/2013
2
+ * Requires tablesorter v2.8+ and jQuery 1.7+
3
+ * by Rob Garrison
4
+ */
5
+ /*jshint browser:true, jquery:true, unused:false */
6
+ /*global jQuery: false */
7
+ ;(function($){
8
+ "use strict";
9
+
10
+ $.tablesorter.addWidget({
11
+ id: 'editable',
12
+ options : {
13
+ editable_columns : [],
14
+ editable_enterToAccept : true,
15
+ editable_autoResort : false,
16
+ editable_noEdit : 'no-edit'
17
+ },
18
+ init: function(table, thisWidget, c, wo){
19
+ if (!wo.editable_columns.length) { return; }
20
+ var cols = [];
21
+ $.each(wo.editable_columns, function(i, col){
22
+ cols.push('td:nth-child(' + (col + 1) + ')');
23
+ });
24
+ c.$tbodies.find( cols.join(',') ).not('.' + wo.editable_noEdit).prop('contenteditable', true);
25
+ c.$tbodies
26
+ .on('mouseleave.tseditable', function(){
27
+ if (c.$table.data('contentFocused')) {
28
+ $(':focus').trigger('blur');
29
+ }
30
+ })
31
+ .on('focus.tseditable', '[contenteditable]', function(){
32
+ c.$table.data('contentFocused', true);
33
+ var $this = $(this), v = $this.html();
34
+ if (wo.editable_enterToAccept) {
35
+ // prevent enter from adding into the content
36
+ $this.on('keydown.tseditable', function(e){
37
+ if (e.which === 13) {
38
+ e.preventDefault();
39
+ }
40
+ });
41
+ }
42
+ $this.data({ before : v, original: v });
43
+ })
44
+ .on('blur focusout keyup '.split(' ').join('.tseditable '), '[contenteditable]', function(e){
45
+ if (!c.$table.data('contentFocused')) { return; }
46
+ var $this = $(e.target), t;
47
+ if (e.which === 27) {
48
+ // user cancelled
49
+ $this.html( $this.data('original') ).trigger('blur.tseditable');
50
+ c.$table.data('contentFocused', false);
51
+ return false;
52
+ }
53
+ t = e.type !== 'keyup' || (wo.editable_enterToAccept && e.which === 13);
54
+ // change if new or user hits enter (if option set)
55
+ if ($this.data('before') !== $this.html() || t) {
56
+ $this.data('before', $this.html()).trigger('change');
57
+ if (t) {
58
+ c.$table
59
+ .data('contentFocused', false)
60
+ .trigger('updateCell', [ $this, wo.editable_autoResort ]);
61
+ $this.trigger('blur.tseditable');
62
+ }
63
+ }
64
+ });
65
+ }
66
+ });
67
+
68
+ })(jQuery);
@@ -0,0 +1,114 @@
1
+ /*! tablesorter Grouping widget - updated 4/12/2013
2
+ * Requires tablesorter v2.8+ and jQuery 1.7+
3
+ * by Rob Garrison
4
+ */
5
+ /*jshint browser:true, jquery:true, unused:false */
6
+ /*global jQuery: false */
7
+ ;(function($){
8
+ "use strict";
9
+
10
+ $.tablesorter.addWidget({
11
+ id: 'group',
12
+ options: {
13
+ group_collapsible : true, // make the group header clickable and collapse the rows below it.
14
+ group_count : ' ({num})', // if not false, the "{num}" string is replaced with the number of rows in the group
15
+ // change these default date names based on your language preferences
16
+ group_months : [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
17
+ group_week : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
18
+ group_time : [ 'AM', 'PM' ],
19
+ group_formatter : null // function(curr, col, table, c, wo) { return curr; }
20
+ },
21
+ init: function(table, thisWidget, c, wo){
22
+ if (wo.group_collapsible) {
23
+ // .on() requires jQuery 1.7+
24
+ c.$table.on('click', 'tr.group-header', function(){
25
+ $(this).toggleClass('collapsed');
26
+ // nextUntil requires jQuery 1.4+
27
+ $(this).nextUntil('tr.group-header').toggleClass('group-hidden', $(this).hasClass('collapsed') );
28
+ });
29
+ }
30
+ },
31
+ format: function(table, c, wo) {
32
+ var j, k, curr, $tr, t, t2, time,
33
+ group = '',
34
+ col = c.sortList[0] ? c.sortList[0][0] : -1,
35
+ groupBy = {
36
+ number : function($col, txt, num){
37
+ if (num > 1 && txt !== '') {
38
+ if ($col.hasClass(c.cssAsc)) {
39
+ t = Math.floor(parseFloat(txt)/num) * num;
40
+ return t > parseFloat(group || 0) ? t : parseFloat(group || 0);
41
+ } else {
42
+ t = Math.ceil(parseFloat(txt)/num) * num;
43
+ return t < parseFloat(group || num) - t ? parseFloat(group || num) - t : t;
44
+ }
45
+ } else {
46
+ var w = (txt + '').match(/\d+/g);
47
+ return w && w.length >= num ? w[num - 1] : txt || '';
48
+ }
49
+ },
50
+ word : function($col, txt, num){
51
+ var w = (txt + ' ').match(/\w+/g);
52
+ return w && w.length >= num ? w[num - 1] : txt || '';
53
+ },
54
+ letter : function($col, txt, num){
55
+ return txt ? (txt + ' ').substring(0, num) : '';
56
+ },
57
+ date : function($col, txt, part){
58
+ t = new Date(txt || '');
59
+ t2 = t.getHours();
60
+ return part === 'year' ? t.getFullYear() :
61
+ part === 'month' ? wo.group_months[t.getMonth()] :
62
+ part === 'day' ? wo.group_months[t.getMonth()] + ' ' + t.getDate() :
63
+ part === 'week' ? wo.group_week[t.getDay()] :
64
+ part === 'time' ? ('00' + (t2 > 12 ? t2 - 12 : t2 === 0 ? t2 + 12 : t2)).slice(-2) + ':' + ('00' + t.getMinutes()).slice(-2) + ' ' +
65
+ ('00' + wo.group_time[t2 >= 12 ? 1 : 0]).slice(-2) :
66
+ t.toString();
67
+ }
68
+ };
69
+
70
+ c.$table
71
+ .find('tr.group-hidden').removeClass('group-hidden').end()
72
+ .find('tr.group-header').remove();
73
+ if (col >= 0) {
74
+ if (c.debug){ time = new Date(); }
75
+ for (k = 0; k < c.$tbodies.length; k++) {
76
+ $tr = c.$tbodies.children('tr');
77
+ for (j = 0; j < $tr.length; j++) {
78
+ t = (c.$headers.eq(col).attr('class') || '').match(/(group-\w+(-\w+)?)/g);
79
+ // group-{type}-{number/date}
80
+ t2 = t ? t[0].split('-') : ['','letter',1]; // default to letter 1
81
+ curr = groupBy[t2[1]]( c.$headers.eq(col), c.cache[k].normalized[j][col], /date/.test(t) ? t2[2] : parseInt(t2[2] || 1, 10) || 1 );
82
+ if (group !== curr) {
83
+ group = curr;
84
+ // show range if number > 1
85
+ if (t2[1] === 'number' && t2[2] > 1 && curr !== '') {
86
+ curr += ' - ' + (parseInt(curr, 10) + ((parseInt(t2[2],10) - 1) * (c.$headers.eq(col).hasClass(c.cssAsc) ? 1 : -1)));
87
+ }
88
+ if ($.isFunction(wo.group_formatter)) {
89
+ curr = wo.group_formatter((curr || '').toString(), col, table, c, wo) || curr;
90
+ }
91
+ $tr.eq(j).before('<tr class="group-header ' + c.selectorRemove.slice(1) + '"><td colspan="' + (c.columns+1) + '">' +
92
+ (wo.group_collapsible ? '<i/>' : '') + '<span class="group-name">' + curr + '</span><span class="group-count"></span></td></tr>');
93
+ }
94
+ }
95
+ }
96
+ if (wo.group_count) {
97
+ c.$table.find('tr.group-header').each(function(){
98
+ $(this).find('.group-count').html( wo.group_count.replace(/\{num\}/g, $(this).nextUntil('tr.group-header').length) );
99
+ });
100
+ }
101
+ if (c.debug) {
102
+ $.tablesorter.benchmark("Applying groups widget: ", time);
103
+ }
104
+ }
105
+ },
106
+ remove : function(table, c, wo){
107
+ c.$table
108
+ .off('click', 'tr.group-header')
109
+ .find('.group-hidden').removeClass('group-hidden').end()
110
+ .find('tr.group-header').remove();
111
+ }
112
+ });
113
+
114
+ })(jQuery);
@@ -0,0 +1,50 @@
1
+ /*! tablesorter repeatHeaders widget - updated 4/12/2013
2
+ * Requires tablesorter v2.8+ and jQuery 1.7+
3
+ * Original by Christian Bach from the example-widgets.html demo
4
+ */
5
+ /*global jQuery: false */
6
+ ;(function($){
7
+ "use strict";
8
+
9
+ $.tablesorter.addWidget({
10
+ id: "repeatHeaders",
11
+ priority: 10,
12
+ options: {
13
+ rowsToSkip : 4
14
+ },
15
+ // format is called on init and when a sorting has finished
16
+ format: function(table, c, wo) {
17
+ var h = '', i, $tr, l, skip;
18
+ // cache and collect all TH headers
19
+ if (!wo.repeatHeaders) {
20
+ h = '<tr class="repeated-header remove-me">';
21
+ $.each(c.headerContent, function(i,t) {
22
+ h += '<th>' + t + '</th>';
23
+ });
24
+ // "remove-me" class was added in case the table needs to be updated, the "remove-me" rows will be
25
+ // removed prior to the update to prevent including the rows in the update - see "selectorRemove" option
26
+ wo.repeatHeaders = h + '</tr>';
27
+ }
28
+
29
+ // number of rows to skip
30
+ skip = wo && wo.rowsToSkip || 4;
31
+
32
+ // remove appended headers by classname
33
+ c.$table.find("tr.repeated-header").remove();
34
+ $tr = c.$tbodies.find('tr');
35
+ l = $tr.length;
36
+ // loop all tr elements and insert a copy of the "headers"
37
+ for (i = skip; i < l; i += skip) {
38
+ // insert a copy of the table head every X rows
39
+ $tr.eq(i).before(wo.repeatHeaders);
40
+ }
41
+ },
42
+ // this remove function is called when using the refreshWidgets method or when destroying the tablesorter plugin
43
+ // this function only applies to tablesorter v2.4+
44
+ remove: function(table, c){
45
+ c.$table.find("tr.repeated-header").remove();
46
+ }
47
+
48
+ });
49
+
50
+ })(jQuery);
@@ -0,0 +1,240 @@
1
+ /*!
2
+ Copyright (C) 2011 T. Connell & Associates, Inc.
3
+
4
+ Dual-licensed under the MIT and GPL licenses
5
+
6
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
8
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
9
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
+
11
+ Resizable scroller widget for the jQuery tablesorter plugin
12
+
13
+ Version 2.0 - modified by Rob Garrison (4/12/2013)
14
+ Requires jQuery, v1.2.3 or higher
15
+ Requires the tablesorter plugin, v2.0 or higher, available at http://mottie.github.com/tablesorter/docs/
16
+
17
+ Usage:
18
+
19
+ $(function() {
20
+
21
+ $('table.tablesorter').tablesorter({
22
+ widgets: ['zebra', 'scroller'],
23
+ widgetOptions : {
24
+ scroller_height : 300, // height of scroll window
25
+ scroller_barWidth : 17, // scroll bar width
26
+ scroller_jumpToHeader : true, // header snap to browser top when scrolling the tbody
27
+ scroller_idPrefix : 's_' // cloned thead id prefix (random number added to end)
28
+ }
29
+ });
30
+
31
+ });
32
+
33
+ Website: www.tconnell.com
34
+ */
35
+ /*jshint browser:true, jquery:true, unused:false */
36
+ ;(function($){
37
+ "use strict";
38
+
39
+ $.fn.hasScrollBar = function(){
40
+ return this.get(0).scrollHeight > this.height();
41
+ };
42
+
43
+ $.tablesorter.window_resize = function(){
44
+ if (this.resize_timer) {
45
+ clearTimeout(this.resize_timer);
46
+ }
47
+ this.resize_timer = setTimeout(function(){
48
+ $(this).trigger('resizeEnd');
49
+ }, 250);
50
+ };
51
+
52
+ // Add extra scroller css
53
+ $(function(){
54
+ var s = '<style>' +
55
+ '.tablesorter-scroller-header table.tablesorter { margin-bottom: 0; }' +
56
+ '.tablesorter-scroller-table table.tablesorter { margin-top: 0; } ' +
57
+ '.tablesorter-scroller-table .tablesorter-filter-row, .tablesorter-scroller-table tfoot { display: none; }' +
58
+ '.tablesorter-scroller-table table.tablesorter thead tr.tablesorter-headerRow * {' +
59
+ 'line-height:0;height:0;border:none;background-image:none;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;' +
60
+ '}</style>';
61
+ $(s).appendTo('body');
62
+ });
63
+
64
+ $.tablesorter.addWidget({
65
+ id: 'scroller',
66
+ priority: 60, // run after the filter widget
67
+ options: {
68
+ scroller_height : 300,
69
+ scroller_barWidth : 17,
70
+ scroller_jumpToHeader: true,
71
+ scroller_idPrefix : 's_'
72
+ },
73
+ init: function(table, thisWidget, c, wo){
74
+ var $win = $(window);
75
+ //Setup window.resizeEnd event
76
+ $win
77
+ .bind('resize', $.tablesorter.window_resize)
78
+ .bind('resizeEnd', function(e) {
79
+ // init is run before format, so scroller_resizeWidth
80
+ // won't be defined within the "c" or "wo" parameters
81
+ if (typeof table.config.widgetOptions.scroller_resizeWidth === 'function') {
82
+ //IE calls resize when you modify content, so we have to unbind the resize event
83
+ //so we don't end up with an infinite loop. we can rebind after we're done.
84
+ $win.unbind('resize', $.tablesorter.window_resize);
85
+ table.config.widgetOptions.scroller_resizeWidth();
86
+ $win.bind('resize', $.tablesorter.window_resize);
87
+ }
88
+ });
89
+ },
90
+ format: function(table, c, wo) {
91
+ var h, $hdr, id, t, resize, $cells,
92
+ $win = $(window),
93
+ $tbl = c.$table,
94
+ flag = false,
95
+ filterInputs = 'input, select';
96
+
97
+ if (!c.isScrolling) {
98
+ h = wo.scroller_height || 300;
99
+ t = $tbl.find('tbody').height();
100
+ if (t !== 0 && h > t) { h = t + 10; } // Table is less than h px
101
+ id = wo.scroller_id = wo.scroller_idPrefix + Math.floor(Math.random() * 101);
102
+
103
+ $hdr = $('<table class="' + $tbl.attr('class') + '" cellpadding=0 cellspacing=0><thead>' + $tbl.find('thead:first').html() + '</thead></table>');
104
+ $tbl
105
+ .wrap('<div id="' + id + '" class="tablesorter-scroller" style="text-align:left;" />')
106
+ .before($hdr)
107
+ .find('.tablesorter-filter-row').addClass('hideme');
108
+
109
+ $cells = $hdr
110
+ .wrap('<div class="tablesorter-scroller-header" style="width:' + $tbl.width() + ';" />')
111
+ .find('.' + c.cssHeader)
112
+ .bind('mousedown', function(){
113
+ this.onselectstart = function(){ return false; };
114
+ return false;
115
+ });
116
+
117
+ $tbl
118
+ .wrap('<div class="tablesorter-scroller-table" style="height:' + h + 'px;width:' + $tbl.width() + ';overflow-y:scroll;" />')
119
+ .unbind('sortEnd.tsScroller')
120
+ .bind('sortEnd.tsScroller', function(){
121
+ c.$headers.each(function(i){
122
+ var t = $cells.eq(i);
123
+ t
124
+ .attr('class', $(this).attr('class'))
125
+ // remove processing icon
126
+ .removeClass(c.cssProcessing);
127
+ if (c.cssIcon){
128
+ t
129
+ .find('.' + c.cssIcon)
130
+ .attr('class', $(this).find('.' + c.cssIcon).attr('class'));
131
+ }
132
+ });
133
+ });
134
+
135
+ // make scroller header sortable
136
+ c.$headers.find('*')[ $.fn.addBack ? 'addBack': 'andSelf' ]().filter(c.selectorSort).each(function(i){
137
+ var t = $(this);
138
+ $cells.eq(i)
139
+ // clicking on new header will trigger a sort
140
+ .bind('mouseup', function(e){
141
+ t.trigger(e, true); // external mouseup flag (click timer is ignored)
142
+ })
143
+ // prevent header text selection
144
+ .bind('mousedown', function(){
145
+ this.onselectstart = function(){ return false; };
146
+ return false;
147
+ });
148
+ });
149
+
150
+ // look for filter widget
151
+ $tbl.bind('filterEnd', function(){
152
+ if (flag) { return; }
153
+ $cells.each(function(i){
154
+ $(this).find(filterInputs).val( c.$filters.find(filterInputs).eq(i).val() );
155
+ });
156
+ });
157
+ $hdr.find(filterInputs).bind('keyup search', function(e){
158
+ // ignore arrow and meta keys; allow backspace
159
+ if ((e.which < 32 && e.which !== 8) || (e.which >= 37 && e.which <=40)) { return; }
160
+ flag = true;
161
+ var $f = $(this), col = $f.attr('data-column');
162
+ c.$filters.find(filterInputs).eq(col)
163
+ .val( $f.val() )
164
+ .trigger('search');
165
+ setTimeout(function(){
166
+ flag = false;
167
+ }, wo.filter_searchDelay);
168
+ });
169
+
170
+ resize = function(){
171
+ var d,
172
+ //Hide other scrollers so we can resize
173
+ $div = $('div.scroller[id != "' + id + '"]').hide();
174
+
175
+ $tbl.find('thead').show();
176
+
177
+ //Reset sizes so parent can resize.
178
+ $hdr
179
+ .width(0)
180
+ .parent().width(0)
181
+ .find('th,td').width(0);
182
+
183
+ $tbl
184
+ .width(0)
185
+ .find('thead').find('th,td').width(0);
186
+ d = $tbl.parent();
187
+ d.width(0);
188
+
189
+ d.parent().trigger('resize');
190
+ // Shrink a bit to accommodate scrollbar
191
+ d.width( d.parent().innerWidth() - ( d.parent().hasScrollBar() ? wo.scroller_barWidth : 0 ) );
192
+
193
+ $tbl.width( d.innerWidth() - ( d.hasScrollBar() ? wo.scroller_barWidth : 0 ) );
194
+ $tbl.find('thead').find('th,td').filter(':visible').each(function(i, c){
195
+ var $th = $(c),
196
+ //Wrap in browser detect??
197
+ w = parseInt( $th.css('min-width').replace('auto', '0').replace(/(px|em)/, ''), 10 );
198
+ if ( $th.width() < w ) {
199
+ $th.width(w);
200
+ } else {
201
+ w = $th.width();
202
+ }
203
+ $hdr.find('th,td').eq(i).width(w);
204
+ });
205
+
206
+ $hdr.width($tbl.innerWidth());
207
+ $div.show();
208
+ };
209
+
210
+ //Expose to external calls
211
+ wo.scroller_resizeWidth = resize;
212
+
213
+ resize();
214
+
215
+ $tbl.find('thead').css('visibility', 'hidden');
216
+ c.isScrolling = true;
217
+
218
+ t = $tbl.parent().parent().height();
219
+ // The header will always jump into view if scrolling the table body
220
+ $tbl.parent().bind('scroll', function(){
221
+ if (wo.scroller_jumpToHeader) {
222
+ var pos = $win.scrollTop() - $hdr.offset().top;
223
+ if ($(this).scrollTop() !== 0 && pos < t && pos > 0) {
224
+ $win.scrollTop( $hdr.offset().top );
225
+ }
226
+ }
227
+ });
228
+
229
+ }
230
+
231
+ //Sorting, so scroll to top
232
+ $tbl.parent().animate({ scrollTop: 0 }, 'fast');
233
+
234
+ },
235
+ remove : function(table, c, wo){
236
+
237
+ }
238
+ });
239
+
240
+ })(jQuery);