mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
8cc99d5873
52
README.md
52
README.md
@ -104,6 +104,17 @@ If you would like to contribute, please...
|
||||
|
||||
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
|
||||
|
||||
#### <a name="v2.28.9">Version 2.28.9</a> (5/3/2017)
|
||||
|
||||
* Core:
|
||||
* Fix widget option changes across multiple tables; seen in the second table of the math page demo with the `math_ignore` option.
|
||||
* Docs:
|
||||
* Add page header section to Math docs. See #1392.
|
||||
* Fix misspelling.
|
||||
* update jQuery.
|
||||
* Math:
|
||||
* Include noop `math_complete` in defaults; prevents option not recognized warning
|
||||
|
||||
#### <a name="v2.28.8">Version 2.28.8</a> (4/18/2017)
|
||||
|
||||
* Docs:
|
||||
@ -135,44 +146,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
|
||||
* Prevent JS error added from last update. Fixes [issue #1377](https://github.com/Mottie/tablesorter/issues/1377).
|
||||
* Meta:
|
||||
* Fix composer.json license.
|
||||
|
||||
#### <a name="v2.28.6">Version 2.28.6</a> (4/2/2017)
|
||||
|
||||
* Core:
|
||||
* Prevent overwritting default `widgetOptions`. Fixes [issue #1356](https://github.com/Mottie/tablesorter/issues/1356).
|
||||
* Fix method of saving default widgetOptions. See [issue #1356](https://github.com/Mottie/tablesorter/issues/1356).
|
||||
* Update column count after reset.
|
||||
* Add fix it (in Abelt) note for [issue #1362](https://github.com/Mottie/tablesorter/issues/1362).
|
||||
* Update widgets after `sortReset`. Fixes [issue #1361](https://github.com/Mottie/tablesorter/issues/1361).
|
||||
* The `applyWidget` callback now occurs after "tablesorter-ready" event
|
||||
* Docs:
|
||||
* Update jQuery to v3.2.0.
|
||||
* Fix "update" labels from previous version.
|
||||
* Add note about Excel & `output_encoding`. See [issue #1353](https://github.com/Mottie/tablesorter/issues/1353).
|
||||
* Clarify parser & sorter class name differences.
|
||||
* Add note about event binding after build widget completes. See [issue #1370](https://github.com/Mottie/tablesorter/issues/1370).
|
||||
* Fixed linting issues.
|
||||
* Add some internal links.
|
||||
* Build:
|
||||
* Stop build widget option warnings.
|
||||
* Filter:
|
||||
* Compare last search array (instead of a combined string). Fixes [issue #1363](https://github.com/Mottie/tablesorter/issues/1363).
|
||||
* Output:
|
||||
* Fixed CSV output when colspan >3. See [PR #1373](https://github.com/Mottie/tablesorter/pull/1373); thanks [@ruchir19](https://github.com/ruchir19)!
|
||||
* Pager:
|
||||
* Fix "all" option to not set when the option doesn't exist. See [PR #1364](https://github.com/Mottie/tablesorter/pull/1364); thanks [@simenflatby](https://github.com/simenflatby)!
|
||||
* Stop using combined filter values. See [issue #1363](https://github.com/Mottie/tablesorter/issues/1363).
|
||||
* Use "all" only when the option exists. Fixes [#1364](https://github.com/Mottie/tablesorter/pull/1364) & [#1366](https://github.com/Mottie/tablesorter/issues/1366).
|
||||
* Sort2Hash:
|
||||
* Stop option warnings. Fixes [issue #1369](https://github.com/Mottie/tablesorter/issues/1369).
|
||||
* Parsers:
|
||||
* Add leading zero parser & [demo](https://mottie.github.io/tablesorter/docs/example-parsers-leading-zeros.html).
|
||||
* Theme:
|
||||
* Add CSS highlight file; copied from [the demo](https://mottie.github.io/tablesorter/docs/example-css-highlighting.html).
|
||||
* Meta:
|
||||
* Add `composer.json` file. Fixes [issue #1355](https://github.com/Mottie/tablesorter/issues/1355).
|
||||
* Readme: Move questions section closer to the top.
|
||||
* Update dependencies.
|
||||
* Fix indentation & remove extra spaces.
|
||||
* Remove cdnjs auto-update config - see [CDNJS #9080](https://github.com/cdnjs/cdnjs/pull/9080).
|
||||
* Update SPDX license.
|
||||
|
8
dist/js/jquery.tablesorter.combined.js
vendored
8
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
|
||||
/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -10,7 +10,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.8 *//*
|
||||
/*! TableSorter (FORK) v2.28.9 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -34,7 +34,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.8',
|
||||
version : '2.28.9',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1943,7 +1943,7 @@
|
||||
for ( indx = 0; indx < len; indx++ ) {
|
||||
widget = ts.getWidgetById( c.widgets[ indx ] );
|
||||
if ( widget && widget.options ) {
|
||||
wo = $.extend( {}, widget.options );
|
||||
wo = $.extend( true, {}, widget.options );
|
||||
c.widgetOptions = $.extend( true, wo, c.widgetOptions );
|
||||
// add widgetOptions to defaults for option validator
|
||||
$.extend( true, ts.defaults.widgetOptions, widget.options );
|
||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/js/jquery.tablesorter.js
vendored
6
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.8 *//*
|
||||
/*! TableSorter (FORK) v2.28.9 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -32,7 +32,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.8',
|
||||
version : '2.28.9',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1941,7 +1941,7 @@
|
||||
for ( indx = 0; indx < len; indx++ ) {
|
||||
widget = ts.getWidgetById( c.widgets[ indx ] );
|
||||
if ( widget && widget.options ) {
|
||||
wo = $.extend( {}, widget.options );
|
||||
wo = $.extend( true, {}, widget.options );
|
||||
c.widgetOptions = $.extend( true, wo, c.widgetOptions );
|
||||
// add widgetOptions to defaults for option validator
|
||||
$.extend( true, ts.defaults.widgetOptions, widget.options );
|
||||
|
2
dist/js/jquery.tablesorter.min.js
vendored
2
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/jquery.tablesorter.widgets.js
vendored
2
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
|
||||
/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
|
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-math.min.js
vendored
4
dist/js/widgets/widget-math.min.js
vendored
File diff suppressed because one or more lines are too long
@ -806,6 +806,23 @@ BAD => No minus (-) here! $#,###.00 or [-] here either <= BAD</textarea>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
<h1>Page Header</h1>
|
||||
<div>
|
||||
<pre class="prettyprint lang-html"><!-- load your chosen theme -->
|
||||
<link rel="stylesheet" href="css/theme.blue.css">
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
|
||||
<!-- Tablesorter: required -->
|
||||
<script src="js/jquery.tablesorter.js"></script>
|
||||
<script src="js/widget-math.js"></script>
|
||||
|
||||
<!-- load filter widget if needed -->
|
||||
<script src="js/widget-filter.js"></script></pre>
|
||||
</div>
|
||||
|
||||
|
||||
<h1>Javascript</h1>
|
||||
<div id="javascript">
|
||||
<pre class="prettyprint lang-javascript"></pre>
|
||||
|
@ -261,7 +261,7 @@
|
||||
<pre class="prettyprint lang-css">content: attr(data-title);</pre>
|
||||
The second method ignores the backslash and shows <code>"row1 \A row2"</code>
|
||||
</li>
|
||||
<li><span class="label label-info">Update</span>: After some discussion in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=988694">bugzilla</a>, I discovered that it is possible to add multiple lines of content usigin a data-attribute by setting a <code>white-space: pre;</code> css definition and using <code>&#10</code> instead of <code>\A</code> (<a href="https://jsfiddle.net/96pwE/5/">demo</a>), but I think I'll keep the second reflow version because it actually allows styling.</li>
|
||||
<li><span class="label label-info">Update</span>: After some discussion in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=988694">bugzilla</a>, I discovered that it is possible to add multiple lines of content using a data-attribute by setting a <code>white-space: pre;</code> css definition and using <code>&#10</code> instead of <code>\A</code> (<a href="https://jsfiddle.net/96pwE/5/">demo</a>), but I think I'll keep the second reflow version because it actually allows styling.</li>
|
||||
<li>Adding bold elements to every table tbody cell is the method used by jQuery Mobile; so, a second reflow widget "reflow2" was created to do the same, and work properly with a thead containing multiple rows.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
8
docs/js/jquery-latest.min.js
vendored
8
docs/js/jquery-latest.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
|
||||
/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.8 *//*
|
||||
/*! TableSorter (FORK) v2.28.9 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -40,7 +40,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.8',
|
||||
version : '2.28.9',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1949,7 +1949,7 @@
|
||||
for ( indx = 0; indx < len; indx++ ) {
|
||||
widget = ts.getWidgetById( c.widgets[ indx ] );
|
||||
if ( widget && widget.options ) {
|
||||
wo = $.extend( {}, widget.options );
|
||||
wo = $.extend( true, {}, widget.options );
|
||||
c.widgetOptions = $.extend( true, wo, c.widgetOptions );
|
||||
// add widgetOptions to defaults for option validator
|
||||
$.extend( true, ts.defaults.widgetOptions, widget.options );
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! TableSorter (FORK) v2.28.8 *//*
|
||||
/*! TableSorter (FORK) v2.28.9 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.8',
|
||||
version : '2.28.9',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1931,7 +1931,7 @@
|
||||
for ( indx = 0; indx < len; indx++ ) {
|
||||
widget = ts.getWidgetById( c.widgets[ indx ] );
|
||||
if ( widget && widget.options ) {
|
||||
wo = $.extend( {}, widget.options );
|
||||
wo = $.extend( true, {}, widget.options );
|
||||
c.widgetOptions = $.extend( true, wo, c.widgetOptions );
|
||||
// add widgetOptions to defaults for option validator
|
||||
$.extend( true, ts.defaults.widgetOptions, widget.options );
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
|
||||
/*! tablesorter (FORK) - updated 05-03-2017 (v2.28.9)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: math - updated 11/26/2016 (v2.28.0) *//*
|
||||
/*! Widget: math - updated 5/3/2017 (v2.28.9) *//*
|
||||
* Requires tablesorter v2.16+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -606,7 +606,7 @@
|
||||
// complete executed after each fucntion
|
||||
math_complete : null, // function($cell, wo, result, value, arry){ return result; },
|
||||
// math_completed called after all math calculations have completed
|
||||
// math_completed : function( config ) {},
|
||||
math_completed: function( config ) {},
|
||||
// order of calculation; 'all' is last
|
||||
math_priority : [ 'row', 'above', 'below', 'col' ],
|
||||
// template for or just prepend the mask prefix & suffix with this HTML
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.28.8",
|
||||
"version": "2.28.9",
|
||||
"description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.28.8",
|
||||
"version": "2.28.9",
|
||||
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
@ -161,17 +161,37 @@ jQuery(function($){
|
||||
},
|
||||
undef, c1, c2, c3, c4, e, i, t;
|
||||
|
||||
/* test widget */
|
||||
ts.addWidget({
|
||||
id : 'test',
|
||||
options: {
|
||||
'test': []
|
||||
},
|
||||
format: function() {}
|
||||
});
|
||||
|
||||
$table1
|
||||
.on('tablesorter-initialized', function(){
|
||||
init = true;
|
||||
})
|
||||
.tablesorter();
|
||||
.tablesorter({
|
||||
widgets: ['test'],
|
||||
widgetOptions: {
|
||||
// check widget option defaults across tables
|
||||
test: [0,1]
|
||||
}
|
||||
});
|
||||
|
||||
$table2.tablesorter({
|
||||
headers: {
|
||||
0: { sorter: 'text' },
|
||||
1: { sorter: 'text' },
|
||||
2: { sorter: false }
|
||||
},
|
||||
widgets: ['test'],
|
||||
widgetOptions: {
|
||||
// check widget option defaults across tables
|
||||
test: [0]
|
||||
}
|
||||
});
|
||||
|
||||
@ -182,7 +202,9 @@ jQuery(function($){
|
||||
0: { empty : 'top' }, // sort empty cells to the top
|
||||
2: { string: 'min' }, // non-numeric content is treated as a MIN value
|
||||
3: { sorter: 'digit', empty : 'zero', string : 'top' }
|
||||
}
|
||||
},
|
||||
// check widget option defaults across tables
|
||||
widgets: ['test']
|
||||
});
|
||||
|
||||
$table4.tablesorter({
|
||||
@ -907,6 +929,14 @@ jQuery(function($){
|
||||
return t;
|
||||
};
|
||||
|
||||
QUnit.test( 'check widgetOption defaults across tables', function(assert) {
|
||||
assert.expect(4);
|
||||
assert.deepEqual(c1.widgetOptions.test, [0,1], 'widget option properly set');
|
||||
assert.deepEqual(c2.widgetOptions.test, [0], 'widget option properly set');
|
||||
assert.deepEqual(c3.widgetOptions.test, [], 'default widget option set on table');
|
||||
assert.deepEqual(ts.defaults.widgetOptions.test, [], 'default widget option set in core');
|
||||
});
|
||||
|
||||
QUnit.test( 'apply zebra widget', function(assert) {
|
||||
assert.expect(3);
|
||||
assert.equal( zebra(), false, 'zebra not applied' );
|
||||
|
Loading…
Reference in New Issue
Block a user