tidy-table-rails 2.2.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.travis.yml +4 -0
- data/README.md +3 -3
- data/Rakefile +5 -0
- data/lib/tidy/table/rails/version.rb +1 -1
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +31 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +56 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/log/test.log +2 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9dUiGLnCoYGlMMoyJxiA6sYZaTzO5E0z3LXIndUkZxA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/I7iA12QXi0v_d_m9KnwGlJs0i-jxq8jOTjoSGgThLS8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/IdEQpyq95L1ZCKsvyYXpmwrJ5m4re1-PU4QWSvGO2cA.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J0T-ieNYyNasfJXbNOX-i8gPFlnz7umulnY5jHQ8cMg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RArjhRyejO70EgWK-qg6b3QMyrhdPgj5Zi3dagQrXqE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UE6Uhwge2PToyGuiqGSQteTsHGYAmixLx_rU0U6e1s0.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UvnNaNyNiZ6RVDZb8QtaAxMilES3-i161zcJdqBni8k.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YwCR5bONajMEo7HvhY050SUpBt5yJPUJICk_rWmhGAk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e46AYnIIxZHGEJgpFAx3S37NZDTxLp11WZxCi7cf8l8.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hCbJZ7N6h55f6Ebq0l5bneTKIpaMVaSh0PpNRkN5lEM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uufkynyrXOoO6kmUBbcwIGiKVVoM5NavmXUQH2vidWA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vP_muxnzZtn8RNqAm02_r_zYcckWlo8C7xmvFctN44c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wr7plbJR8oEsGvgnc_0dRRL3L0dPh9yZ-MVE6mSpRbI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zpU64aTKUJH4CAknZnsxZxRdJDE3H7fAuZX0ObycI5Q.cache +1 -0
- data/spec/features/assets_spec.rb +13 -0
- data/spec/spec_helper.rb +4 -0
- data/tidy-table-rails.gemspec +5 -1
- data/vendor/assets/javascripts/tidy-table.js +124 -132
- data/vendor/assets/stylesheets/tidy-table.css +1 -4
- metadata +169 -20
@@ -3,19 +3,14 @@
|
|
3
3
|
* Create a HTML table from JSON that can be sorted, selected
|
4
4
|
* and post-processed using a simple callback.
|
5
5
|
*
|
6
|
-
* Copyright 2012-
|
6
|
+
* Copyright 2012-2016, Marc S. Brooks (https://mbrooks.info)
|
7
7
|
* Licensed under the MIT license:
|
8
8
|
* http://www.opensource.org/licenses/mit-license.php
|
9
|
-
*
|
10
|
-
* Dependencies:
|
11
|
-
* jquery.js
|
12
9
|
*/
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
}
|
11
|
+
(function() {
|
12
|
+
"use strict";
|
17
13
|
|
18
|
-
(function($) {
|
19
14
|
var table = null;
|
20
15
|
|
21
16
|
/**
|
@@ -30,16 +25,16 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
30
25
|
* @method init
|
31
26
|
*
|
32
27
|
* @example
|
33
|
-
*
|
28
|
+
* document.getElementById('container').TidyTable(settings, config);
|
34
29
|
*
|
35
30
|
* @param {Object} settings
|
36
31
|
* @param {Object} config
|
37
32
|
*
|
38
|
-
* @returns {Object}
|
33
|
+
* @returns {Object} DOM element
|
39
34
|
*/
|
40
35
|
"init": function(settings, config) {
|
41
|
-
var
|
42
|
-
data =
|
36
|
+
var _self = this,
|
37
|
+
data = _self.data;
|
43
38
|
|
44
39
|
// Default settings
|
45
40
|
var defaults = {
|
@@ -50,34 +45,34 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
50
45
|
};
|
51
46
|
|
52
47
|
if (arguments.length > 1) {
|
53
|
-
|
48
|
+
Object.assign(defaults, settings);
|
54
49
|
}
|
55
50
|
else {
|
56
51
|
config = settings;
|
57
52
|
}
|
58
53
|
|
59
54
|
// Config defaults
|
60
|
-
config =
|
55
|
+
config = Object.assign({
|
61
56
|
sortByPattern: function(col_num, val) {
|
62
|
-
if (
|
57
|
+
if (col_num && val) {
|
63
58
|
return String(val).replace(/$|%|#/g, '');
|
64
59
|
}
|
65
60
|
}
|
66
61
|
}, config);
|
67
62
|
|
68
|
-
if (
|
69
|
-
|
63
|
+
if (typeof data === 'undefined') {
|
64
|
+
_self.data = {
|
70
65
|
settings: defaults,
|
71
66
|
config: config
|
72
|
-
}
|
67
|
+
};
|
73
68
|
}
|
74
69
|
|
75
70
|
// Responsive layout?
|
76
71
|
if (defaults.responsive) {
|
77
|
-
|
72
|
+
_self.className = 'tidy_table media';
|
78
73
|
}
|
79
74
|
|
80
|
-
return
|
75
|
+
return _self.TidyTable('_createTable');
|
81
76
|
},
|
82
77
|
|
83
78
|
/**
|
@@ -87,10 +82,10 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
87
82
|
* @method destroy
|
88
83
|
*
|
89
84
|
* @example
|
90
|
-
*
|
85
|
+
* document.getElementById('container').TidyTable('destroy');
|
91
86
|
*/
|
92
87
|
"destroy": function() {
|
93
|
-
|
88
|
+
this.remove();
|
94
89
|
},
|
95
90
|
|
96
91
|
/**
|
@@ -103,37 +98,34 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
103
98
|
* @param {String|undefined} num
|
104
99
|
* @param {String|undefined} order
|
105
100
|
*
|
106
|
-
* @returns {Object}
|
101
|
+
* @returns {Object} DOM element
|
107
102
|
*/
|
108
103
|
"_createTable": function(num, order) {
|
109
|
-
var
|
110
|
-
data =
|
104
|
+
var _self = this,
|
105
|
+
data = _self.data;
|
111
106
|
|
112
107
|
// Create reusable elements.
|
113
|
-
table =
|
114
|
-
|
115
|
-
|
116
|
-
// Disable IE7/8 text selection.
|
117
|
-
table.mousedown(function() { return false; });
|
118
|
-
table.mouseover(function() { return false; });
|
108
|
+
table = document.createElement('table');
|
109
|
+
table.className = 'tidy_table';
|
119
110
|
|
120
|
-
var thead =
|
121
|
-
tbody =
|
111
|
+
var thead = document.createElement('thead'),
|
112
|
+
tbody = document.createElement('tbody'),
|
122
113
|
titles = null;
|
123
114
|
|
124
115
|
// .. <THEAD>
|
125
116
|
(function() {
|
126
117
|
titles = data.config.columnTitles;
|
127
118
|
|
128
|
-
var row =
|
119
|
+
var row = document.createElement('tr');
|
129
120
|
|
130
121
|
for (var i = 0; i < titles.length; i++) {
|
131
122
|
var title = titles[i];
|
132
123
|
|
133
|
-
var col =
|
134
|
-
|
135
|
-
|
136
|
-
|
124
|
+
var col = document.createElement('th');
|
125
|
+
col.appendChild(document.createTextNode(title));
|
126
|
+
col.setAttribute('title', title);
|
127
|
+
|
128
|
+
row.appendChild(col);
|
137
129
|
|
138
130
|
var col_class;
|
139
131
|
|
@@ -161,109 +153,106 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
161
153
|
|
162
154
|
// Highlight selected column.
|
163
155
|
if (num == i) {
|
164
|
-
col.
|
156
|
+
col.className = col_class;
|
165
157
|
}
|
166
158
|
|
159
|
+
col.index = i;
|
160
|
+
|
167
161
|
// Attach sorting event to each column.
|
168
|
-
col.
|
169
|
-
|
170
|
-
|
171
|
-
},
|
172
|
-
function(event) {
|
173
|
-
$this.TidyTable('_sortByColumn', event.data.col_number, event.data.sort_order);
|
174
|
-
});
|
162
|
+
col.addEventListener('click', function() {
|
163
|
+
_self.TidyTable('_sortByColumn', this.index, ((num == this.index) ? this.order : 'asc'));
|
164
|
+
}, false);
|
175
165
|
}
|
176
166
|
|
177
|
-
thead.
|
167
|
+
thead.appendChild(row);
|
178
168
|
})();
|
179
169
|
|
180
170
|
// .. <TBODY>
|
181
171
|
(function() {
|
182
|
-
var vals = data.config.columnValues
|
172
|
+
var vals = data.config.columnValues,
|
173
|
+
col = null;
|
183
174
|
|
184
175
|
for (var j = 0; j < vals.length; j++) {
|
185
|
-
|
176
|
+
|
177
|
+
// Create the row.
|
178
|
+
var row = document.createElement('tr');
|
186
179
|
|
187
180
|
for (var k = 0; k < vals[j].length; k++) {
|
188
181
|
var val = vals[j][k];
|
189
182
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
183
|
+
// Create the column.
|
184
|
+
col = document.createElement('td');
|
185
|
+
col.appendChild(document.createTextNode(val));
|
186
|
+
col.setAttribute('title', val);
|
187
|
+
|
188
|
+
row.appendChild(col);
|
194
189
|
|
195
190
|
// Post-process table column HTML object.
|
196
|
-
if (data.config.postProcess &&
|
191
|
+
if (data.config.postProcess && (typeof data.config.postProcess.column === "function")) {
|
197
192
|
data.config.postProcess.column(col);
|
198
193
|
}
|
199
194
|
}
|
200
195
|
|
201
|
-
tbody.
|
196
|
+
tbody.appendChild(row);
|
202
197
|
}
|
203
198
|
|
204
|
-
table.
|
205
|
-
table.
|
199
|
+
table.appendChild(thead);
|
200
|
+
table.appendChild(tbody);
|
206
201
|
|
207
202
|
// Append check boxes to beginning each row.
|
208
203
|
if (data.settings && data.settings.enableCheckbox) {
|
209
|
-
var rows = table.
|
210
|
-
|
211
|
-
rows.each(function(index) {
|
212
|
-
var input = $('<input></input>')
|
213
|
-
.attr('type', 'checkbox');
|
204
|
+
var rows = table.querySelectorAll('tr');
|
214
205
|
|
215
|
-
|
206
|
+
for (var i = 0; i < rows.length; i++) {
|
207
|
+
var input = document.createElement('input');
|
208
|
+
input.setAttribute('type', 'checkbox');
|
209
|
+
input.index = i;
|
216
210
|
|
217
211
|
// First row is always the header.
|
218
|
-
if (
|
219
|
-
col =
|
212
|
+
if (i === 0) {
|
213
|
+
col = document.createElement('th');
|
220
214
|
|
221
215
|
// Attach event to check all boxes.
|
222
|
-
input.
|
223
|
-
|
216
|
+
input.addEventListener('click', function() {
|
217
|
+
_self.TidyTable('_toggleSelRows', rows);
|
224
218
|
});
|
225
219
|
}
|
226
220
|
else {
|
227
|
-
col =
|
221
|
+
col = document.createElement('td');
|
228
222
|
|
229
223
|
// Attach event to each checkbox.
|
230
|
-
input.
|
231
|
-
|
232
|
-
},
|
233
|
-
function(event) {
|
234
|
-
$this.TidyTable('_toggleSelRows', rows, event.data.box_number);
|
224
|
+
input.addEventListener('click', function() {
|
225
|
+
_self.TidyTable('_toggleSelRows', rows, this.index);
|
235
226
|
});
|
236
227
|
}
|
237
228
|
|
238
|
-
col.
|
229
|
+
col.appendChild(input);
|
239
230
|
|
240
231
|
// Insert before first cell.
|
241
|
-
|
242
|
-
}
|
232
|
+
rows[i].insertBefore(col, rows[i].firstChild);
|
233
|
+
}
|
243
234
|
}
|
244
235
|
})();
|
245
236
|
|
246
237
|
// Post-process table results HTML object.
|
247
|
-
if (data.config.postProcess &&
|
238
|
+
if (data.config.postProcess && (typeof data.config.postProcess.table === "function")) {
|
248
239
|
data.config.postProcess.table(table);
|
249
240
|
}
|
250
241
|
|
251
|
-
var block =
|
242
|
+
var block = _self.querySelector('table.tidy_table');
|
252
243
|
|
253
244
|
// If table exists, perform an in-place update of the element.
|
254
|
-
if (block
|
255
|
-
block.
|
245
|
+
if (block) {
|
246
|
+
block.parentNode.replaceChild(table, block);
|
256
247
|
}
|
257
248
|
|
258
249
|
// Generate table/menu elements.
|
259
250
|
else {
|
260
251
|
if (data.settings && data.settings.enableMenu) {
|
261
|
-
|
262
|
-
$this.TidyTable('_createMenu', 'options')
|
263
|
-
);
|
252
|
+
_self.appendChild( _self.TidyTable('_createMenu', 'options') );
|
264
253
|
}
|
265
254
|
|
266
|
-
|
255
|
+
_self.appendChild(table);
|
267
256
|
}
|
268
257
|
|
269
258
|
return table;
|
@@ -278,38 +267,41 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
278
267
|
*
|
279
268
|
* @param {String} name
|
280
269
|
*
|
281
|
-
* @returns {Object}
|
270
|
+
* @returns {Object} DOM element
|
282
271
|
*/
|
283
272
|
"_createMenu": function(name) {
|
284
|
-
var
|
285
|
-
data =
|
273
|
+
var _self = this,
|
274
|
+
data = _self.data;
|
286
275
|
|
287
276
|
// Create reusable elements.
|
288
|
-
var select =
|
289
|
-
|
290
|
-
.change(function() {
|
291
|
-
var elm = $(this);
|
277
|
+
var select = document.createElement('select');
|
278
|
+
select.className = 'tidy_table ' + name;
|
292
279
|
|
293
|
-
|
280
|
+
// Listen for select menu events.
|
281
|
+
select.addEventListener('change', function() {
|
282
|
+
var elm = this;
|
294
283
|
|
295
|
-
|
296
|
-
|
297
|
-
callback( $this.TidyTable('_getCheckedAsObj') );
|
298
|
-
}
|
284
|
+
// Execute callback.
|
285
|
+
var callback = data.config.menuOptions[elm.value][1].callback;
|
299
286
|
|
300
|
-
|
301
|
-
|
287
|
+
if (typeof callback === 'function') {
|
288
|
+
callback( _self.TidyTable('_getCheckedAsObj') );
|
289
|
+
}
|
290
|
+
|
291
|
+
elm.value = 0;
|
292
|
+
});
|
302
293
|
|
303
294
|
// .. Options
|
304
|
-
|
305
|
-
var option =
|
306
|
-
|
295
|
+
for (var i = 0; i < data.config.menuOptions.length; i++) {
|
296
|
+
var option = document.createElement('option');
|
297
|
+
option.text = data.config.menuOptions[i][0];
|
298
|
+
option.value = i;
|
307
299
|
|
308
|
-
select.
|
309
|
-
}
|
300
|
+
select.appendChild(option);
|
301
|
+
}
|
310
302
|
|
311
303
|
// Post-process select menu HTML object.
|
312
|
-
if (data.config.postProcess &&
|
304
|
+
if (data.config.postProcess && (typeof data.config.postProcess.menu === 'function')) {
|
313
305
|
data.config.postProcess.menu(select);
|
314
306
|
}
|
315
307
|
|
@@ -326,8 +318,8 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
326
318
|
* @returns {Array}
|
327
319
|
*/
|
328
320
|
"_getCheckedAsObj": function() {
|
329
|
-
var
|
330
|
-
rows =
|
321
|
+
var _self = this,
|
322
|
+
rows = _self.querySelectorAll('tbody > tr'),
|
331
323
|
objs = [];
|
332
324
|
|
333
325
|
for (var i = 0; i < rows.length; i++) {
|
@@ -356,49 +348,49 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
356
348
|
* @method _toggleSelRows
|
357
349
|
* @private
|
358
350
|
*
|
359
|
-
* @param {Object} rows
|
351
|
+
* @param {Object} rows DOM element
|
360
352
|
* @param {Number} num
|
361
353
|
*/
|
362
354
|
"_toggleSelRows": function(rows, num) {
|
363
355
|
var checked = null;
|
364
356
|
|
365
|
-
rows.
|
366
|
-
var row =
|
367
|
-
input = row.
|
357
|
+
for (var i = 0; i < rows.length; i++) {
|
358
|
+
var row = rows[i],
|
359
|
+
input = row.querySelector('input[type=checkbox]');
|
368
360
|
|
369
361
|
// Update all rows.
|
370
362
|
if (!num) {
|
371
|
-
if (
|
372
|
-
checked =
|
373
|
-
|
363
|
+
if (i === 0) {
|
364
|
+
checked = input.checked;
|
365
|
+
continue;
|
374
366
|
}
|
375
367
|
|
376
368
|
if (checked) {
|
377
|
-
row.
|
378
|
-
input.
|
369
|
+
row.className = (row.className) ? row.className.replace(/check_off/, 'check_on') : 'check_on';
|
370
|
+
input.checked = true;
|
379
371
|
}
|
380
372
|
else {
|
381
|
-
row.
|
382
|
-
input.
|
373
|
+
row.className = row.className.replace(/check_on/, 'check_off');
|
374
|
+
input.checked = false;
|
383
375
|
}
|
384
376
|
}
|
385
377
|
|
386
378
|
// Update selected row.
|
387
379
|
else {
|
388
|
-
if (
|
389
|
-
|
380
|
+
if (i === 0) {
|
381
|
+
continue;
|
390
382
|
}
|
391
383
|
|
392
|
-
if (input.
|
393
|
-
row.
|
394
|
-
input.
|
384
|
+
if (input.checked === true) {
|
385
|
+
row.className = (row.className) ? row.className.replace(/check_off/, 'check_on') : 'check_on';
|
386
|
+
input.checked = true;
|
395
387
|
}
|
396
388
|
else {
|
397
|
-
row.
|
398
|
-
input.
|
389
|
+
row.className = row.className.replace(/check_on/, 'check_off');
|
390
|
+
input.checked = false;
|
399
391
|
}
|
400
392
|
}
|
401
|
-
}
|
393
|
+
}
|
402
394
|
},
|
403
395
|
|
404
396
|
/**
|
@@ -412,10 +404,10 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
412
404
|
* @param {Number} order
|
413
405
|
*/
|
414
406
|
"_sortByColumn": function(num, order) {
|
415
|
-
var
|
416
|
-
data =
|
407
|
+
var _self = this,
|
408
|
+
data = _self.data;
|
417
409
|
|
418
|
-
if (
|
410
|
+
if (typeof data.config.sortByPattern === 'function') {
|
419
411
|
var reverse = (order == 'desc') ? -1 : 1;
|
420
412
|
|
421
413
|
// Sort JSON object by bucket number.
|
@@ -433,11 +425,11 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
433
425
|
});
|
434
426
|
}
|
435
427
|
|
436
|
-
|
428
|
+
_self.TidyTable('_createTable', num, order);
|
437
429
|
}
|
438
430
|
};
|
439
431
|
|
440
|
-
|
432
|
+
Element.prototype.TidyTable = function(method) {
|
441
433
|
if (methods[method]) {
|
442
434
|
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
443
435
|
}
|
@@ -446,7 +438,7 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
446
438
|
return methods.init.apply(this, arguments);
|
447
439
|
}
|
448
440
|
else {
|
449
|
-
|
441
|
+
throw new Error('Method ' + method + ' does not exist in TidyTable');
|
450
442
|
}
|
451
443
|
};
|
452
444
|
|
@@ -467,4 +459,4 @@ if (!window.jQuery || (window.jQuery && parseInt(window.jQuery.fn.jquery.replace
|
|
467
459
|
function cmpInt(a, b) {
|
468
460
|
return b - a;
|
469
461
|
}
|
470
|
-
})(
|
462
|
+
})();
|
@@ -3,12 +3,9 @@
|
|
3
3
|
* Create a HTML table from JSON that can be sorted, selected
|
4
4
|
* and post-processed using a simple callback.
|
5
5
|
*
|
6
|
-
* Copyright 2012-
|
6
|
+
* Copyright 2012-2016, Marc S. Brooks (https://mbrooks.info)
|
7
7
|
* Licensed under the MIT license:
|
8
8
|
* http://www.opensource.org/licenses/mit-license.php
|
9
|
-
*
|
10
|
-
* Dependencies:
|
11
|
-
* jquery.js
|
12
9
|
*/
|
13
10
|
|
14
11
|
table.tidy_table {
|