Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2016-09-28 21:15:42 -05:00
commit e7ec0b8691
18 changed files with 78 additions and 59 deletions

11
.editorconfig Normal file
View File

@ -0,0 +1,11 @@
# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
root = true
[*]
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
insert_final_newline = true
max_line_length = 80

View File

@ -51,6 +51,7 @@ tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THE
* [Plugin for Rails](https://github.com/themilkman/jquery-tablesorter-rails). Maintained by [themilkman](https://github.com/themilkman).
* [UserFrosting](https://github.com/alexweissman/UserFrosting) (A secure, modern user management system for PHP that uses tablesorter) by [alexweissman](https://github.com/alexweissman).
* [Grav CMS](https://getgrav.org/): `bin/gpm install tablesorter` ([ref](https://github.com/Perlkonig/grav-plugin-tablesorter)).
### Contributing
@ -101,6 +102,14 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.27.8">Version 2.27.8</a> (9/28/2016)
* Core: minor code cleanup.
* Docs: remove code in duplicate example-widget-filter-custom. See [pull #1295](https://github.com/Mottie/tablesorter/pull/1295); thanks [@themilkman](https://github.com/themilkman)!
* ColumnSelector: `updateAll` properly updates the popup. See [Stack Overflow](http://stackoverflow.com/q/39669948/145346).
* Pager: Maintain filter focus on custom controls. Fixes [issue #1296](https://github.com/Mottie/tablesorter/issues/1296).
* Readme: Add link to Grav CMS. See [issue #1290](https://github.com/Mottie/tablesorter/issues/1290).
#### <a name="v2.27.7">Version 2.27.7</a> (9/23/2016)
* Core:
@ -139,10 +148,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Keyboard keys now include left, right, up, down, pageUp, pageDown,
home, or end.
* `pageKeyStep` option added. Number of pages to skip with pageUp or pageDown.
#### <a name="v2.27.5">Version 2.27.5</a> (8/22/2016)
* Readme: Update IRC link to a free client.
* Docs: Correct usage of Sugar v2.0+ `sortCollage`.
* Filter: Add any match search by column text - see [updated demo](https://mottie.github.io/tablesorter/docs/example-widget-filter-any-match.html#anymatch_searches).
* Parser: Fix JSHint issue.

View File

@ -1,5 +1,5 @@
/*!
* custom pager controls (beta) for Tablesorter - updated 9/1/2016 (v2.27.6)
* custom pager controls (beta) for Tablesorter - updated 9/28/2016 (v2.27.8)
initialize custom pager script BEFORE initializing tablesorter/tablesorter pager
custom pager looks like this:
1 | 2 5 | 6 | 7 99 | 100
@ -13,7 +13,7 @@
/*global jQuery: false */
;(function($) {
"use strict";
'use strict';
$.tablesorter = $.tablesorter || {};
@ -34,9 +34,13 @@ $.tablesorter.customPagerControls = function(settings) {
},
options = $.extend({}, defaults, settings),
$table = $(options.table),
$pager = $(options.pager);
$pager = $(options.pager),
focusOnPager = false;
$table
.on('filterStart', function() {
focusOnPager = false;
})
.on('pagerInitialized pagerComplete', function (e, c) {
var indx,
p = c.pager ? c.pager : c, // using widget
@ -83,11 +87,11 @@ $.tablesorter.customPagerControls = function(settings) {
});
}
}
$pager
.find('.pagecount')
.html(pages.html())
.find('.' + options.currentClass)
.focus();
$pager.find('.pagecount').html(pages.html());
if (focusOnPager) {
// don't focus on pager when using filter - fixes #1296
$pager.find('.' + options.currentClass).focus();
}
});
// set up pager controls
@ -103,6 +107,7 @@ $.tablesorter.customPagerControls = function(settings) {
})
.end()
.on('click', options.currentPage, function() {
focusOnPager = true;
var $el = $(this);
$el
.addClass(options.currentClass)
@ -118,11 +123,13 @@ $.tablesorter.customPagerControls = function(settings) {
// ignore arrows inside form elements
if (/input|select|textarea/i.test(events.target.nodeName) ||
!(events.which > 32 && events.which < 41)) {
focusOnPager = false;
return;
}
// only allow keyboard use if element inside of pager is focused
if ($(document.activeElement).closest(options.pager).is($pager)) {
events.preventDefault();
focusOnPager = true;
var key = events.which,
max = $table[0].config.totalRows,
$el = $pager.find(options.currentPage).filter('.' + options.currentClass),
@ -140,4 +147,5 @@ $.tablesorter.customPagerControls = function(settings) {
});
}
};
})(jQuery);
})(jQuery);

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/* 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.7 *//*
/*! TableSorter (FORK) v2.27.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.7',
version : '2.27.8',
parsers : [],
widgets : [],
@ -86,7 +86,7 @@
widgetClass : 'widget-{name}', // table class name template to match to include a widget
widgets : [], // method to add widgets, e.g. widgets: ['zebra']
widgetOptions : {
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
},
// *** callbacks
@ -103,8 +103,8 @@
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow', // header row to ignore; cells within this row will not be added to c.$headers
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers
cssIcon : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate
cssIconNone : '', // class name added to the icon when there is no column sort
@ -118,7 +118,7 @@
// *** selectors
selectorHeaders : '> thead th, > thead td',
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorRemove : '.remove-me',
// *** advanced

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.27.7 *//*
/*! TableSorter (FORK) v2.27.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.7',
version : '2.27.8',
parsers : [],
widgets : [],
@ -84,7 +84,7 @@
widgetClass : 'widget-{name}', // table class name template to match to include a widget
widgets : [], // method to add widgets, e.g. widgets: ['zebra']
widgetOptions : {
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
},
// *** callbacks
@ -101,8 +101,8 @@
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow', // header row to ignore; cells within this row will not be added to c.$headers
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers
cssIcon : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate
cssIconNone : '', // class name added to the icon when there is no column sort
@ -116,7 +116,7 @@
// *** selectors
selectorHeaders : '> thead th, > thead td',
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorRemove : '.remove-me',
// *** advanced

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/* 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

File diff suppressed because one or more lines are too long

View File

@ -110,10 +110,6 @@
// So typing in "a" will find "albert" but not "frank", both have a's; default is false
filter_startsWith : false,
// if false, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately
// below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus
filter_hideFilters : false,
// Add select box to 4th column (zero-based index)
// each option has an associated function that returns a boolean
// function variables:

View File

@ -456,7 +456,7 @@
<li><span class="label label-info">Beta</span> <a href="example-widget-chart.html">Chart Widget</a> (<span class="version">v2.19.0</span>; <span class="version updated">v2.24.0</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17).</li>
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.27.1</span>).</li>
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.27.8</span>).</li>
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.25.5</span>).</li>
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li>
<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>
@ -543,7 +543,7 @@
<h4>Work-in-progress</h4>
<ul>
<li><span class="label label-info">Beta</span> <a href="../beta-testing/example-pager-custom-controls.html">Custom pager control script</a> (<span class="version updated">v2.17.1</span>).</li>
<li><span class="label label-info">Beta</span> <a href="../beta-testing/example-pager-custom-controls.html">Custom pager control script</a> (<span class="version updated">v2.27.8</span>).</li>
<li><span class="label label-info">Alpha</span> <a href="../beta-testing/example-widget-column-reorder.html">Column reorder widget</a> - not working 100% with sticky headers.</li>
<li><span class="label label-info">Alpha</span> Column reorder using the <a class="external" href="http://stackoverflow.com/a/27770224/145346">dragtable widget</a> (non-mod version).</li>
</ul>

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/* 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.7 *//*
/*! TableSorter (FORK) v2.27.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.7',
version : '2.27.8',
parsers : [],
widgets : [],
@ -92,7 +92,7 @@
widgetClass : 'widget-{name}', // table class name template to match to include a widget
widgets : [], // method to add widgets, e.g. widgets: ['zebra']
widgetOptions : {
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
},
// *** callbacks
@ -109,8 +109,8 @@
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow', // header row to ignore; cells within this row will not be added to c.$headers
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers
cssIcon : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate
cssIconNone : '', // class name added to the icon when there is no column sort
@ -124,7 +124,7 @@
// *** selectors
selectorHeaders : '> thead th, > thead td',
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorRemove : '.remove-me',
// *** advanced

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.27.7 *//*
/*! TableSorter (FORK) v2.27.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -22,7 +22,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.7',
version : '2.27.8',
parsers : [],
widgets : [],
@ -74,7 +74,7 @@
widgetClass : 'widget-{name}', // table class name template to match to include a widget
widgets : [], // method to add widgets, e.g. widgets: ['zebra']
widgetOptions : {
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
zebra : [ 'even', 'odd' ] // zebra widget alternating row class names
},
// *** callbacks
@ -91,8 +91,8 @@
cssChildRow : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow', // header row to ignore; cells within this row will not be added to c.$headers
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
cssIgnoreRow : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers
cssIcon : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate
cssIconNone : '', // class name added to the icon when there is no column sort
@ -106,7 +106,7 @@
// *** selectors
selectorHeaders : '> thead th, > thead td',
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorSort : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
selectorRemove : '.remove-me',
// *** advanced

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-23-2016 (v2.27.7)*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {

View File

@ -1,4 +1,4 @@
/* Widget: columnSelector (responsive table widget) - updated 7/31/2016 (v2.27.1) *//*
/* Widget: columnSelector (responsive table widget) - updated 9/28/2016 (v2.27.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Justin Hallett & Rob Garrison
*/
@ -208,7 +208,9 @@
tsColSel.updateBreakpoints(c, wo);
c.$table
.off('updateAll' + namespace)
.on('updateAll' + namespace, function(){
.on('updateAll' + namespace, function() {
tsColSel.setupSelector(c, wo);
tsColSel.setupBreakpoints(c, wo);
tsColSel.updateBreakpoints(c, wo);
tsColSel.updateCols(c, wo);
});

View File

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