Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2016-08-02 14:58:44 -05:00
commit a2360827ac
17 changed files with 55 additions and 87 deletions

View File

@ -101,6 +101,12 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.27.2">Version 2.27.2</a> (8/1/2016)
* Docs: Update versions.
* Core: Allow leading zeros in the time parser. Fixes [issue #1269](https://github.com/Mottie/tablesorter/issues/1269).
* Mark: Actually include options this time! See [issue #1243](https://github.com/Mottie/tablesorter/issues/1243).
#### <a name="v2.27.1">Version 2.27.1</a> (7/31/2016)
* ColumnSelector: Fix undefined variable.
@ -160,52 +166,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Testing: Add filter anyMatch queries; Sadly unrelated to [issue #1267](https://github.com/Mottie/tablesorter/issues/1267).
* Bower: Oust meta warnings. Fixes [issue #1264](https://github.com/Mottie/tablesorter/issues/1264).
* Bower: Add recommending settings. Fixes [issue #1265](https://github.com/Mottie/tablesorter/issues/1265).
#### <a name="v2.26.6">Version 2.26.6</a> (7/11/2016)
* Global: Fix "updated" date in various widgets & pager.
* Docs:
* Cleanup links & license. Fixes [issue #1244](https://github.com/Mottie/tablesorter/issues/1244).
* Add button type to all buttons.
* Update to jQuery v3.1.0.
* Core: Prevent undefined error in natural sort. See [issue #1151](https://github.com/Mottie/tablesorter/issues/1151).
* Column Selector: Check visibility of cells after colspan. See [issue #1238](https://github.com/Mottie/tablesorter/issues/1238).
* Filter
* Filter formatter for Select2 v3.4.6 (v4.0+ still not supported)
* Now adheres to case sensitivity setting. See [issue #1237](https://github.com/Mottie/tablesorter/issues/1237).
* Update after filter row rebuilt. See [issue #1237](https://github.com/Mottie/tablesorter/issues/1237).
* Properly remove case-insensitive flag in regex.
* Properly escaped characters in regex.
* Use uncached `widgetOptions` after inside events.
* `filter_hideFilters` option now accepts a function. See [issue #477](https://github.com/Mottie/tablesorter/issues/477).
* Grouping:
* Fix js error when storage isn't loaded.
* Fix `group_collapsed` behavior. See [issue #1247](https://github.com/Mottie/tablesorter/issues/1247).
* Pager:
* Prevent ajax call on init. See [issue #1196](https://github.com/Mottie/tablesorter/issues/1196).
* Prevent setting "all" value before initialization. See [issue #1196](https://github.com/Mottie/tablesorter/issues/1196).
* Scroller: Save scroll position of window. See [issue #1240](https://github.com/Mottie/tablesorter/issues/1240).
* UITheme: Modify filter row after filterInit.
* View:
* Update to get the raw text value of a column without the span wrap.
* Trigger "viewComplete" in the view builder, not in init, otherwise you get no trigger when switching views.
* Replace all instances, not just the first one.
* Bower: Add license identifiers. See [pull #1239](https://github.com/Mottie/tablesorter/pull/1239); thanks [@bckfnn](https://github.com/bckfnn)!
#### <a name="v2.26.5">Version 2.26.5</a> (6/28/2016)
* Docs:
* Optimize png images using using zopflipng; see [pull #1230](https://github.com/Mottie/tablesorter/pull/1230) thanks [@PeterDaveHello](https://github.com/PeterDaveHello)!
* Add [`showProcessing`](https://mottie.github.io/tablesorter/docs/example-option-show-processing.html#display) toggle button.
* Add demo link for css3 animated `showProcessing` icons that actually works!
* Update to use jQuery v3.0.0.
* Readme: Update for previous version bump.
* Filter: Do not return altered filters variable. Fixes [issue #1237](https://github.com/Mottie/tablesorter/issues/1237).
* Grouping:
* Use correct pager row indexing. Fixes [issue #1232](https://github.com/Mottie/tablesorter/issues/1232).
* Prevent JS error with ajax & filtering. Fixes [issue #1232](https://github.com/Mottie/tablesorter/issues/1232).
* Fix lint issue.
* Resizable: Adjust handles on pager complete.
* Pager:
* Fix code alignment.
* Fix filtered regular expression definition.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 07-31-2016 (v2.27.1)*/
/*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
/* 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.27.1 *//*
/*! TableSorter (FORK) v2.27.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.1',
version : '2.27.2',
parsers : [],
widgets : [],
@ -2670,8 +2670,8 @@
});
// match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.addParser({
id : 'time',
is : function( str ) {

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.27.1 *//*
/*! TableSorter (FORK) v2.27.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.1',
version : '2.27.2',
parsers : [],
widgets : [],
@ -2668,8 +2668,8 @@
});
// match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.addParser({
id : 'time',
is : function( str ) {

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 07-31-2016 (v2.27.1)*/
/*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: mark.js - updated 7/31/2016 (v2.27.1) */
!function(a){"use strict";var b=a.tablesorter;b.mark={init:function(c){if("function"==typeof a.fn.mark){var d,e=c.widgetOptions.mark_tsUpdate;c.$table.on("filterEnd.tsmark"+(e?" "+e:""),function(a,d){b.mark.update(c,"filterEnd"===a.type?"":d)}),d="(?:<|=|>|\\||\"|\\'|\\s+(?:&&|-|"+(b.language.and||"and")+"|"+(b.language.or||"or")+"|"+(b.language.to||"to")+")\\s+)",b.mark.regex.filter=new RegExp(d,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(a){if(a instanceof RegExp){var b="".match(a);return null===b||b.length<5}return!1},cleanMatches:function(a){for(var b=[],c=a&&a.length||0;c--;)""!==a[c]&&(b[b.length]=a[c]);return b},update:function(c,d){var e={},f=b.mark.regex,g=c.$table.find("tbody tr").unmark().not("."+(c.widgetOptions.filter_filteredRow||"filtered"));d=d||a.tablesorter.getFilters(c.$table),a.each(d,function(a,d){if(d){var h=null,i=d,j=!1,k=a===c.columns?"":":nth-child("+(a+1)+")";if(f.pure.test(d)){i=f.pure.exec(d),".*"===i[1]&&(i[1]="");try{h=new RegExp(i[1],"gim"),i=new RegExp(i[1],i[2])}catch(a){i=null}return void(b.mark.checkRegex(h)&&g.children(k).markRegExp(i,e))}0===d.indexOf("~")?(j=!0,i=d.replace(/~/g,"").split("")):(d.indexOf("?")>-1&&(j=!0,d=d.replace(/\?/g,"\\S{1}")),d.indexOf("*")>-1&&(j=!0,d=d.replace(/\*/g,"\\S*")),i=d.split(f.filter)),j&&i&&i.length?(i=new RegExp(b.mark.cleanMatches(i).join(".*"),"gim"),b.mark.checkRegex(i)&&g.children(k).markRegExp(i,e)):g.children(k).mark(b.mark.cleanMatches(i),e)}})}},b.addWidget({id:"mark",options:{mark_tsUpdate:"markUpdate"},init:function(a,c,d,e){b.mark.init(d,e)},remove:function(a,b){var c=b.widgetOptions.mark_tsUpdate;b.$table.off("filterEnd.tsmark"+(c?" "+c:""))}})}(jQuery);
/*! Widget: mark.js - updated 8/1/2016 (v2.27.2) */
!function(a){"use strict";var b=a.tablesorter;b.mark={init:function(c){if("function"==typeof a.fn.mark){var d,e=c.widgetOptions.mark_tsUpdate;c.$table.on("filterEnd.tsmark"+(e?" "+e:""),function(a,d){b.mark.update(c,"filterEnd"===a.type?"":d)}),d="(?:<|=|>|\\||\"|\\'|\\s+(?:&&|-|"+(b.language.and||"and")+"|"+(b.language.or||"or")+"|"+(b.language.to||"to")+")\\s+)",b.mark.regex.filter=new RegExp(d,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(a){if(a instanceof RegExp){var b="".match(a);return null===b||b.length<5}return!1},cleanMatches:function(a){for(var b=[],c=a&&a.length||0;c--;)""!==a[c]&&(b[b.length]=a[c]);return b},update:function(c,d){var e={},f=c.widgetOptions,g="undefined"==typeof f.filter_ignoreCase||f.filter_ignoreCase,h=b.mark.regex,i=c.$table.find("tbody tr").unmark().not("."+(c.widgetOptions.filter_filteredRow||"filtered"));d=d||a.tablesorter.getFilters(c.$table),a.each(c.widgetOptions,function(a,b){var c=a.match(h.mark);c&&"undefined"!=typeof c[1]&&(e[c[1]]=b)}),a.each(d,function(a,d){if(d){var f=null,j=d,k=!1,l=a===c.columns?"":":nth-child("+(a+1)+")";if(h.pure.test(d)){j=h.pure.exec(d),".*"===j[1]&&(j[1]="");try{f=new RegExp(j[1],"gim"),j=new RegExp(j[1],j[2])}catch(a){j=null}return void(b.mark.checkRegex(f)&&i.children(l).markRegExp(j,e))}0===d.indexOf("~")?(k=!0,j=d.replace(/~/g,"").split("")):(d.indexOf("?")>-1&&(k=!0,d=d.replace(/\?/g,"\\S{1}")),d.indexOf("*")>-1&&(k=!0,d=d.replace(/\*/g,"\\S*")),j=d.split(h.filter)),k&&j&&j.length?(j=new RegExp(b.mark.cleanMatches(j).join(".*"),"gm"+(g?"i":"")),b.mark.checkRegex(j)&&i.children(l).markRegExp(j,e)):i.children(l).mark(b.mark.cleanMatches(j),e)}})}},b.addWidget({id:"mark",options:{mark_tsUpdate:"markUpdate"},init:function(a,c,d,e){b.mark.init(d,e)},remove:function(a,b){var c=b.widgetOptions.mark_tsUpdate;b.$table.off("filterEnd.tsmark"+(c?" "+c:""))}})}(jQuery);

View File

@ -484,7 +484,7 @@
</li>
<li><a href="example-widget-header-titles.html">Header titles widget</a> (v2.15.6; <span class="version updated">v2.24.4</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-lazyload.html">Lazyload widget</a> (<span class="version">v2.24.0</span>; <span class="version updated">v2.25.7</span>).</li>
<li><a href="example-widget-mark.html">Mark widget</a> (<span class="version">v2.27.1</span>).</li>
<li><a href="example-widget-mark.html">Mark widget</a> (<span class="version">v2.27.2</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.27.0</span>).</li>
<li>
<a href="example-widget-output.html">Output widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.27.0</span>).

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 07-31-2016 (v2.27.1)*/
/*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
/* 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.27.1 *//*
/*! TableSorter (FORK) v2.27.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.1',
version : '2.27.2',
parsers : [],
widgets : [],
@ -2676,8 +2676,8 @@
});
// match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.addParser({
id : 'time',
is : function( str ) {

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.27.1 *//*
/*! TableSorter (FORK) v2.27.2 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -22,7 +22,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.1',
version : '2.27.2',
parsers : [],
widgets : [],
@ -2658,8 +2658,8 @@
});
// match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
ts.addParser({
id : 'time',
is : function( str ) {

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 07-31-2016 (v2.27.1)*/
/*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {

View File

@ -1,4 +1,4 @@
/*! Widget: mark.js - updated 7/31/2016 (v2.27.1) *//*
/*! Widget: mark.js - updated 8/1/2016 (v2.27.2) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -51,6 +51,8 @@
},
update : function( c, filters ) {
var options = {},
wo = c.widgetOptions,
setIgnoreCase = typeof wo.filter_ignoreCase === 'undefined' ? true : wo.filter_ignoreCase,
regex = ts.mark.regex,
$rows = c.$table
.find( 'tbody tr' )
@ -59,6 +61,12 @@
filters = filters || $.tablesorter.getFilters( c.$table );
// extract & save mark options from widgetOptions (prefixed with "mark_")
// update dynamically
$.each( c.widgetOptions, function( key, val ) {
var matches = key.match( regex.mark );
if ( matches && typeof matches[1] !== 'undefined' ) {
options[ matches[1] ] = val;
}
});
$.each( filters, function( indx, filter ) {
if ( filter ) {
var testRegex = null,
@ -105,7 +113,10 @@
matches = filter.split( regex.filter );
}
if ( useRegex && matches && matches.length ) {
matches = new RegExp( ts.mark.cleanMatches( matches ).join( '.*' ), 'gim' );
matches = new RegExp(
ts.mark.cleanMatches( matches ).join( '.*' ),
'gm' + ( setIgnoreCase ? 'i' : '' )
);
if ( ts.mark.checkRegex( matches ) ) {
$rows.children( col ).markRegExp( matches, options );
}

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.27.1",
"version": "2.27.2",
"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",

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.27.1",
"version": "2.27.2",
"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",

View File

@ -461,7 +461,7 @@ jQuery(function($){
************************************************/
var p = ts.parsers,
// test by parser
parserTests = 85,
parserTests = 86,
// skipping metadata parser
sample1 = {
'text' : { 'test': 'test', 'TesT': 'test', '\u00e1 test': '\u00e1 test' },
@ -472,7 +472,7 @@ jQuery(function($){
'percent' : { '100%': 100, '22%': 22, '%2': 2, '2 %': 2, '(4%)': -4, '1,234.56 %': 1234.56 },
'usLongDate': { 'Feb 23, 1999': returnTime('Feb 23, 1999'), 'Feb 23, 1999 12:34': returnTime('Feb 23, 1999 12:34'), 'Feb 23, 1999 12:34 AM': returnTime('Feb 23, 1999 12:34 AM'), 'Feb 23, 1999 12:34:56 PM': returnTime('Feb 23, 1999 12:34:56 PM'), '01 Jan 2013': returnTime('01 Jan 2013') },
'shortDate' : { '1/2/2001': returnTime('1/2/2001'), '1 2 2001': returnTime('1/2/2001'), '1.2.2001': returnTime('1/2/2001'), '1-2-2001': returnTime('1/2/2001'), '1/2/2001 12:34 PM' : returnTime('1/2/2001 12:34 PM'), '1.2.2001 13:34' : returnTime('1/2/2001 13:34') },
'time' : { '12:34 AM': returnTime('2000/01/01 12:34 AM'), '1:00 pm': returnTime('2000/01/01 1:00 pm') },
'time' : { '12:34 AM': returnTime('2000/01/01 12:34 AM'), '1:00 pm': returnTime('2000/01/01 1:00 pm'), '09:54 PM': returnTime('2000/01/01 9:54 PM') },
'digit' : { '12': 12, '$23': 23, '&44^': 44, '#(33)': -33, '1,000': 1000, '12.34': 12.34 }
},
// switch ignoreCase, sortLocalCompare & shortDate 'ddmmyyyy'