Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2018-01-30 17:54:44 -06:00
commit 322ae64e0e
22 changed files with 153 additions and 106 deletions

View File

@ -104,6 +104,19 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.29.5">Version 2.29.5</a> (2018-01-30)
* Docs:
* Update jQuery to v3.3.1.
* Add jQuery UI theme selector to scroller demo. See [issue #1506](https://github.com/Mottie/tablesorter/issues/1506).
* Minor fixes to links.
* Filter:
* Clean up language settings & allow empty strings. See [issue #1505](https://github.com/Mottie/tablesorter/issues/1505).
* Fix linting issue.
* Fix version numbering.
* Parser:
* Add radio parser. See [issue #1502(https://github.com/Mottie/tablesorter/issues/1502).
#### <a name="v2.29.4">Version 2.29.4</a> (2018-01-18)
* Docs:
@ -123,25 +136,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Add pager size all setting.
* Parser:
* Network parsers now return a text value. Fixes [issue #1494](https://github.com/Mottie/tablesorter/issues/1494).
#### <a name="v2.29.1">Version 2.29.1</a> &amp; <a name="v2.29.2">Version 2.29.2</a> (12/13/2017)
* Core:
* Fix non-typical use of selectorHeaders. See [issue #1459](https://github.com/Mottie/tablesorter/issues/1459).
* Update external header icons on sort. Fixes [issue #1483](https://github.com/Mottie/tablesorter/issues/1483).
* Remove an empty block.
* Filter:
* Select exact matches ignore "and" and "or" keywords. Fixes [issue #1486](https://github.com/Mottie/tablesorter/issues/1486).
* Resizable:
* `addLastColumn` stops adding handles to hidden columns. Fixes [issue #1485](https://github.com/Mottie/tablesorter/issues/1485).
* Scroller:
* Adjust columns on `filterInit`. See [issue #1468](https://github.com/Mottie/tablesorter/issues/1468).
* Vertical Group:
* New widget added. See [demo](https://mottie.github.io/tablesorter/docs/example-widget-vertical-group.html).
* Thanks to [aavmurphy](https://github.com/aavmurphy) for sharing the code. See [issue #1469](https://github.com/Mottie/tablesorter/issues/1469) and [PR #1470](https://github.com/Mottie/tablesorter/pull/1470).
* Docs:
* Fix pager example.
* List all contained IP parsers. Fixes [issue #1484](https://github.com/Mottie/tablesorter/issues/1484).
* Fix Bootstrap v2 demo; restored gyphs images.
* Meta:
* Update authors.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
/* 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.29.4 *//*
/*! TableSorter (FORK) v2.29.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.29.4',
version : '2.29.5',
parsers : [],
widgets : [],
@ -3282,7 +3282,7 @@
})(jQuery);
/*! Widget: filter - updated 12/13/2017 (v2.29.1) *//*
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3651,7 +3651,12 @@
var options, string, txt, $header, column, val, fxn, noSelect,
c = table.config,
wo = c.widgetOptions;
wo = c.widgetOptions,
processStr = function(prefix, str, suffix) {
str = str.trim();
// don't include prefix/suffix if str is empty
return str === '' ? '' : (prefix || '') + str + (suffix || '');
};
c.$table.addClass( 'hasFilters' );
c.lastSearch = [];
@ -3667,13 +3672,13 @@
$.extend( tsfRegex, {
child : new RegExp( c.cssChildRow ),
filtered : new RegExp( wo.filter_filteredRow ),
alreadyFiltered : new RegExp( '(\\s+(' + ts.language.or + '|-|' + ts.language.to + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-|' + ts.language.to + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
alreadyFiltered : new RegExp( '(\\s+(-' + processStr('|', ts.language.or) + processStr('|', ts.language.to) + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-' + processStr('|', ts.language.to) + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-' + processStr('|', ts.language.to) + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + processStr('', ts.language.and, '|') + '&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + processStr('', ts.language.and, '|') + '&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\|' + processStr('|\\s+', ts.language.or, '\\s+') + ')', 'i' ),
orSplit : new RegExp( '(?:\\|' + processStr('|\\s+(?:', ts.language.or, ')\\s+') + ')', 'gi' ),
iQuery : new RegExp( val, 'i' ),
igQuery : new RegExp( val, 'ig' ),
operTest : /^[<>]=?/,
@ -4054,7 +4059,7 @@
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
tmp = [ '{{label}}' ];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.29.4 *//*
/*! TableSorter (FORK) v2.29.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.29.4',
version : '2.29.5',
parsers : [],
widgets : [],

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -402,7 +402,7 @@
})(jQuery);
/*! Widget: filter - updated 12/13/2017 (v2.29.1) *//*
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -771,7 +771,12 @@
var options, string, txt, $header, column, val, fxn, noSelect,
c = table.config,
wo = c.widgetOptions;
wo = c.widgetOptions,
processStr = function(prefix, str, suffix) {
str = str.trim();
// don't include prefix/suffix if str is empty
return str === '' ? '' : (prefix || '') + str + (suffix || '');
};
c.$table.addClass( 'hasFilters' );
c.lastSearch = [];
@ -787,13 +792,13 @@
$.extend( tsfRegex, {
child : new RegExp( c.cssChildRow ),
filtered : new RegExp( wo.filter_filteredRow ),
alreadyFiltered : new RegExp( '(\\s+(' + ts.language.or + '|-|' + ts.language.to + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-|' + ts.language.to + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
alreadyFiltered : new RegExp( '(\\s+(-' + processStr('|', ts.language.or) + processStr('|', ts.language.to) + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-' + processStr('|', ts.language.to) + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-' + processStr('|', ts.language.to) + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + processStr('', ts.language.and, '|') + '&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + processStr('', ts.language.and, '|') + '&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\|' + processStr('|\\s+', ts.language.or, '\\s+') + ')', 'i' ),
orSplit : new RegExp( '(?:\\|' + processStr('|\\s+(?:', ts.language.or, ')\\s+') + ')', 'gi' ),
iQuery : new RegExp( val, 'i' ),
igQuery : new RegExp( val, 'ig' ),
operTest : /^[<>]=?/,
@ -1174,7 +1179,7 @@
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
tmp = [ '{{label}}' ];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
/*! Widget: filter, select2 formatter function - updated 1/18/2018 (v2.29.4) */
!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('<input class="filter" type="hidden">').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var i=!1,a=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(a)&&(i=!0,a=a.join("\0")),a=a.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),i&&(a=a.split("\0")),t.isEmptyObject(l.find(".select2").data())||(o.val(e.isArray(a)&&a.length&&""!==a.join("")?"/("+u+(a||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search"),l.find(".select2").select2("val",a),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",a))},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend("<label>"+s.cellText+"</label>"),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('<input class="select2 select2-'+c+'" type="hidden" />').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('<input class="select2 select2-'+c+'" type="hidden">').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("<label>"+s.cellText+"</label>")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -816,6 +816,7 @@ $.extend($.tablesorter.language, {
<h3>Notes</h3>
<ul>
<li><span class="label label-info">Info</span> These changes still require the user to enter spaces in the filter to perform the search, e.g. <code>1 à 10</code> (shows rows with numbers between 1 and 10).</li>
<li><span class="label label-info">Info</span> Extra spaces around the value will be trimmed and it is valid to set a value to an empty string; but this won't disable the filter type (use <code>-</code> for "to", <code>|</code> for "or" and <code>&amp;&amp;</code> for "and").</li>
<li>
<span class="label warning">Warning</span> These language values are added to a regular expression using <code>new RegExp()</code>:
<ul>

View File

@ -8,7 +8,6 @@
<script src="js/jquery-latest.min.js"></script>
<!-- Demo stuff -->
<link class="ui-theme" rel="stylesheet" href="css/jquery-ui.min.css">
<script src="js/jquery-ui.min.js"></script>
<link rel="stylesheet" href="css/jq.css">
<link href="css/prettify.css" rel="stylesheet">
@ -73,6 +72,23 @@
min-width: 60px;
}</style>
<!-- jQuery UI theme switcher: https://github.com/pontikis/jui_theme_switch/ -->
<style>
.switcher_container { padding: 5px; }
.switcher_list { padding: 2px; }
.switcher_label { margin-right: 5px; }
</style>
<script src="js/jquery.jui_theme_switch.min.js"></script>
<script>
$(function(){
$('#switcher').jui_theme_switch({
stylesheet_link_id : 'ui-theme',
switcher_label : 'Select jQuery UI Theme:',
default_theme : 'cupertino',
datasource_url : 'assets/theme_switcher.json'
});
});
</script>
<script id="js">$(function(){
$('.tablesorter').tablesorter({
@ -149,12 +165,14 @@ $(function() {
o += '<option value="' + t[i] + '">' + t[i] + '</option>';
}
$('select')
$('#theme')
.append(o)
.val('jui')
.change(function(){
var theme = $(this).val().toLowerCase();
// show jui select only if jQuery UI selected
$('#switcher').toggle(theme === 'jui');
// add class so the black border fits the theme
$('#main').attr( 'class', 'using-' + theme + '-theme' );
@ -542,9 +560,10 @@ $(function() {
<p><a href="#fixed-demo">Fixed columns</a> | <a href="#wide-demo">Full-width</a> | <a href="#narrow-demo">Half-width</a></p>
Choose Theme:
<select>
<select id="theme">
<option value="jui">Jquery UI</option>
</select><br>
<div id="switcher"></div>
<br>
<button id="jthb" type="button">Toggle</button> scroller_jumpToHeader : <span id="jth">true</span> (see the note above)<span class="remark">*</span>
<br>

View File

@ -467,7 +467,7 @@
<li><span class="label label-info">Beta</span> <a href="example-dragtable.html">Dragtable mod</a> - (jQuery UI widget for column reordering [<a class="external" href="http://stackoverflow.com/a/27770224/145346">ref</a>]; <span class="version">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.29.4</span>):
<ul>
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.29.4</span>).</li>
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.29.5</span>).</li>
<li><a href="example-widget-filter-any-match.html">external option (match any column)</a> (<span class="version">v2.13.3</span>; <span class="version updated">v2.27.5</span>).</li>
<li><a href="example-widget-filter-external-inputs.html">external inputs</a> (<span class="version">v2.14</span>; <span class="version updated">v2.18.0</span>).</li>
<li><a href="example-widget-filter-custom.html">custom filter functions</a> (v2.3.6; <span class="version updated">v2.22.0</span>).</li>
@ -542,7 +542,7 @@
<li><a href="example-parsers-file-type.html">File type &amp extension parsers</a> (<span class="version">v2.13</span>; <span class="version updated">v2.24.4</span>).</li>
<li><a href="example-parsers-named-numbers.html">Huge Numbers parser</a> (<span class="version">v2.25.5</span>).</li>
<li><a href="example-parsers-ignore-articles.html">Ignore leading articles parser</a> (Ignore &quot;A&quot;, &quot;An&quot; and &quot;The&quot; in titles) (<span class="version">v2.8</span>).</li>
<li><a href="example-widget-grouping.html">Input/select parsers</a> (used by Grouping rows widget) (<span class="version">v2.8</span>; <span class="version updated">v2.25.9</span>).</li>
<li><a href="example-widget-grouping.html">Input/select parsers</a> (used by Grouping rows widget) (<span class="version">v2.8</span>; <span class="version updated">v2.29.5</span>).</li>
<li><a href="example-parsers-globalize.html">jQuery Globalize</a> (number &amp; date parsers; <span class="version">v2.22.0</span>; <span class="version updated">v2.25.0</span>).</li>
<li><a href="example-parsers-leading-zeros.html">Leading zeros parser</a> (<span class="version">v2.28.6</span>).</li>
<li><a href="example-parsers-metric.html">Metric parser</a> (<span class="version">v2.8</span>).</li>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
/* 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.29.4 *//*
/*! TableSorter (FORK) v2.29.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.29.4',
version : '2.29.5',
parsers : [],
widgets : [],
@ -3288,7 +3288,7 @@
})(jQuery);
/*! Widget: filter - updated 12/13/2017 (v2.29.1) *//*
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3657,7 +3657,12 @@
var options, string, txt, $header, column, val, fxn, noSelect,
c = table.config,
wo = c.widgetOptions;
wo = c.widgetOptions,
processStr = function(prefix, str, suffix) {
str = str.trim();
// don't include prefix/suffix if str is empty
return str === '' ? '' : (prefix || '') + str + (suffix || '');
};
c.$table.addClass( 'hasFilters' );
c.lastSearch = [];
@ -3673,13 +3678,13 @@
$.extend( tsfRegex, {
child : new RegExp( c.cssChildRow ),
filtered : new RegExp( wo.filter_filteredRow ),
alreadyFiltered : new RegExp( '(\\s+(' + ts.language.or + '|-|' + ts.language.to + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-|' + ts.language.to + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
alreadyFiltered : new RegExp( '(\\s+(-' + processStr('|', ts.language.or) + processStr('|', ts.language.to) + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-' + processStr('|', ts.language.to) + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-' + processStr('|', ts.language.to) + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + processStr('', ts.language.and, '|') + '&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + processStr('', ts.language.and, '|') + '&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\|' + processStr('|\\s+', ts.language.or, '\\s+') + ')', 'i' ),
orSplit : new RegExp( '(?:\\|' + processStr('|\\s+(?:', ts.language.or, ')\\s+') + ')', 'gi' ),
iQuery : new RegExp( val, 'i' ),
igQuery : new RegExp( val, 'ig' ),
operTest : /^[<>]=?/,
@ -4060,7 +4065,7 @@
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
tmp = [ '{{label}}' ];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.29.4 *//*
/*! TableSorter (FORK) v2.29.5 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -22,7 +22,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.29.4',
version : '2.29.5',
parsers : [],
widgets : [],

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -408,7 +408,7 @@
})(jQuery);
/*! Widget: filter - updated 12/13/2017 (v2.29.1) *//*
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -777,7 +777,12 @@
var options, string, txt, $header, column, val, fxn, noSelect,
c = table.config,
wo = c.widgetOptions;
wo = c.widgetOptions,
processStr = function(prefix, str, suffix) {
str = str.trim();
// don't include prefix/suffix if str is empty
return str === '' ? '' : (prefix || '') + str + (suffix || '');
};
c.$table.addClass( 'hasFilters' );
c.lastSearch = [];
@ -793,13 +798,13 @@
$.extend( tsfRegex, {
child : new RegExp( c.cssChildRow ),
filtered : new RegExp( wo.filter_filteredRow ),
alreadyFiltered : new RegExp( '(\\s+(' + ts.language.or + '|-|' + ts.language.to + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-|' + ts.language.to + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
alreadyFiltered : new RegExp( '(\\s+(-' + processStr('|', ts.language.or) + processStr('|', ts.language.to) + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-' + processStr('|', ts.language.to) + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-' + processStr('|', ts.language.to) + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + processStr('', ts.language.and, '|') + '&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + processStr('', ts.language.and, '|') + '&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\|' + processStr('|\\s+', ts.language.or, '\\s+') + ')', 'i' ),
orSplit : new RegExp( '(?:\\|' + processStr('|\\s+(?:', ts.language.or, ')\\s+') + ')', 'gi' ),
iQuery : new RegExp( val, 'i' ),
igQuery : new RegExp( val, 'ig' ),
operTest : /^[<>]=?/,
@ -1180,7 +1185,7 @@
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
tmp = [ '{{label}}' ];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),

View File

@ -1,4 +1,4 @@
/*! Parser: input & select - updated 5/16/2017 (v2.28.10) *//*
/*! Parser: input & select - updated 2018-01-30 (v2.29.5) *//*
* for jQuery 1.7+ & tablesorter 2.7.11+
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
*/
@ -66,6 +66,19 @@
type : 'text'
});
$.tablesorter.addParser({
id: 'radio',
is: function() {
return false;
},
format: function(txt, table, cell) {
var $input = $(cell).find('input:checked');
return $input.length ? $input.val() : txt;
},
parsed: true,
type: 'text'
});
// Custom parser which returns the currently selected options
// updated dynamically using the 'change' function below
$.tablesorter.addParser({

View File

@ -1,4 +1,4 @@
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) *//*
/*! Widget: filter, select2 formatter function - updated 1/18/2018 (v2.29.4) *//*
* requires: jQuery 1.7.2+, tableSorter (FORK) 2.16+, filter widget 2.16+
and select2 v3.4.6+ plugin (this code is NOT compatible with select2 v4+)
*/

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 12/13/2017 (v2.29.1) *//*
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -367,7 +367,12 @@
var options, string, txt, $header, column, val, fxn, noSelect,
c = table.config,
wo = c.widgetOptions;
wo = c.widgetOptions,
processStr = function(prefix, str, suffix) {
str = str.trim();
// don't include prefix/suffix if str is empty
return str === '' ? '' : (prefix || '') + str + (suffix || '');
};
c.$table.addClass( 'hasFilters' );
c.lastSearch = [];
@ -383,13 +388,13 @@
$.extend( tsfRegex, {
child : new RegExp( c.cssChildRow ),
filtered : new RegExp( wo.filter_filteredRow ),
alreadyFiltered : new RegExp( '(\\s+(' + ts.language.or + '|-|' + ts.language.to + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-|' + ts.language.to + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
alreadyFiltered : new RegExp( '(\\s+(-' + processStr('|', ts.language.or) + processStr('|', ts.language.to) + ')\\s+)', 'i' ),
toTest : new RegExp( '\\s+(-' + processStr('|', ts.language.to) + ')\\s+', 'i' ),
toSplit : new RegExp( '(?:\\s+(?:-' + processStr('|', ts.language.to) + ')\\s+)', 'gi' ),
andTest : new RegExp( '\\s+(' + processStr('', ts.language.and, '|') + '&&)\\s+', 'i' ),
andSplit : new RegExp( '(?:\\s+(?:' + processStr('', ts.language.and, '|') + '&&)\\s+)', 'gi' ),
orTest : new RegExp( '(\\|' + processStr('|\\s+', ts.language.or, '\\s+') + ')', 'i' ),
orSplit : new RegExp( '(?:\\|' + processStr('|\\s+(?:', ts.language.or, ')\\s+') + ')', 'gi' ),
iQuery : new RegExp( val, 'i' ),
igQuery : new RegExp( val, 'ig' ),
operTest : /^[<>]=?/,

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.29.4",
"version": "2.29.5",
"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.29.4",
"version": "2.29.5",
"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",