mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-12-05 05:04:20 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
1c2e6dfaa2
102
README.md
102
README.md
@ -6,29 +6,29 @@ tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THE
|
||||
|
||||
* Because of the change to the internal cache, the tablesorter v2.16+ core, filter widget and pager (both plugin & widget) will only work with the same version or newer files.
|
||||
|
||||
### [Documentation](//mottie.github.io/tablesorter/docs/)
|
||||
### [Documentation](https://mottie.github.io/tablesorter/docs/)
|
||||
|
||||
* See the [full documentation](//mottie.github.io/tablesorter/docs/).
|
||||
* All of the [original document pages](//tablesorter.com/docs/) have been included.
|
||||
* Information from my blog post on [undocumented options](//wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html) and lots of new demos have also been included.
|
||||
* Change log moved from included text file into the [wiki documentation](//github.com/Mottie/tablesorter/wiki/Changes).
|
||||
* See the [full documentation](https://mottie.github.io/tablesorter/docs/).
|
||||
* All of the [original document pages](http://tablesorter.com/docs/) have been included.
|
||||
* Information from my blog post on [undocumented options](https://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html) and lots of new demos have also been included.
|
||||
* Change log moved from included text file into the [wiki documentation](https://github.com/Mottie/tablesorter/wiki/Changes).
|
||||
|
||||
### Demos
|
||||
|
||||
* [Basic alpha-numeric sort Demo](//mottie.github.com/tablesorter/).
|
||||
* Links to demo pages can be found within the main [documentation](//mottie.github.io/tablesorter/docs/).
|
||||
* More demos & playgrounds - updated in the [wiki pages](//github.com/Mottie/tablesorter/wiki).
|
||||
* [Basic alpha-numeric sort Demo](https://mottie.github.io/tablesorter/).
|
||||
* Links to demo pages can be found within the main [documentation](https://mottie.github.io/tablesorter/docs/).
|
||||
* More demos & playgrounds - updated in the [wiki pages](https://github.com/Mottie/tablesorter/wiki).
|
||||
|
||||
### Features
|
||||
|
||||
* Multi-column alphanumeric sorting and filtering.
|
||||
* Multi-tbody sorting - see the [options](//mottie.github.io/tablesorter/docs/index.html#options) table on the main document page.
|
||||
* Supports [Bootstrap v2 and 3](//mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html).
|
||||
* Parsers for sorting text, alphanumeric text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats) & time. [Add your own easily](//mottie.github.io/tablesorter/docs/example-parsers.html).
|
||||
* Inline editing - see [demo](//mottie.github.io/tablesorter/docs/example-widget-editable.html).
|
||||
* Multi-tbody sorting - see the [options](https://mottie.github.io/tablesorter/docs/index.html#options) table on the main document page.
|
||||
* Supports [Bootstrap v2 and 3](https://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html).
|
||||
* Parsers for sorting text, alphanumeric text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats) & time. [Add your own easily](https://mottie.github.io/tablesorter/docs/example-parsers.html).
|
||||
* Inline editing - see [demo](https://mottie.github.io/tablesorter/docs/example-widget-editable.html).
|
||||
* Support for ROWSPAN and COLSPAN on TH elements.
|
||||
* Support secondary "hidden" sorting (e.g., maintain alphabetical sort when sorting on other criteria).
|
||||
* Extensibility via [widget system](//mottie.github.io/tablesorter/docs/example-widgets.html).
|
||||
* Extensibility via [widget system](https://mottie.github.io/tablesorter/docs/example-widgets.html).
|
||||
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+, Chrome 5.0+.
|
||||
* Small code size, starting at 25K minified.
|
||||
* Works with jQuery 1.2.6+ (jQuery 1.4.1+ needed with some widgets).
|
||||
@ -37,20 +37,20 @@ tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THE
|
||||
### Licensing
|
||||
|
||||
* Copyright (c) 2007 Christian Bach.
|
||||
* Original examples and docs at: [http://tablesorter.com](//tablesorter.com).
|
||||
* Dual licensed under the [MIT](//www.opensource.org/licenses/mit-license.php) and [GPL](//www.gnu.org/licenses/gpl.html) licenses.
|
||||
* Original examples and docs at: [http://tablesorter.com](http://tablesorter.com).
|
||||
* Dual licensed under the [MIT](https://opensource.org/licenses/mit-license.php) or [GPL](https://www.gnu.org/licenses/gpl.html) licenses (pick one).
|
||||
|
||||
### Download
|
||||
|
||||
* Get all files: [zip](//github.com/Mottie/tablesorter/archive/master.zip) or [tar.gz](//github.com/Mottie/tablesorter/archive/master.tar.gz).
|
||||
* Use [bower](http://bower.io/): `bower install jquery.tablesorter`.
|
||||
* Use [node.js](http://nodejs.org/): `npm install tablesorter`.
|
||||
* Get all files: [zip](https://github.com/Mottie/tablesorter/archive/master.zip) or [tar.gz](https://github.com/Mottie/tablesorter/archive/master.tar.gz).
|
||||
* Use [bower](https://bower.io/): `bower install jquery.tablesorter`.
|
||||
* Use [node.js](https://nodejs.org/): `npm install tablesorter`.
|
||||
* CDNJS: [https://cdnjs.com/libraries/jquery.tablesorter](https://cdnjs.com/libraries/jquery.tablesorter).
|
||||
|
||||
### Related Projects
|
||||
|
||||
* [Plugin for Rails](//github.com/themilkman/jquery-tablesorter-rails). Maintained by [themilkman](//github.com/themilkman).
|
||||
* [UserFrosting](//github.com/alexweissman/UserFrosting) (A secure, modern user management system for PHP that uses tablesorter) by [alexweissman](//github.com/alexweissman).
|
||||
* [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).
|
||||
|
||||
### Contributing
|
||||
|
||||
@ -63,23 +63,23 @@ If you would like to contribute, please...
|
||||
|
||||
### Special Thanks
|
||||
|
||||
* Big shout-out to [Nick Craver](//github.com/NickCraver) for getting rid of the `eval()` function that was previously needed for multi-column sorting.
|
||||
* Big thanks to [thezoggy](//github.com/thezoggy) for helping with code, themes and providing valuable feedback.
|
||||
* Big thanks to [ThsSin-](//github.com/TheSin-) for taking over for a while and also providing valuable feedback.
|
||||
* Big shout-out to [Nick Craver](https://github.com/NickCraver) for getting rid of the `eval()` function that was previously needed for multi-column sorting.
|
||||
* Big thanks to [thezoggy](https://github.com/thezoggy) for helping with code, themes and providing valuable feedback.
|
||||
* Big thanks to [ThsSin-](https://github.com/TheSin-) for taking over for a while and also providing valuable feedback.
|
||||
* Thanks to [prijutme4ty](https://github.com/prijutme4ty) for numerous contributions!
|
||||
* Also extra thanks to [christhomas](//github.com/christhomas) and [Lynesth](//github.com/Lynesth) for help with code.
|
||||
* Also extra thanks to [christhomas](https://github.com/christhomas) and [Lynesth](https://github.com/Lynesth) for help with code.
|
||||
* And, of course thanks to everyone else that has contributed, and continues to contribute to this forked project!
|
||||
|
||||
### Questions?
|
||||
|
||||
[![irc-image]][irc-url] [![gitter-image]][gitter-url] [![stackoverflow-image]][stackoverflow-url]
|
||||
|
||||
* Check the [FAQ](//github.com/Mottie/tablesorter/wiki/FAQ) page.
|
||||
* Search the [main documentation](//mottie.github.io/tablesorter/docs/) (click the menu button in the upper left corner).
|
||||
* Search the [issues](//github.com/Mottie/tablesorter/issues) to see if the question or problem has been brought up before, and hopefully resolved.
|
||||
* Check the [FAQ](https://github.com/Mottie/tablesorter/wiki/FAQ) page.
|
||||
* Search the [main documentation](https://mottie.github.io/tablesorter/docs/) (click the menu button in the upper left corner).
|
||||
* Search the [issues](https://github.com/Mottie/tablesorter/issues) to see if the question or problem has been brought up before, and hopefully resolved.
|
||||
* If someone is available, ask your question in the `#tablesorter` IRC channel at freenode.net.
|
||||
* Ask your question at [Stackoverflow](//stackoverflow.com/questions/tagged/tablesorter) using a tablesorter tag.
|
||||
* Please don't open a [new issue](//github.com/Mottie/tablesorter/issues) unless it really is an issue with the plugin, or a feature request. Thanks!
|
||||
* Ask your question at [Stackoverflow](https://stackoverflow.com/questions/tagged/tablesorter) using a tablesorter tag.
|
||||
* Please don't open a [new issue](https://github.com/Mottie/tablesorter/issues) unless it really is an issue with the plugin, or a feature request. Thanks!
|
||||
|
||||
[npm-url]: https://npmjs.org/package/tablesorter
|
||||
[npm-image]: https://img.shields.io/npm/v/tablesorter.svg
|
||||
@ -99,7 +99,38 @@ If you would like to contribute, please...
|
||||
|
||||
### Recent Changes
|
||||
|
||||
View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes).
|
||||
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
|
||||
|
||||
#### <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)
|
||||
|
||||
@ -122,14 +153,3 @@ View the [complete change log here](//github.com/Mottie/tablesorter/wiki/Changes
|
||||
#### <a name="v2.26.4">Version 2.26.4</a> (6/15/2016)
|
||||
|
||||
* Version bump due to merging issues.
|
||||
|
||||
#### <a name="v2.26.3">Version 2.26.3</a> (6/15/2016)
|
||||
|
||||
* Distribution: Provide source css & js files on CDNJS. Fixes [issue #1222](https://github.com/Mottie/tablesorter/issues/1222).
|
||||
* Readme:
|
||||
* Make changelog link clickable. See [pull #1221](https://github.com/Mottie/tablesorter/pull/1221); thanks [@aried3r](https://github.com/aried3r)!
|
||||
* Update badge for ZenHub.
|
||||
* Docs: Update main page to use jQuery 3.0.0-rc1 & add migrate.
|
||||
* Filter: Fix select2 lint issue.
|
||||
* Scroller: Hide `<col>` with hidden columns. Fixes [issue #1229](https://github.com/Mottie/tablesorter/issues/1229).
|
||||
* Grunt: Update dependencies & fix pager indentation.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* tablesorter (FORK) pager plugin
|
||||
* updated 6/28/2015 (v2.26.5)
|
||||
* updated 7/11/2016 (v2.26.6)
|
||||
*/
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function($) {
|
||||
@ -783,7 +783,7 @@
|
||||
// set to either set or get value
|
||||
parsePageSize = function( p, size, mode ) {
|
||||
var s = parseInt( size, 10 ) || p.size || p.settings.size || 10;
|
||||
return /all/i.test( size ) || s === p.totalRows ?
|
||||
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
||||
// "get" to get `p.size` or "set" to set `p.$size.val()`
|
||||
'all' : ( mode === 'get' ? s : p.size );
|
||||
},
|
||||
|
@ -8,6 +8,10 @@
|
||||
"dist/js/jquery.tablesorter.combined.js",
|
||||
"dist/css/theme.blue.min.css"
|
||||
],
|
||||
"license" : [
|
||||
"MIT",
|
||||
"GPL-2.0+"
|
||||
],
|
||||
"ignore": [
|
||||
"/node_modules",
|
||||
"/bower_components",
|
||||
|
File diff suppressed because one or more lines are too long
72
dist/js/jquery.tablesorter.combined.js
vendored
72
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
|
||||
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -10,7 +10,7 @@
|
||||
}
|
||||
}(function($) {
|
||||
|
||||
/*! TableSorter (FORK) v2.26.5 *//*
|
||||
/*! TableSorter (FORK) v2.26.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -33,7 +33,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.26.5',
|
||||
version : '2.26.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1771,14 +1771,14 @@
|
||||
regex = ts.regex;
|
||||
// first try and sort Hex codes
|
||||
if ( regex.hex.test( b ) ) {
|
||||
aNum = parseInt( a.match( regex.hex ), 16 );
|
||||
bNum = parseInt( b.match( regex.hex ), 16 );
|
||||
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
||||
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
||||
if ( aNum < bNum ) { return -1; }
|
||||
if ( aNum > bNum ) { return 1; }
|
||||
}
|
||||
// chunk/tokenize
|
||||
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
max = Math.max( aNum.length, bNum.length );
|
||||
// natural sorting through split numeric strings and default strings
|
||||
for ( indx = 0; indx < max; indx++ ) {
|
||||
@ -2833,7 +2833,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -2891,7 +2891,7 @@
|
||||
id: 'uitheme',
|
||||
priority: 10,
|
||||
format: function(table, c, wo) {
|
||||
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
themesAll = ts.themes,
|
||||
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
||||
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
||||
@ -2958,10 +2958,20 @@
|
||||
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
||||
.addClass(themes.icons || '');
|
||||
}
|
||||
if ($table.hasClass('hasFilters')) {
|
||||
// filter widget initializes after uitheme
|
||||
if (c.widgets.indexOf('filter') > -1) {
|
||||
tmp = function() {
|
||||
$table.children('thead').children('.' + ts.css.filterRow)
|
||||
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
||||
.addClass(themes.filterRow || '');
|
||||
};
|
||||
if (wo.filter_initialized) {
|
||||
tmp();
|
||||
} else {
|
||||
$table.one('filterInit', function() {
|
||||
tmp();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < c.columns; i++) {
|
||||
@ -3098,7 +3108,7 @@
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -3885,12 +3895,13 @@
|
||||
.attr( 'data-lastSearchTime', new Date().getTime() )
|
||||
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
||||
.bind( 'keydown' + namespace, function( event ) {
|
||||
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
|
||||
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
||||
// prevent keypress event
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bind( 'keyup' + namespace, function( event ) {
|
||||
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||
// emulate what webkit does.... escape clears the filter
|
||||
@ -3917,7 +3928,8 @@
|
||||
// don't get cached data, in case data-column changes dynamically
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
if ( table.config.widgetOptions.filter_initialized &&
|
||||
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
||||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
||||
( event.type === 'input' && this.value === '' ) ) {
|
||||
@ -3966,7 +3978,7 @@
|
||||
// show/hide filter row as needed
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
|
||||
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
@ -3999,26 +4011,34 @@
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideFiltersCheck: function( c ) {
|
||||
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
||||
var val = c.widgetOptions.filter_hideFilters( c );
|
||||
if (typeof val === 'boolean') {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return ts.getFilters( c.$table ).join( '' ) === '';
|
||||
},
|
||||
hideFilters: function( c, $table ) {
|
||||
var timer,
|
||||
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
|
||||
$row
|
||||
var timer;
|
||||
( $table || c.$table )
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
$row = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
$filterRow.removeClass( tscss.filterRowHide );
|
||||
$row.removeClass( tscss.filterRowHide );
|
||||
} else {
|
||||
// don't hide if input has focus
|
||||
// $( ':focus' ) needs jQuery 1.6+
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
||||
// don't hide row if any filter has a value
|
||||
if ( c.lastCombinedFilter === '' ) {
|
||||
$filterRow.addClass( tscss.filterRowHide );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
||||
}
|
||||
}
|
||||
}, 200 );
|
||||
@ -4030,9 +4050,7 @@
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
||||
}, 200 );
|
||||
});
|
||||
},
|
||||
@ -5226,7 +5244,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
8
dist/js/jquery.tablesorter.combined.min.js
vendored
8
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
12
dist/js/jquery.tablesorter.js
vendored
12
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
||||
}
|
||||
}(function($) {
|
||||
|
||||
/*! TableSorter (FORK) v2.26.5 *//*
|
||||
/*! TableSorter (FORK) v2.26.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -31,7 +31,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.26.5',
|
||||
version : '2.26.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1769,14 +1769,14 @@
|
||||
regex = ts.regex;
|
||||
// first try and sort Hex codes
|
||||
if ( regex.hex.test( b ) ) {
|
||||
aNum = parseInt( a.match( regex.hex ), 16 );
|
||||
bNum = parseInt( b.match( regex.hex ), 16 );
|
||||
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
||||
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
||||
if ( aNum < bNum ) { return -1; }
|
||||
if ( aNum > bNum ) { return 1; }
|
||||
}
|
||||
// chunk/tokenize
|
||||
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
max = Math.max( aNum.length, bNum.length );
|
||||
// natural sorting through split numeric strings and default strings
|
||||
for ( indx = 0; indx < max; indx++ ) {
|
||||
|
4
dist/js/jquery.tablesorter.min.js
vendored
4
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
60
dist/js/jquery.tablesorter.widgets.js
vendored
60
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
|
||||
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -101,7 +101,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -159,7 +159,7 @@
|
||||
id: 'uitheme',
|
||||
priority: 10,
|
||||
format: function(table, c, wo) {
|
||||
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
themesAll = ts.themes,
|
||||
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
||||
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
||||
@ -226,10 +226,20 @@
|
||||
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
||||
.addClass(themes.icons || '');
|
||||
}
|
||||
if ($table.hasClass('hasFilters')) {
|
||||
// filter widget initializes after uitheme
|
||||
if (c.widgets.indexOf('filter') > -1) {
|
||||
tmp = function() {
|
||||
$table.children('thead').children('.' + ts.css.filterRow)
|
||||
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
||||
.addClass(themes.filterRow || '');
|
||||
};
|
||||
if (wo.filter_initialized) {
|
||||
tmp();
|
||||
} else {
|
||||
$table.one('filterInit', function() {
|
||||
tmp();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < c.columns; i++) {
|
||||
@ -366,7 +376,7 @@
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -1153,12 +1163,13 @@
|
||||
.attr( 'data-lastSearchTime', new Date().getTime() )
|
||||
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
||||
.bind( 'keydown' + namespace, function( event ) {
|
||||
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
|
||||
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
||||
// prevent keypress event
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bind( 'keyup' + namespace, function( event ) {
|
||||
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||
// emulate what webkit does.... escape clears the filter
|
||||
@ -1185,7 +1196,8 @@
|
||||
// don't get cached data, in case data-column changes dynamically
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
if ( table.config.widgetOptions.filter_initialized &&
|
||||
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
||||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
||||
( event.type === 'input' && this.value === '' ) ) {
|
||||
@ -1234,7 +1246,7 @@
|
||||
// show/hide filter row as needed
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
|
||||
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
@ -1267,26 +1279,34 @@
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideFiltersCheck: function( c ) {
|
||||
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
||||
var val = c.widgetOptions.filter_hideFilters( c );
|
||||
if (typeof val === 'boolean') {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return ts.getFilters( c.$table ).join( '' ) === '';
|
||||
},
|
||||
hideFilters: function( c, $table ) {
|
||||
var timer,
|
||||
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
|
||||
$row
|
||||
var timer;
|
||||
( $table || c.$table )
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
$row = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
$filterRow.removeClass( tscss.filterRowHide );
|
||||
$row.removeClass( tscss.filterRowHide );
|
||||
} else {
|
||||
// don't hide if input has focus
|
||||
// $( ':focus' ) needs jQuery 1.6+
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
||||
// don't hide row if any filter has a value
|
||||
if ( c.lastCombinedFilter === '' ) {
|
||||
$filterRow.addClass( tscss.filterRowHide );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
||||
}
|
||||
}
|
||||
}, 200 );
|
||||
@ -1298,9 +1318,7 @@
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
||||
}, 200 );
|
||||
});
|
||||
},
|
||||
@ -2494,7 +2512,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
6
dist/js/jquery.tablesorter.widgets.min.js
vendored
6
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-columnSelector.min.js
vendored
2
dist/js/widgets/widget-columnSelector.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
/*! Widget: filter, select2 formatter function - updated 5/28/2016 (v2.26.2) */
|
||||
!function(a){"use strict";var b=a.tablesorter||{};b.filterFormatter=b.filterFormatter||{},b.filterFormatter.select2=function(c,d,e){var f,g,h=a.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},e),i=c.closest("table")[0].config,j=i.widgetOptions,k=a('<input class="filter" type="hidden">').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=this.value;a=a.replace(/[\/()$^]/g,"").split("|"),c.find(".select2").select2("val",a),q()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=[],o=h.match?"":"^",p=h.match?"":"$",q=function(){var b=!1,d=c.find(".select2").select2("val")||h.value||"";a.isArray(d)&&(b=!0,d=d.join("\x00")),d=d.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),b&&(d=d.split("\x00")),k.val(a.isArray(d)&&d.length&&""!==d.join("")?"/("+o+(d||[]).join(p+"|"+o)+p+")/":"").trigger("search").end().find(".select2").select2("val",d),n.length&&n.find(".select2").select2("val",d)},r=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:""+b.parsed,text:b.text})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend("<label>"+h.cellText+"</label>"),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(r(),m&&i.$table.bind("filterEnd",function(){r(),c.add(n).find(".select2").select2(h)})),a('<input class="select2 select2-'+d+'" type="hidden" />').val(h.value).appendTo(c).select2(h).bind("change",function(){q()}),i.$table.bind("filterFomatterUpdate",function(){var a=i.$table.data("lastSearch")[d]||"";a=a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/$/g,"").split("|"),c.find(".select2").select2("val",a),q(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){n=i.widgetOptions.$sticky.find("."+b.css.filterRow).children().eq(d).empty(),a('<input class="select2 select2-'+d+'" type="hidden">').val(h.value).appendTo(n).select2(h).bind("change",function(){c.find(".select2").select2("val",n.find(".select2").select2("val")),q()}),h.cellText&&n.prepend("<label>"+h.cellText+"</label>")}),i.$table.bind("filterReset",function(){c.find(".select2").select2("val",h.value||""),setTimeout(function(){q()},0)}),q(),k}}(jQuery);
|
||||
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
|
||||
!function(a){"use strict";var b=a.tablesorter||{};b.filterFormatter=b.filterFormatter||{},b.filterFormatter.select2=function(c,d,e){var f,g,h=a.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},e),i=c.addClass("select2col"+d).closest("table")[0].config,j=i.widgetOptions,k=a('<input class="filter" type="hidden">').appendTo(c).bind("change"+i.namespace+"filter",function(){var a=q(this.value);i.$table.find(".select2col"+d+" .select2").select2("val",a),r()}),l=i.$headerIndexed[d],m=l.hasClass(j.filter_onlyAvail),n=h.match?"":"^",o=h.match?"":"$",p=j.filter_ignoreCase?"i":"",q=function(a){return a.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},r=function(){var b=!1,c=i.$table.find(".select2col"+d+" .select2").select2("val")||h.value||"";a.isArray(c)&&(b=!0,c=c.join("\x00")),c=c.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),b&&(c=c.split("\x00")),k.val(a.isArray(c)&&c.length&&""!==c.join("")?"/("+n+(c||[]).join(o+"|"+n)+o+")/"+p:"").trigger("search").end().find(".select2").select2("val",c),i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val",c)},s=function(){g=[],f=b.filter.getOptionSource(i.$table[0],d,m)||[],a.each(f,function(a,b){g.push({id:""+b.parsed,text:b.text})}),h.data=g};return l.toggleClass("filter-match",h.match),h.cellText&&c.prepend("<label>"+h.cellText+"</label>"),h.ajax&&!a.isEmptyObject(h.ajax)||h.data||(s(),i.$table.bind("filterEnd",function(){s(),i.$table.find(".select2col"+d).add(i.widgetOptions.$sticky&&i.widgetOptions.$sticky.find(".select2col"+d)).find(".select2").select2(h)})),a('<input class="select2 select2-'+d+'" type="hidden" />').val(h.value).appendTo(c).select2(h).bind("change",function(){r()}),i.$table.bind("filterFomatterUpdate",function(){var a=q(i.$table.data("lastSearch")[d]||"");c=i.$table.find(".select2col"+d),c.find(".select2").select2("val",a),r(),b.filter.formatterUpdated(c,d)}),i.$table.bind("stickyHeadersInit",function(){var b=i.widgetOptions.$sticky.find(".select2col"+d).empty();a('<input class="select2 select2-'+d+'" type="hidden">').val(h.value).appendTo(b).select2(h).bind("change",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",i.widgetOptions.$sticky.find(".select2col"+d+" .select2").select2("val")),r()}),h.cellText&&b.prepend("<label>"+h.cellText+"</label>")}),i.$table.bind("filterReset",function(){i.$table.find(".select2col"+d).find(".select2").select2("val",h.value||""),setTimeout(function(){r()},0)}),r(),k}}(jQuery);
|
4
dist/js/widgets/widget-filter.min.js
vendored
4
dist/js/widgets/widget-filter.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-grouping.min.js
vendored
4
dist/js/widgets/widget-grouping.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-pager.min.js
vendored
4
dist/js/widgets/widget-pager.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-resizable.min.js
vendored
2
dist/js/widgets/widget-resizable.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-scroller.min.js
vendored
4
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-uitheme.min.js
vendored
4
dist/js/widgets/widget-uitheme.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
!function(a){"use strict";var b=a.tablesorter||{};b.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s",iconSortAsc:"ui-icon-carat-1-n",iconSortDesc:"ui-icon-carat-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},a.extend(b.css,{wrapper:"tablesorter-wrapper"}),b.addWidget({id:"uitheme",priority:10,format:function(c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r=b.themes,s=d.$table.add(a(d.namespace+"_extra_table")),t=d.$headers.add(a(d.namespace+"_extra_headers")),u=d.theme||"jui",v=r[u]||{},w=a.trim([v.sortNone,v.sortDesc,v.sortAsc,v.active].join(" ")),x=a.trim([v.iconSortNone,v.iconSortDesc,v.iconSortAsc].join(" "));for(d.debug&&(i=new Date),s.hasClass("tablesorter-"+u)&&d.theme===d.appliedTheme&&e.uitheme_applied||(e.uitheme_applied=!0,n=r[d.appliedTheme]||{},q=!a.isEmptyObject(n),o=q?[n.sortNone,n.sortDesc,n.sortAsc,n.active].join(" "):"",p=q?[n.iconSortNone,n.iconSortDesc,n.iconSortAsc].join(" "):"",q&&(e.zebra[0]=a.trim(" "+e.zebra[0].replace(" "+n.even,"")),e.zebra[1]=a.trim(" "+e.zebra[1].replace(" "+n.odd,"")),d.$tbodies.children().removeClass([n.even,n.odd].join(" "))),v.even&&(e.zebra[0]+=" "+v.even),v.odd&&(e.zebra[1]+=" "+v.odd),s.children("caption").removeClass(n.caption||"").addClass(v.caption),l=s.removeClass((d.appliedTheme?"tablesorter-"+(d.appliedTheme||""):"")+" "+(n.table||"")).addClass("tablesorter-"+u+" "+(v.table||"")).children("tfoot"),d.appliedTheme=d.theme,l.length&&l.children("tr").removeClass(n.footerRow||"").addClass(v.footerRow).children("th, td").removeClass(n.footerCells||"").addClass(v.footerCells),t.removeClass((q?[n.header,n.hover,o].join(" "):"")||"").addClass(v.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(b){a(this)["mouseenter"===b.type?"addClass":"removeClass"](v.hover||"")}),t.each(function(){var c=a(this);c.find("."+b.css.wrapper).length||c.wrapInner('<div class="'+b.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),d.cssIcon&&t.find("."+b.css.icon).removeClass(q?[n.icons,p].join(" "):"").addClass(v.icons||""),s.hasClass("hasFilters")&&s.children("thead").children("."+b.css.filterRow).removeClass(q?n.filterRow||"":"").addClass(v.filterRow||"")),f=0;f<d.columns;f++)j=d.$headers.add(a(d.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+f+'"]'),k=b.css.icon?j.find("."+b.css.icon):a(),m=t.not(".sorter-false").filter('[data-column="'+f+'"]:last'),m.length&&(j.removeClass(w),k.removeClass(x),m[0].sortDisabled?k.removeClass(v.icons||""):(g=v.sortNone,h=v.iconSortNone,m.hasClass(b.css.sortAsc)?(g=[v.sortAsc,v.active].join(" "),h=v.iconSortAsc):m.hasClass(b.css.sortDesc)&&(g=[v.sortDesc,v.active].join(" "),h=v.iconSortDesc),j.addClass(g),k.addClass(h||"")));d.debug&&console.log("Applying "+u+" theme"+b.benchmark(i))},remove:function(a,c,d,e){if(d.uitheme_applied){var f=c.$table,g=c.appliedTheme||"jui",h=b.themes[g]||b.themes.jui,i=f.children("thead").children(),j=h.sortNone+" "+h.sortDesc+" "+h.sortAsc,k=h.iconSortNone+" "+h.iconSortDesc+" "+h.iconSortAsc;f.removeClass("tablesorter-"+g+" "+h.table),d.uitheme_applied=!1,e||(f.find(b.css.header).removeClass(h.header),i.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(h.hover+" "+j+" "+h.active).filter("."+b.css.filterRow).removeClass(h.filterRow),i.find("."+b.css.icon).removeClass(h.icons+" "+k))}}})}(jQuery);
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
!function(a){"use strict";var b=a.tablesorter||{};b.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s",iconSortAsc:"ui-icon-carat-1-n",iconSortDesc:"ui-icon-carat-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},a.extend(b.css,{wrapper:"tablesorter-wrapper"}),b.addWidget({id:"uitheme",priority:10,format:function(c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s=b.themes,t=d.$table.add(a(d.namespace+"_extra_table")),u=d.$headers.add(a(d.namespace+"_extra_headers")),v=d.theme||"jui",w=s[v]||{},x=a.trim([w.sortNone,w.sortDesc,w.sortAsc,w.active].join(" ")),y=a.trim([w.iconSortNone,w.iconSortDesc,w.iconSortAsc].join(" "));for(d.debug&&(j=new Date),t.hasClass("tablesorter-"+v)&&d.theme===d.appliedTheme&&e.uitheme_applied||(e.uitheme_applied=!0,o=s[d.appliedTheme]||{},r=!a.isEmptyObject(o),p=r?[o.sortNone,o.sortDesc,o.sortAsc,o.active].join(" "):"",q=r?[o.iconSortNone,o.iconSortDesc,o.iconSortAsc].join(" "):"",r&&(e.zebra[0]=a.trim(" "+e.zebra[0].replace(" "+o.even,"")),e.zebra[1]=a.trim(" "+e.zebra[1].replace(" "+o.odd,"")),d.$tbodies.children().removeClass([o.even,o.odd].join(" "))),w.even&&(e.zebra[0]+=" "+w.even),w.odd&&(e.zebra[1]+=" "+w.odd),t.children("caption").removeClass(o.caption||"").addClass(w.caption),m=t.removeClass((d.appliedTheme?"tablesorter-"+(d.appliedTheme||""):"")+" "+(o.table||"")).addClass("tablesorter-"+v+" "+(w.table||"")).children("tfoot"),d.appliedTheme=d.theme,m.length&&m.children("tr").removeClass(o.footerRow||"").addClass(w.footerRow).children("th, td").removeClass(o.footerCells||"").addClass(w.footerCells),u.removeClass((r?[o.header,o.hover,p].join(" "):"")||"").addClass(w.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(b){a(this)["mouseenter"===b.type?"addClass":"removeClass"](w.hover||"")}),u.each(function(){var c=a(this);c.find("."+b.css.wrapper).length||c.wrapInner('<div class="'+b.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),d.cssIcon&&u.find("."+b.css.icon).removeClass(r?[o.icons,q].join(" "):"").addClass(w.icons||""),d.widgets.indexOf("filter")>-1&&(g=function(){t.children("thead").children("."+b.css.filterRow).removeClass(r?o.filterRow||"":"").addClass(w.filterRow||"")},e.filter_initialized?g():t.one("filterInit",function(){g()}))),f=0;f<d.columns;f++)k=d.$headers.add(a(d.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+f+'"]'),l=b.css.icon?k.find("."+b.css.icon):a(),n=u.not(".sorter-false").filter('[data-column="'+f+'"]:last'),n.length&&(k.removeClass(x),l.removeClass(y),n[0].sortDisabled?l.removeClass(w.icons||""):(h=w.sortNone,i=w.iconSortNone,n.hasClass(b.css.sortAsc)?(h=[w.sortAsc,w.active].join(" "),i=w.iconSortAsc):n.hasClass(b.css.sortDesc)&&(h=[w.sortDesc,w.active].join(" "),i=w.iconSortDesc),k.addClass(h),l.addClass(i||"")));d.debug&&console.log("Applying "+v+" theme"+b.benchmark(j))},remove:function(a,c,d,e){if(d.uitheme_applied){var f=c.$table,g=c.appliedTheme||"jui",h=b.themes[g]||b.themes.jui,i=f.children("thead").children(),j=h.sortNone+" "+h.sortDesc+" "+h.sortAsc,k=h.iconSortNone+" "+h.iconSortDesc+" "+h.iconSortAsc;f.removeClass("tablesorter-"+g+" "+h.table),d.uitheme_applied=!1,e||(f.find(b.css.header).removeClass(h.header),i.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(h.hover+" "+j+" "+h.active).filter("."+b.css.filterRow).removeClass(h.filterRow),i.find("."+b.css.icon).removeClass(h.icons+" "+k))}}})}(jQuery);
|
2
dist/js/widgets/widget-view.min.js
vendored
2
dist/js/widgets/widget-view.min.js
vendored
@ -1 +1 @@
|
||||
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#","class":f,"data-view-type":b,title:e.title});g.append(a("<i>",{"class":e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){return e.preventDefault(),a(this).hasClass("active")?!1:(d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),c.view_layouts[c.view_layout].raw===!0?(g.remove(b,c),g.buildToolBar(b,c)):(f===!1&&g.hideTable(b,c),g.buildView(b,c)),void 0)})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{"class":c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(f,h.html())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f)},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){b.view_layout!==!1&&"undefined"!=typeof b.view_layouts[b.view_layout]&&(f===!1&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b),a.$table.triggerHandler("viewComplete")}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);
|
||||
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#","class":f,"data-view-type":b,title:e.title});g.append(a("<i>",{"class":e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){return e.preventDefault(),a(this).hasClass("active")?!1:(d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),c.view_layouts[c.view_layout].raw===!0?(g.remove(b,c),g.buildToolBar(b,c)):(f===!1&&g.hideTable(b,c),g.buildView(b,c)),void 0)})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{"class":c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(new RegExp(f,"g"),h.html()),f="{col"+b+":raw}",c=c.replace(new RegExp(f,"g"),a(d).text())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f),b.$table.triggerHandler("viewComplete")},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){b.view_layout!==!1&&"undefined"!=typeof b.view_layouts[b.view_layout]&&(f===!1&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b)}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);
|
@ -573,10 +573,10 @@
|
||||
<hr>
|
||||
|
||||
<h3 id="child-by-column">childByColumn</h3>
|
||||
<button class="toggle-byColumn" type="button">Toggle</button> <code>filter_childByColumn</code> : <span class="state2">true</span>
|
||||
<button type="button" class="toggle-byColumn">Toggle</button> <code>filter_childByColumn</code> : <span class="state2">true</span>
|
||||
<ul>
|
||||
<li>This option requires the <code>filter_childRow</code> option to be set to <code>true</code> in order to work.</li>
|
||||
<li>If <code>true</code>, child row content can be filtered in the same manner as regular rows. Try searching for values <button data-column="1"><1000</button> in the "FastCar" column, or values between <button data-column="2">3000 - 4000</button> in the "RapidZoo" column. Only one match in a child row is required to show the entire parent/child group.</li>
|
||||
<li>If <code>true</code>, child row content can be filtered in the same manner as regular rows. Try searching for values <button type="button" data-column="1"><1000</button> in the "FastCar" column, or values between <button type="button" data-column="2">3000 - 4000</button> in the "RapidZoo" column. Only one match in a child row is required to show the entire parent/child group.</li>
|
||||
<li>If <code>false</code>, child row content will be grouped together and included in any column search; as was the behavior before this option was added.</li>
|
||||
<li>Extra css was added to override the theme row highlighting to group parent/child highlighting; it just doesn't look that good and it may be removed from the themes in the future.</li>
|
||||
</ul>
|
||||
|
@ -119,7 +119,7 @@
|
||||
|
||||
Search:
|
||||
<input type="search" class="search" data-column="all" placeholder="Search all columns"><sup class="results xsmall">‡</sup>
|
||||
<button class="reset">Reset</button>
|
||||
<button type="button" class="reset">Reset</button>
|
||||
<code id="show-filter"></code>
|
||||
|
||||
<p class="xsmall"><span class="results">†</span> The reason for this issue is that the filter input in the index column has this setting:
|
||||
|
@ -81,7 +81,7 @@
|
||||
<div id="main">
|
||||
<p id="settings" class="hidden">
|
||||
Delay init is <em class="status">enabled</em>.
|
||||
<button class="toggle">Disable it</button> (value is stored in session storage) and <button class="reload">reload</button> the page. Compare page initialization time and
|
||||
<button type="button" class="toggle">Disable it</button> (value is stored in session storage) and <button type="button" class="reload">reload</button> the page. Compare page initialization time and
|
||||
first sorting time in each case.</p>
|
||||
<p class="tip">
|
||||
<em>NOTE!</em> If firebug is installed the debuging information will be displayed in the firebug console. Watch for
|
||||
|
@ -253,7 +253,7 @@
|
||||
<li>In <span class="version">v2.11</span>, the <code>savePages</code> option was added to saves the current page size and number (requires storage script).</li>
|
||||
</ul>
|
||||
|
||||
<h1>Triggered Events <button class="clear">Clear</button></h1>
|
||||
<h1>Triggered Events <button type="button" class="clear">Clear</button></h1>
|
||||
<ul id="display">
|
||||
<li>Pager events will appear here.</li>
|
||||
<li> </li>
|
||||
|
@ -130,7 +130,7 @@ $.tablesorter.fileTypes.equivalents["Fonts"] += '|svg'; // just add it to the en
|
||||
<h1>Demo</h1>
|
||||
<div id="demo">
|
||||
|
||||
<button>Switch</button> (switch media column between "group-separator-1" & "group-separator-2")
|
||||
<button type="button">Switch</button> (switch media column between "group-separator-1" & "group-separator-2")
|
||||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
|
@ -117,12 +117,12 @@ Basic Asc/Desc sort
|
||||
<div class="block">
|
||||
<div class="left box" data-id="1">
|
||||
|
||||
<button class="sort-reset" data-sort="[]">Reset</button>
|
||||
<button type="button" class="sort-reset" data-sort="[]">Reset</button>
|
||||
<h3>Sort Ascending/Descending</h3>
|
||||
Use <code>0</code> or <code>"a"</code> for ascending sorts, and <code>1</code> or <code>"d"</code> for descending sorts<super>*</super><br>
|
||||
<br>
|
||||
<button data-sort="[[0,0]]">Asc</button> (<code>[[0,0]]</code>) <button data-sort='[[0,"a"],[1,"d"]]'>Asc/Desc</button> (<code>[[0,"a"],[1,"d"]]</code>)<br>
|
||||
<button data-sort="[[0,1]]">Desc</button> (<code>[[0,1]]</code>) <button data-sort='[[0,"d"],[1,"a"]]'>Desc/Asc</button> (<code>[[0,"d"],[1,"a"]]</code>)
|
||||
<button type="button" data-sort="[[0,0]]">Asc</button> (<code>[[0,0]]</code>) <button type="button" data-sort='[[0,"a"],[1,"d"]]'>Asc/Desc</button> (<code>[[0,"a"],[1,"d"]]</code>)<br>
|
||||
<button type="button" data-sort="[[0,1]]">Desc</button> (<code>[[0,1]]</code>) <button type="button" data-sort='[[0,"d"],[1,"a"]]'>Desc/Asc</button> (<code>[[0,"d"],[1,"a"]]</code>)
|
||||
<pre class="prettyprint lang-js updating">$("#table1").trigger("sorton", [ [] ]);</pre>
|
||||
<small>* <code>"a"</code> & <code>"d"</code> values added <span class="version">v2.17.0</span>.</small>
|
||||
</div>
|
||||
@ -151,17 +151,17 @@ Toggle Sort (Next)
|
||||
<div class="block">
|
||||
<div class="left box" data-id="2">
|
||||
|
||||
<button class="sort-reset" data-sort="[]">Reset</button>
|
||||
<button type="button" class="sort-reset" data-sort="[]">Reset</button>
|
||||
<h3>Toggle sort (Next)</h3>
|
||||
Either trigger a <code>"sort"</code> on the desired column, or <code>"sorton"</code> on the table using the <code>"n"</code> value<super>*</super>.<br>
|
||||
Toggle the <button class="sortReset-toggle">sortReset</button> option (<code class="kwd">false</code>), then try these sorts (click a third time).<br>
|
||||
Toggle the <button type="button" class="sortReset-toggle">sortReset</button> option (<code class="kwd">false</code>), then try these sorts (click a third time).<br>
|
||||
|
||||
<br>
|
||||
Trigger "sort" event: <button id="toggle-sort">Discount</button> (v2.9)
|
||||
Trigger "sort" event: <button type="button" id="toggle-sort">Discount</button> (v2.9)
|
||||
<pre class="prettyprint lang-js">$("#table2").find("th:contains(Discount)").trigger("sort");</pre>
|
||||
|
||||
<button data-sort='[[0,"n"]]'>Asc/Desc</button> (<code>[[0,"n"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"n"]]'>Asc/Desc</button> (<code>[[0,"n"],[1,"n"]]</code>; columns are independent)
|
||||
<button type="button" data-sort='[[0,"n"]]'>Asc/Desc</button> (<code>[[0,"n"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"n"]]'>Asc/Desc</button> (<code>[[0,"n"],[1,"n"]]</code>; columns are independent)
|
||||
<pre class="prettyprint lang-js updating">$("#table2").trigger("sorton", [ [] ]);</pre>
|
||||
<small>* <code>"n"</code> value added <span class="version">v2.17.0</span>.</small>
|
||||
</div>
|
||||
@ -189,19 +189,19 @@ Sort Same/Opposite
|
||||
-->
|
||||
<div class="block">
|
||||
<div class="left box" data-id="3">
|
||||
<button class="sort-reset" data-sort="[]">Reset</button>
|
||||
<button type="button" class="sort-reset" data-sort="[]">Reset</button>
|
||||
<h3>Sort Same/Opposite</h3>
|
||||
The same (<code>"s"</code>) or opposite (<code>"o"</code>) sort values always set the column sort based on the primary column<super>*</super>.<br>
|
||||
Toggle the <button class="sortReset-toggle">sortReset</button> option (<code class="kwd">false</code>), then try these sorts (click a third time).<br>
|
||||
Toggle the <button type="button" class="sortReset-toggle">sortReset</button> option (<code class="kwd">false</code>), then try these sorts (click a third time).<br>
|
||||
<br>
|
||||
<button data-sort='[[0,"s"]]'>Same</button> (<code>[[0,"s"]]</code>; always defaults to Asc sort if set on primary column)<br>
|
||||
<button data-sort='[[0,0],[1,"s"]]'>Asc/same</button> (<code>[[0,0],[1,"s"]]</code>)<br>
|
||||
<button data-sort='[[0,1],[1,"s"]]'>Desc/same</button> (<code>[[0,1],[1,"s"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"s"]]'>Next/same</button> (<code>[[0,"n"],[1,"s"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"o"]]'>Next/opposite</button> (<code>[[0,"n"],[1,"o"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"o"],[2,"n"]]'>Next/opposite/next</button> (<code>[[0,"n"],[1,"o"],[2,"n"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"o"],[2,"s"]]'>Next/opposite/same</button> (<code>[[0,"n"],[1,"o"],[2,"s"]]</code>)<br>
|
||||
<button data-sort='[[0,"n"],[1,"o"],[2,"s"],[3,"o"]]'>Next/opposite/same/opposite</button> (<code>[[0,"n"],[1,"o"],[2,"s"],[3,"o"]]</code>)
|
||||
<button type="button" data-sort='[[0,"s"]]'>Same</button> (<code>[[0,"s"]]</code>; always defaults to Asc sort if set on primary column)<br>
|
||||
<button type="button" data-sort='[[0,0],[1,"s"]]'>Asc/same</button> (<code>[[0,0],[1,"s"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,1],[1,"s"]]'>Desc/same</button> (<code>[[0,1],[1,"s"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"s"]]'>Next/same</button> (<code>[[0,"n"],[1,"s"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"o"]]'>Next/opposite</button> (<code>[[0,"n"],[1,"o"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"o"],[2,"n"]]'>Next/opposite/next</button> (<code>[[0,"n"],[1,"o"],[2,"n"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"o"],[2,"s"]]'>Next/opposite/same</button> (<code>[[0,"n"],[1,"o"],[2,"s"]]</code>)<br>
|
||||
<button type="button" data-sort='[[0,"n"],[1,"o"],[2,"s"],[3,"o"]]'>Next/opposite/same/opposite</button> (<code>[[0,"n"],[1,"o"],[2,"s"],[3,"o"]]</code>)
|
||||
<pre class="prettyprint lang-js updating">$("#table3").trigger("sorton", [ [] ]);</pre>
|
||||
<small>* <code>"s"</code> & <code>"o"</code> values added <span class="version">v2.17.0</span>.</small>
|
||||
</div>
|
||||
|
@ -567,7 +567,7 @@ $.tablesorter.columnSelector.refreshColumns( config, optionName, optionState );<
|
||||
<!-- Remove column from selection popup by including -->
|
||||
<!-- data-priority="Anything other than 1-6" OR data-column-selector="disable" OR class="columnSelector-disable" -->
|
||||
<th class="columnSelector-disable">Major</th>
|
||||
<!-- columnSelector-false will initially hide the column -->
|
||||
<!-- columnSelector-false will initially hide the column; see columnSelector_mediaqueryHidden option -->
|
||||
<th class="columnSelector-false" data-priority="6" data-selector-name="Gender">Sex</th>
|
||||
<th data-priority="4">English</th>
|
||||
<th data-priority="5">Japanese</th>
|
||||
|
@ -507,8 +507,8 @@ td.editable_updated {
|
||||
<p></p>
|
||||
<h1>Demo</h1>
|
||||
|
||||
<button class="auto">Toggle</button> <code>editable_autoAccept : <span>true</span></code><br>
|
||||
<button class="enter">Toggle</button> <code>editable_enterToAccept : <span>true</span></code>
|
||||
<button type="button" class="auto">Toggle</button> <code>editable_autoAccept : <span>true</span></code><br>
|
||||
<button type="button" class="enter">Toggle</button> <code>editable_enterToAccept : <span>true</span></code>
|
||||
<br>
|
||||
|
||||
<div id="demo"><table id="table" class="tablesorter">
|
||||
|
@ -239,7 +239,7 @@
|
||||
}</pre></li>
|
||||
<li>The example shows you how to show only exact matches. The problem with this is that you can't see the matches while typing unless you set the <code>filter_searchDelay</code> option to be a bit longer.</li>
|
||||
<li>Also, the example only checks for an exact match (<code>===</code>) meaning the <code>filter_ignoreCase</code> option is ignored, but other comparisons can be made using regex and the insensitive "i" flag.</li>
|
||||
<li><span class="label warning">*NOTE*</span> If using an exact match function like this, consider setting the <a href="index.html#widget-filter-searchfiltered"><code>filter_searchFiltered</code></a> option to false. If it were set to <code>true</code>, the filter widget wouldn't know to search through the entire contents of the column if the content were only slightly different. To see this problem, search for <button data-filter-column="1">Evan</button> in the "Last Name" column, then add an "s" to the end to find "Evans". No results will show up, unless the search filtered option is <code>false</code>.</li>
|
||||
<li><span class="label warning">*NOTE*</span> If using an exact match function like this, consider setting the <a href="index.html#widget-filter-searchfiltered"><code>filter_searchFiltered</code></a> option to false. If it were set to <code>true</code>, the filter widget wouldn't know to search through the entire contents of the column if the content were only slightly different. To see this problem, search for <button type="button" data-filter-column="1">Evan</button> in the "Last Name" column, then add an "s" to the end to find "Evans". No results will show up, unless the search filtered option is <code>false</code>.</li>
|
||||
<li>See the filter function information below for more details about the function parameters.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -223,10 +223,10 @@
|
||||
<li>Added <code>endOfDay</code> option for jQuery UI Datepicker.
|
||||
<ul>
|
||||
<li>When <code>true</code> search dates will include all times from the date chosen when a comparison is made of dates "less than" the set date.</li>
|
||||
<li>Example 1: if a table entry has a date of "Jan 14, 2014 11:23 AM" and the filter search is set to <button data-column="4" data-value="<=1/14/2014"><= 1/14/2014</button>, the table entry will be included in the search; the default set time would otherwise be "1/14/2014 00:00:00" and not include the entry from "11:23 AM". So, the <code>endOfDay</code> option sets the time to "23:59:59".</li>
|
||||
<li>Example 2: if searching for one specific date, this option will now search for all times within that day. For example, searching for <button data-column="4" data-value="=1/20/2014">= 1/20/2014</button>, and the results will include dates from 1/20/2014 00:00:00 to 1/20/2014 23:59:59.</li>
|
||||
<li>Example 1: if a table entry has a date of "Jan 14, 2014 11:23 AM" and the filter search is set to <button type="button" data-column="4" data-value="<=1/14/2014"><= 1/14/2014</button>, the table entry will be included in the search; the default set time would otherwise be "1/14/2014 00:00:00" and not include the entry from "11:23 AM". So, the <code>endOfDay</code> option sets the time to "23:59:59".</li>
|
||||
<li>Example 2: if searching for one specific date, this option will now search for all times within that day. For example, searching for <button type="button" data-column="4" data-value="=1/20/2014">= 1/20/2014</button>, and the results will include dates from 1/20/2014 00:00:00 to 1/20/2014 23:59:59.</li>
|
||||
<li>When comparing dates greater than the set date, the time will be set to midnight; so this option will not be applied.</li>
|
||||
<li>Example 3: in two date inputs, the <code>endOfDay</code> time is only applied to the "to" input; search for <button data-column="5" data-value="1/20/2014 - 1/20/2014">1/20/2014 - 1/20/2014</button></li>
|
||||
<li>Example 3: in two date inputs, the <code>endOfDay</code> time is only applied to the "to" input; search for <button type="button" data-column="5" data-value="1/20/2014 - 1/20/2014">1/20/2014 - 1/20/2014</button></li>
|
||||
<li>This option is available in both the comparison (one input) and range (two inputs; "to" date input only) date pickers.</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -407,8 +407,8 @@
|
||||
<li>In <span class="version">v2.15.0</span>
|
||||
<ul>
|
||||
<li>The <code>compare</code> option was updated to allow adding a selector along with the input. The <code>selected</code> option allows choosing the default setting.</li>
|
||||
<li>A <code>endOfDay</code> option was added, which when a <code><=</code> comparison is made, will include all times within the selected day. Try searching for <button data-column="4" data-value="<=1/14/2014"><= 1/14/2014</button>; it basically sets the time of the selected day to end at 23:59:59.</li>
|
||||
<li>Additionally, when <code>endOfDay</code> option is <code>true</code> and using an exact (<code>=</code>) comparison, all times within that selected day will be included - try searching for <button data-column="4" data-value="=1/20/2014">= 1/20/2014</button> to note that the day include various times.</li>
|
||||
<li>A <code>endOfDay</code> option was added, which when a <code><=</code> comparison is made, will include all times within the selected day. Try searching for <button type="button" data-column="4" data-value="<=1/14/2014"><= 1/14/2014</button>; it basically sets the time of the selected day to end at 23:59:59.</li>
|
||||
<li>Additionally, when <code>endOfDay</code> option is <code>true</code> and using an exact (<code>=</code>) comparison, all times within that selected day will be included - try searching for <button type="button" data-column="4" data-value="=1/20/2014">= 1/20/2014</button> to note that the day include various times.</li>
|
||||
</ul>
|
||||
<br>
|
||||
</li>
|
||||
@ -473,7 +473,7 @@
|
||||
<li><span class="label label-info">Note</span> The browser must support the <a href="http://caniuse.com/#feat=input-placeholder">placeholder attribute</a> before this text will be visible.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>In <span class="version">v2.15.0</span>, an <code>endOfDay</code> option was added, which when <code>true</code> and searching within one day, all times within that selected day will be included - try searching for <button data-column="5" data-value="1/20/2014 - 1/20/2014">1/20/2014 - 1/20/2014</button> to note that the day include various times.<br></li>
|
||||
<li>In <span class="version">v2.15.0</span>, an <code>endOfDay</code> option was added, which when <code>true</code> and searching within one day, all times within that selected day will be included - try searching for <button type="button" data-column="5" data-value="1/20/2014 - 1/20/2014">1/20/2014 - 1/20/2014</button> to note that the day include various times.<br></li>
|
||||
<li>This example shows how you can add a jQuery UI Datepicker range to filter column content.</li>
|
||||
<li>The <code>filter_formatter</code> function provided in the extra "widget-filter-formatter-jui.js" file is used to add this custom control within the filter row.</li>
|
||||
<li>This code follows the <a class="external" href="http://jqueryui.com/datepicker/#date-range">date range</a> example from the jQuery UI docs.</li>
|
||||
|
@ -173,7 +173,7 @@
|
||||
<p></p>
|
||||
|
||||
<h1>Demo</h1>
|
||||
<div id="demo"><button class="reset">Reset Search</button>
|
||||
<div id="demo"><button type="button" class="reset">Reset Search</button>
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -96,6 +96,7 @@
|
||||
|
||||
// if true, 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
|
||||
// in v2.26.6, this option will also accept a function
|
||||
filter_hideFilters : true,
|
||||
|
||||
// Set this option to false to make the searches case sensitive
|
||||
@ -247,13 +248,14 @@ $(function(){
|
||||
<h3 id="notes"><a href="#">Notes</a></h3>
|
||||
<div>
|
||||
<ul>
|
||||
<li>In <span class="verison">v2.26.6</span>, the <a class="intlink" href="#filter-hidefilters"><code>hideFilters</code></a> setting will now accept a function to determine when to hide the filter row.</li>
|
||||
<li>In <span class="version">v2.25.6</span>, added <a class="intlink" href="#methods"><code>filterResetSaved</code></a> method to clear stored filter values.</li>
|
||||
<li>In <span class="version">v2.25.2</span>, added <a class="intlink" href="#filter-resetonesc"><code>filter_resetOnEsc</code></a> option.</li>
|
||||
<li>In <span class="version">v2.22.2</span>,
|
||||
<ul>
|
||||
<li>The <a class="intlink" href="#method-get-filters"><code>getFilters</code></a> function will now target the last used filter properly.</li>
|
||||
<li>The <a class="intlink" href="#filter-select-source"><code>filter_selectSource</code></a> option now ignores parsers if none are set.</li>
|
||||
<li>Added the ability to nest filter types with a logical "OR" or a logical "AND". Try these filters: <button data-filter-column="1">a && !o</button> (<span class="label warning">*NOTE*</span> try this with and without the filter-match class applied), <button data-filter-column="3"><20 or >40</button> or <button data-filter-column="3">>20 && <40</button></li>
|
||||
<li>Added the ability to nest filter types with a logical "OR" or a logical "AND". Try these filters: <button type="button" data-filter-column="1">a && !o</button> (<span class="label warning">*NOTE*</span> try this with and without the filter-match class applied), <button type="button" data-filter-column="3"><20 or >40</button> or <button type="button" data-filter-column="3">>20 && <40</button></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -311,17 +313,17 @@ $(function(){
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="center">1</td><td class="center"><code>|</code> or <code> OR </code></td><td>Logical "or" (Vertical bar). Filter the column for content that matches text from either side of the bar <small class="bright">(2)</small>.</td><td><code>box|bat</code> (matches a column cell with either "box" or "bat");<button data-filter-column="1">Alex|Peter</button> (Find text that contains either "Alex" or "Peter"); <button data-filter-column="3"><20 or >40</button></td></tr>
|
||||
<tr><td class="center">2</td><td class="center"><code> && </code> or <code> AND </code></td><td>Logical "and". Filter the column for content that matches text from either side of the operator.</td><td><code>box && bat</code> (matches a column cell that contains both "box" and "bat"), <button data-filter-column="1">Br && c</button> (Find text that contains both "br" and "c"), <button data-filter-column="3">>20 && <40</button> or <button data-filter-column="1">a and !o</button> (When "filter-match" is set, find content with the letter "a", but not the letter "o")</td></tr>
|
||||
<tr><td class="center">3</td><td class="center"><code>/\d/</code></td><td>Add any regex to the query to use in the query ("mig" flags can be included <code>/\w/mig</code>)</td><td><code>/b[aeiou]g/i</code> (finds "bag", "beg", "BIG", "Bug", etc);<button data-filter-column="1">/r$/</button> (matches text that ends with an "r")</td></tr>
|
||||
<tr><td class="center">4</td><td class="center"><code>< <= >= ></code></td><td>Find alphabetical or numerical values less than or greater than or equal to the filtered query <small class="bright">(1)</small>.</td><td><button data-filter-column="5">>= 10</button> (find values greater than or equal to 10)</td></tr>
|
||||
<tr><td class="center">5</td><td class="center"><code>!</code> or <code>!=</code></td><td>Not operator, or not exactly match. Filter the column with content that <strong>do not</strong> match the query. Include an equal (<code>=</code>), single (<code>'</code>) or double quote (<code>"</code>) to exactly <em>not</em> match a filter (<span class="version">v2.17.1</span>).</td><td><code>!fe</code> (hide rows with "female" in that column, but shows rows with "male");<button data-filter-column="1">!a</button> (find text that doesn't contain an "a");<button data-filter-column="1">!"Bruce"</button> (find content that does not exactly match "Bruce")</td></tr>
|
||||
<tr><td class="center">6</td><td class="center"><code>"</code> or <code>=</code></td><td>To exactly match the search query, add a quote, apostrophe or equal sign to the beginning and/or end of the query</td><td><code>abc"</code> or <code>abc=</code> (exactly match "abc");<button data-filter-column="1">John"</button> or <button data-filter-column="1">John=</button> (exactly match "John")</td></tr>
|
||||
<tr><td class="center">7</td><td class="center"><code> - </code> or <code> to </code></td><td>Find a range of values. Make sure there is a space before and after the dash (or the word "to") <small class="bright">(3)</small>.</td><td><button data-filter-column="3">10 - 30</button> or <button data-filter-column="4">10 to 30</button> (match values between 10 and 30)</td></tr>
|
||||
<tr><td class="center">8</td><td class="center"><code>?</code></td><td>Wildcard for a single, non-space character.</td><td><code>J?n</code> (finds "Jan" and "Jun", but not "Joan");<button data-filter-column="2">a?s</button> (finds "Dumass" and "Evans", but not "McMasters")</td></tr>
|
||||
<tr><td class="center">8</td><td class="center"><code>*</code></td><td>Wildcard for zero or more non-space characters.</td><td><code>B*k</code> (matches "Black" and "Book");<button data-filter-column="2">a*s</button> (matches "Dumass", "Evans" and "McMasters")</td></tr>
|
||||
<tr><td class="center">9</td><td class="center"><code>~</code></td><td>Perform a fuzzy search (matches sequential characters) by adding a tilde to the beginning of the query (<span class="version">v2.13.3</span>)</td><td><button data-filter-column="1">~bee</button> (matches "Bruce Lee" and "Brenda Dexter"), or <button data-filter-column="1">~piano</button> (matches "Philip Aaron Wong")</td></tr>
|
||||
<tr><td class="center">10</td><td class="center">text</td><td>Any text entered in the filter will <strong>match</strong> text found within the column</td><td><code>abc</code> (finds "abc", "abcd", "abcde", etc);<button data-filter-column="1">Aaron</button> (finds "Aaron" and "Philip Aaron Wong")</td></tr>
|
||||
<tr><td class="center">1</td><td class="center"><code>|</code> or <code> OR </code></td><td>Logical "or" (Vertical bar). Filter the column for content that matches text from either side of the bar <small class="bright">(2)</small>.</td><td><code>box|bat</code> (matches a column cell with either "box" or "bat");<button type="button" data-filter-column="1">Alex|Peter</button> (Find text that contains either "Alex" or "Peter"); <button type="button" data-filter-column="3"><20 or >40</button></td></tr>
|
||||
<tr><td class="center">2</td><td class="center"><code> && </code> or <code> AND </code></td><td>Logical "and". Filter the column for content that matches text from either side of the operator.</td><td><code>box && bat</code> (matches a column cell that contains both "box" and "bat"), <button type="button" data-filter-column="1">Br && c</button> (Find text that contains both "br" and "c"), <button type="button" data-filter-column="3">>20 && <40</button> or <button type="button" data-filter-column="1">a and !o</button> (When "filter-match" is set, find content with the letter "a", but not the letter "o")</td></tr>
|
||||
<tr><td class="center">3</td><td class="center"><code>/\d/</code></td><td>Add any regex to the query to use in the query ("mig" flags can be included <code>/\w/mig</code>)</td><td><code>/b[aeiou]g/i</code> (finds "bag", "beg", "BIG", "Bug", etc);<button type="button" data-filter-column="1">/r$/</button> (matches text that ends with an "r")</td></tr>
|
||||
<tr><td class="center">4</td><td class="center"><code>< <= >= ></code></td><td>Find alphabetical or numerical values less than or greater than or equal to the filtered query <small class="bright">(1)</small>.</td><td><button type="button" data-filter-column="5">>= 10</button> (find values greater than or equal to 10)</td></tr>
|
||||
<tr><td class="center">5</td><td class="center"><code>!</code> or <code>!=</code></td><td>Not operator, or not exactly match. Filter the column with content that <strong>do not</strong> match the query. Include an equal (<code>=</code>), single (<code>'</code>) or double quote (<code>"</code>) to exactly <em>not</em> match a filter (<span class="version">v2.17.1</span>).</td><td><code>!fe</code> (hide rows with "female" in that column, but shows rows with "male");<button type="button" data-filter-column="1">!a</button> (find text that doesn't contain an "a");<button type="button" data-filter-column="1">!"Bruce"</button> (find content that does not exactly match "Bruce")</td></tr>
|
||||
<tr><td class="center">6</td><td class="center"><code>"</code> or <code>=</code></td><td>To exactly match the search query, add a quote, apostrophe or equal sign to the beginning and/or end of the query</td><td><code>abc"</code> or <code>abc=</code> (exactly match "abc");<button type="button" data-filter-column="1">John"</button> or <button type="button" data-filter-column="1">John=</button> (exactly match "John")</td></tr>
|
||||
<tr><td class="center">7</td><td class="center"><code> - </code> or <code> to </code></td><td>Find a range of values. Make sure there is a space before and after the dash (or the word "to") <small class="bright">(3)</small>.</td><td><button type="button" data-filter-column="3">10 - 30</button> or <button type="button" data-filter-column="4">10 to 30</button> (match values between 10 and 30)</td></tr>
|
||||
<tr><td class="center">8</td><td class="center"><code>?</code></td><td>Wildcard for a single, non-space character.</td><td><code>J?n</code> (finds "Jan" and "Jun", but not "Joan");<button type="button" data-filter-column="2">a?s</button> (finds "Dumass" and "Evans", but not "McMasters")</td></tr>
|
||||
<tr><td class="center">8</td><td class="center"><code>*</code></td><td>Wildcard for zero or more non-space characters.</td><td><code>B*k</code> (matches "Black" and "Book");<button type="button" data-filter-column="2">a*s</button> (matches "Dumass", "Evans" and "McMasters")</td></tr>
|
||||
<tr><td class="center">9</td><td class="center"><code>~</code></td><td>Perform a fuzzy search (matches sequential characters) by adding a tilde to the beginning of the query (<span class="version">v2.13.3</span>)</td><td><button type="button" data-filter-column="1">~bee</button> (matches "Bruce Lee" and "Brenda Dexter"), or <button type="button" data-filter-column="1">~piano</button> (matches "Philip Aaron Wong")</td></tr>
|
||||
<tr><td class="center">10</td><td class="center">text</td><td>Any text entered in the filter will <strong>match</strong> text found within the column</td><td><code>abc</code> (finds "abc", "abcd", "abcde", etc);<button type="button" data-filter-column="1">Aaron</button> (finds "Aaron" and "Philip Aaron Wong")</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="bright">(1)</span> The filter order (or precendence) of how searches are checked in "priority" (first column) order; so an exact match will override "range" searches (*NOTE* order changed in <span class="version updated">v2.15</span>, operators prioritized before exact; see <a href="https://github.com/Mottie/tablesorter/issues/465">issue #465</a>; order changed again in <span class="version updated">v2.17.1</span> to move "not match" before "exact" and allow for exact not matches; see <a href="https://github.com/Mottie/tablesorter/issues/628">issue #628</a>). In <span class="version updated">v2.22.2</span>, the "or" and "and" types can combine any of the other filter types together.<br>
|
||||
@ -498,7 +500,9 @@ $(function(){
|
||||
<tr id="filter-hide-filters">
|
||||
<td><span class="permalink">filter_hideFilters</span></td>
|
||||
<td>false</td>
|
||||
<td>If <code>true</code>, filters are hidden initially, but can be revealed by hovering over the filter row, or giving a filter input focus (tabbing down the page).</td>
|
||||
<td>If <code>true</code>, filters are hidden initially, but can be revealed by hovering over the filter row, or giving a filter input focus (tabbing down the page).<br>
|
||||
In <span class="version updated">v2.26.6</span>, a function can now be used to return a boolean value to set the visibility of the filter row. See the <a href="./#widget-filter-hidefilters">main documentation</a> for an example.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="filter-ignore-case">
|
||||
@ -807,7 +811,7 @@ $.extend($.tablesorter.language, {
|
||||
<h1>Demo</h1>
|
||||
<button type="button" class="toggle fsw">Toggle</button> filter_startsWith : <span id="start">false</span> (if true, search from beginning of cell content only)<br>
|
||||
<button type="button" class="toggle fic">Toggle</button> filter_ignoreCase : <span id="case">true</span> (if false, the search will be case sensitive)<br>
|
||||
<button type="button" class="toggle ffm">Toggle</button> filter-match (if class name added to the "First Name" column, all "or" searches will only match the content; Search <button data-filter-column="1">alex|br*|c</button> in the First Name column (<span class="version">2.10.1</span>).
|
||||
<button type="button" class="toggle ffm">Toggle</button> filter-match (if class name added to the "First Name" column, all "or" searches will only match the content; Search <button type="button" data-filter-column="1">alex|br*|c</button> in the First Name column (<span class="version">2.10.1</span>).
|
||||
<hr>
|
||||
|
||||
<div id="demo">Search <button type="button" data-filter-column="5" data-filter-text="2?%">2?%</button> in the Discount column<br>
|
||||
|
@ -783,7 +783,7 @@ $(function() {
|
||||
<span class="demo-label">Animals column:</span> <div id="slider1"></div> <span class="animalclass"></span><br>
|
||||
<span class="demo-label">Date column:</span> <div id="slider2"></div> <span class="dateclass"></span><sup class="results">†</sup>
|
||||
<br><br>
|
||||
<button class="group_reset">Reset Saved Collapsed Groups</button>
|
||||
<button type="button" class="group_reset">Reset Saved Collapsed Groups</button>
|
||||
<div id="demo"><table id="groups">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -264,7 +264,7 @@ headerTitle_output_nosort : 'No sort available'</pre>
|
||||
<div id="demo">
|
||||
|
||||
<h3>Tooltip plugin using togglable aria-label text</h3>
|
||||
<button>use aria-label</button>: <span id="usearia" class="bright">true</span>
|
||||
<button type="button">use aria-label</button>: <span id="usearia" class="bright">true</span>
|
||||
|
||||
<table id="table1">
|
||||
<thead>
|
||||
|
@ -615,7 +615,7 @@ BAD => No minus (-) here! $#,###.00 or [-] here either <= BAD</textarea>
|
||||
Value to use: <input class="value" type="text" value="1234567.8955" /><br>
|
||||
Prefix: <input class="prefix" type="text" value='<span class="red">{content}</span>' /> ( add <code>{content}</code> to include the mask prefix )<br>
|
||||
Suffix: <input class="suffix" type="text" value='<span class="blue">{content}</span>' /> ( add <code>{content}</code> to include the mask suffix )<br>
|
||||
<button>Process</button>
|
||||
<button type="button">Process</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -506,7 +506,7 @@ table.ui-table-reflow .ui-table-cell-label.ui-table-cell-label-top {
|
||||
<li class="setsmtl"></li>
|
||||
<li class="setsmtp"></li>
|
||||
</ul>
|
||||
<button class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<button type="button" class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<div class="frame-wrapper full">
|
||||
<iframe src="example-widget-reflow1.html"></iframe>
|
||||
</div>
|
||||
@ -521,7 +521,7 @@ table.ui-table-reflow .ui-table-cell-label.ui-table-cell-label-top {
|
||||
<li class="setsmtl"></li>
|
||||
<li class="setsmtp"></li>
|
||||
</ul>
|
||||
<button class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<button type="button" class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<div class="frame-wrapper full">
|
||||
<iframe src="example-widget-reflow2.html"></iframe>
|
||||
</div>
|
||||
@ -536,7 +536,7 @@ table.ui-table-reflow .ui-table-cell-label.ui-table-cell-label-top {
|
||||
<li class="setsmtl"></li>
|
||||
<li class="setsmtp"></li>
|
||||
</ul>
|
||||
<button class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<button type="button" class="toggle" title="Hide/show table header when the breakpoint is reached">Toggle Headers</button>
|
||||
<div class="frame-wrapper full">
|
||||
<iframe src="example-widget-reflow3.html"></iframe>
|
||||
</div>
|
||||
|
@ -189,7 +189,7 @@ $(table).trigger('staticRowsRefresh');</pre>
|
||||
<h1>Demo</h1>
|
||||
<span class="label label-info">Note</span> Make any row static or normal by toggling the <code>static</code> class name using <kbd>Ctrl</kbd> + left click (<kbd>⌘</kbd> + click on Mac)<br>
|
||||
<div id="demo"><h3>Single tbody</h3>
|
||||
<p><button class="addrow">Add Row</button> Move "Iguana" row: <button class="move up">up</button> <button class="move">down</button></p>
|
||||
<p><button type="button" class="addrow">Add Row</button> Move "Iguana" row: <button type="button" class="move up">up</button> <button type="button" class="move">down</button></p>
|
||||
<table id="alphimals" class="tablesorter">
|
||||
<thead>
|
||||
<tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr>
|
||||
|
@ -27,7 +27,8 @@
|
||||
<link href="../css/theme.grey.css" rel="stylesheet">
|
||||
|
||||
<script src="../js/jquery.tablesorter.js"></script>
|
||||
<script src="../js/jquery.tablesorter.widgets.js"></script>
|
||||
<script src="../js/widgets/widget-filter.js"></script>
|
||||
<script src="../js/widgets/widget-uitheme.js"></script>
|
||||
|
||||
<!-- Tablesorter: optional -->
|
||||
<!-- <script src="../addons/pager/jquery.tablesorter.pager.js"></script> -->
|
||||
@ -67,7 +68,7 @@
|
||||
headerTemplate : '{content} {icon}', // needed to add icon for jui theme
|
||||
|
||||
// widget code now contained in the jquery.tablesorter.widgets.js file
|
||||
widgets : ['uitheme', 'zebra'],
|
||||
widgets : ['uitheme', 'filter', 'zebra'],
|
||||
|
||||
widgetOptions : {
|
||||
// zebra striping class names - the uitheme widget adds the class names defined in
|
||||
|
@ -391,6 +391,7 @@ html[xmlns] .clearfix {
|
||||
<ul>
|
||||
<li>This widget will <strong>only work</strong> in tablesorter version 2.24.0+ and jQuery version 1.7+.</li>
|
||||
<li>When it's done building the view 'viewComplete' will be tiggered</li>
|
||||
<li>{coln} will be replaced with the row/coln value wrapped by a span that has the classes/attributes of the original unless :raw is use, then the text value of row/coln will be used. ie: {col0:raw}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -735,8 +736,8 @@ html[xmlns] .clearfix {
|
||||
'<section class="right">' +
|
||||
'<span class="price">{col4}</span>' +
|
||||
'<span class="darkview">' +
|
||||
'<button class="mybutton nohover" title="Read More..." >More</button>' +
|
||||
'<button class="mybutton nohover active" title="Add to Cart" >Add To Cart</button>' +
|
||||
'<button type="button" class="mybutton nohover" title="Read More..." >More</button>' +
|
||||
'<button type="button" class="mybutton nohover active" title="Add to Cart" >Add To Cart</button>' +
|
||||
'</span>' +
|
||||
'</section>' +
|
||||
'</li>',
|
||||
|
@ -92,7 +92,7 @@
|
||||
<br>
|
||||
<strong>Licence:</strong>
|
||||
Dual licensed under <a class="external" href="http://www.opensource.org/licenses/mit-license.php">MIT</a>
|
||||
or <a class="external" href="http://www.opensource.org/licenses/gpl-license.php">GPL</a> licenses.<br>
|
||||
or <a class="external" href="http://www.opensource.org/licenses/gpl-license.php">GPL</a> licenses (pick one).<br>
|
||||
</p>
|
||||
|
||||
<a id="Contents"></a>
|
||||
@ -455,12 +455,12 @@
|
||||
|
||||
<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">†</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.25.9</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.26.6</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><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">†</span> Filter widget (<span class="version updated">v2.26.5</span>):
|
||||
<li><span class="results">†</span> Filter widget (<span class="version updated">v2.26.6</span>):
|
||||
<ul>
|
||||
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.25.5</span>).</li>
|
||||
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.26.6</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.26.2</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>
|
||||
@ -468,7 +468,7 @@
|
||||
<li><a href="example-widget-filter-custom-search2.html">custom search type (example #2: date range)</a> (<span class="version">v2.19.1</span>; <span class="version updated">v2.24.6</span>).</li>
|
||||
<li><a href="example-widget-filter-childrows.html">child rows</a> (<span class="version">v2.23.4</span>).</li>
|
||||
<li>formatter: <a href="example-widget-filter-formatter-1.html">jQuery UI widgets</a> and <a href="example-widget-filter-formatter-2.html">HTML5 Elements</a> (v2.7.7; <span class="version updated">v2.17.5</span>).</li>
|
||||
<li>formatter: <a href="example-widget-filter-formatter-select2.html">select2 v3</a> (<span class="version">v2.16.0</span>; <span class="version updated">v2.26.2</span>).</li>
|
||||
<li>formatter: <a href="example-widget-filter-formatter-select2.html">select2 v3</a> (<span class="version">v2.16.0</span>; <span class="version updated">v2.26.6</span>).</li>
|
||||
<li>formatter: select2 v4 (TO DO)</li>
|
||||
<li><a href="example-widget-filter-selectmenu.html">Using jQuery UI Selectmenu</a> (<span class="version">v2.24.4</span>).</li>
|
||||
</ul>
|
||||
@ -476,7 +476,7 @@
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-formatter.html">Formatter widget</a> (<span class="version">v2.19.1</span>).</li>
|
||||
<li>Grouping rows widget:
|
||||
<ul>
|
||||
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.26.5</span>).</li>
|
||||
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.26.6</span>).</li>
|
||||
<li><a href="example-widget-grouping-filter-childrows.html">Grouping + filter + child rows</a> (<span class="updated version">v2.15.12</span>).</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -488,9 +488,9 @@
|
||||
<br><br>
|
||||
</li>
|
||||
|
||||
<li>Pager plugin (<a href="example-pager.html">basic</a> & <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.26.5</span>).</li>
|
||||
<li>Pager plugin (<a href="example-pager.html">basic</a> & <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.26.6</span>).</li>
|
||||
<li>
|
||||
Pager widget (<a href="example-widget-pager.html">basic</a> & <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.26.5</span>).<br>
|
||||
Pager widget (<a href="example-widget-pager.html">basic</a> & <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.26.6</span>).<br>
|
||||
<br>
|
||||
</li>
|
||||
|
||||
@ -499,7 +499,7 @@
|
||||
<li><a href="example-widgets.html">Repeat headers widget</a> (v2.0.5; <span class="version updated">v2.19.0</span>).</li>
|
||||
<li><span class="results">†</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.26.5</span>).</li>
|
||||
<li><span class="results">†</span> <a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27; <span class="version updated">v2.24.0</span>).</li>
|
||||
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.26.3</span>).</li>
|
||||
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.26.6</span>).</li>
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-to-hash.html">Sort-to-hash widget</a> (<span class="version">v2.22.4</span>; <span class="version updated">v2.24.4</span>).</li>
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-tbodies.html">Sort tbodies widget</a> (<span class="version">v2.22.2</span>; <span class="version updated">v2.24.6</span>).</li>
|
||||
<li><a href="example-widget-static-row.html">Static row widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.24.0</span>).</li>
|
||||
@ -509,13 +509,13 @@
|
||||
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li>
|
||||
|
||||
<li><span class="results">†</span> UITheme widget (<span class="version updated">v2.17.4</span>; <span class="version updated">v2.19.0</span>):
|
||||
<li><span class="results">†</span> UITheme widget (<span class="version updated">v2.17.4</span>; <span class="version updated">v2.26.6</span>):
|
||||
<ul>
|
||||
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9).</li>
|
||||
<li><a href="example-widget-bootstrap-theme-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>) & <a href="example-widget-bootstrap-theme.html">Bootstrap v3.x</a> (v2.4).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-view.html">View Widget</a> (<span class="version">v2.24.0</span>).</li>
|
||||
<li><span class="label label-info">Beta</span> <a href="example-widget-view.html">View Widget</a> (<span class="version">v2.24.0</span>; <span class="version updated">v2.26.6</span>).</li>
|
||||
<li><span class="results">‡</span> <a href="example-widget-zebra.html">Zebra stripe widget</a>.</li>
|
||||
</ul>
|
||||
|
||||
@ -1938,7 +1938,8 @@ $(function(){
|
||||
|
||||
// Set this option to true to hide the filter row initially. The row is
|
||||
// revealed by hovering over the filter row or giving any filter
|
||||
// input/select focus.
|
||||
// input/select focus. In v2.26.6, a function can be used to set when
|
||||
// to hide the filter row.
|
||||
filter_hideFilters: false,
|
||||
|
||||
// Set this option to false to keep the searches case sensitive
|
||||
@ -2689,14 +2690,15 @@ filter_cssFilter : [ '', 'hidden', '', 'hidden' ]</pre>
|
||||
});</pre>
|
||||
Exclusion names must be separated by a comma. Here is a full list of filter type names:
|
||||
<ul>
|
||||
<li><code>and</code> - logical <code>" AND "</code> or <code> && </code> type filter.</li>
|
||||
<li><code>and</code> - logical AND type filter (using <code>foo AND bar</code> or <code>foo && bar</code>).</li>
|
||||
<li><code>or</code> - logical OR type filter (using <code>foo OR bar</code> or <code>foo|bar</code>).</li>
|
||||
<li><code>exact</code> - exact match (using <code>"</code> or <code>=</code>).</li>
|
||||
<li><code>fuzzy</code> - fuzzy match (<code>~</code>)</li>
|
||||
<li><code>notMatch</code> - not match (<code>!</code> or <code>!=</code>)</li>
|
||||
<li><code>operators</code> - comparison filters (<code>< <= >= ></code>)</li>
|
||||
<li><code>range</code> - range (<code> - </code> or <code> to </code>)</li>
|
||||
<li><code>regex</code> - regex (<code>/\d/</code>)</li>
|
||||
<li><code>wild</code> - wild card matching (<code>?</code> for single characters, <code>*</code> for multiple characters not including spaces, or <code>|</code> or <code> OR </code> for a logical OR.</li>
|
||||
<li><code>wild</code> - wild card matching (<code>?</code> for single characters, <code>*</code> for multiple characters not including spaces, <del>or <code>|</code> or <code> OR </code> for a logical OR</del> (the "or" filter type was separated from "wild" in v2.22.2).</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
@ -2969,10 +2971,10 @@ filter_cssFilter : [ '', 'hidden', '', 'hidden' ]</pre>
|
||||
|
||||
<tr id="widget-filter-hidefilters">
|
||||
<td><a href="#" class="permalink">filter_hideFilters</a></td>
|
||||
<td>Boolean</td>
|
||||
<td>Boolean, or Function</td>
|
||||
<td>false</td>
|
||||
<td>
|
||||
Filter widget: Set this option to <code>true</code> to hide the filter row initially. The row is revealed by hovering over the visible portion of the filter row or by giving any filter input/select focus (tab key) (v2.4).
|
||||
Filter widget: Set this option to <code>true</code> to hide the filter row initially. The row is revealed by hovering over the visible portion of the filter row or by giving any filter input/select focus (tab key) (v2.4; <span class="version updated">v2.26.6</span>).
|
||||
<div class="collapsible">
|
||||
<br>
|
||||
Use the <a href="#widget-filter-hidefilters"><code>filter_hideFilters</code></a> option as follows:
|
||||
@ -2983,7 +2985,30 @@ filter_cssFilter : [ '', 'hidden', '', 'hidden' ]</pre>
|
||||
filter_hideFilters : true
|
||||
}
|
||||
});
|
||||
});</pre>You can change the style (thickness) of the hidden filter row in the tablesorter theme css. Look for <code>.tablesorter-filter-row</code> (revealed row) and <code>.tablesorter-filter-row.hideme</code> (for the hidden row) css definitions.</div>
|
||||
});</pre>You can change the style (thickness) of the hidden filter row in the tablesorter theme css. Look for <code>.tablesorter-filter-row</code> (revealed row) and <code>.tablesorter-filter-row.hideme</code> (for the hidden row) css definitions.
|
||||
In <span class="version updated">v2.26.6</span>, this setting can also contain a function.
|
||||
<ul>
|
||||
<li>When this function returns a boolean value, it signifies whether the filter row should or should not be hidden (see the details in <a href="https://github.com/Mottie/tablesorter/issues/477#issuecomment-229352896">this issue</a>.</li>
|
||||
<li>If this function does not return a boolean value, the value of the filters are checked and if no search queries are found, the filter row will be hidden.</li>
|
||||
</ul>
|
||||
Example of function setting:
|
||||
<pre class="prettyprint lang-js">$(function(){
|
||||
$("table").tablesorter({
|
||||
widgets: ["filter"],
|
||||
widgetOptions : {
|
||||
filter_hideFilters : function(config) {
|
||||
// get an array of filter queries (don't use the value from
|
||||
// `config.lastSearch` because this code will modify it;
|
||||
// unless you extend it)
|
||||
var search = $.tablesorter.getFilters(config.$table);
|
||||
// ignore any query is column 2 (zero-based index)
|
||||
search.splice(2,1);
|
||||
// return true to hide the filter row, false to show it
|
||||
return search.join("") === "";
|
||||
}
|
||||
}
|
||||
});
|
||||
});</pre></div>
|
||||
</td>
|
||||
<td><a href="example-widget-filter.html">Example</a></td>
|
||||
</tr>
|
||||
|
9
docs/js/jquery-latest.min.js
vendored
9
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 06-28-2016 (v2.26.5)*/
|
||||
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}(function($) {
|
||||
|
||||
/*! TableSorter (FORK) v2.26.5 *//*
|
||||
/*! TableSorter (FORK) v2.26.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -39,7 +39,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.26.5',
|
||||
version : '2.26.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1777,14 +1777,14 @@
|
||||
regex = ts.regex;
|
||||
// first try and sort Hex codes
|
||||
if ( regex.hex.test( b ) ) {
|
||||
aNum = parseInt( a.match( regex.hex ), 16 );
|
||||
bNum = parseInt( b.match( regex.hex ), 16 );
|
||||
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
||||
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
||||
if ( aNum < bNum ) { return -1; }
|
||||
if ( aNum > bNum ) { return 1; }
|
||||
}
|
||||
// chunk/tokenize
|
||||
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
max = Math.max( aNum.length, bNum.length );
|
||||
// natural sorting through split numeric strings and default strings
|
||||
for ( indx = 0; indx < max; indx++ ) {
|
||||
@ -2839,7 +2839,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -2897,7 +2897,7 @@
|
||||
id: 'uitheme',
|
||||
priority: 10,
|
||||
format: function(table, c, wo) {
|
||||
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
themesAll = ts.themes,
|
||||
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
||||
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
||||
@ -2964,10 +2964,20 @@
|
||||
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
||||
.addClass(themes.icons || '');
|
||||
}
|
||||
if ($table.hasClass('hasFilters')) {
|
||||
// filter widget initializes after uitheme
|
||||
if (c.widgets.indexOf('filter') > -1) {
|
||||
tmp = function() {
|
||||
$table.children('thead').children('.' + ts.css.filterRow)
|
||||
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
||||
.addClass(themes.filterRow || '');
|
||||
};
|
||||
if (wo.filter_initialized) {
|
||||
tmp();
|
||||
} else {
|
||||
$table.one('filterInit', function() {
|
||||
tmp();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < c.columns; i++) {
|
||||
@ -3104,7 +3114,7 @@
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -3891,12 +3901,13 @@
|
||||
.attr( 'data-lastSearchTime', new Date().getTime() )
|
||||
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
||||
.bind( 'keydown' + namespace, function( event ) {
|
||||
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
|
||||
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
||||
// prevent keypress event
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bind( 'keyup' + namespace, function( event ) {
|
||||
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||
// emulate what webkit does.... escape clears the filter
|
||||
@ -3923,7 +3934,8 @@
|
||||
// don't get cached data, in case data-column changes dynamically
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
if ( table.config.widgetOptions.filter_initialized &&
|
||||
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
||||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
||||
( event.type === 'input' && this.value === '' ) ) {
|
||||
@ -3972,7 +3984,7 @@
|
||||
// show/hide filter row as needed
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
|
||||
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
@ -4005,26 +4017,34 @@
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideFiltersCheck: function( c ) {
|
||||
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
||||
var val = c.widgetOptions.filter_hideFilters( c );
|
||||
if (typeof val === 'boolean') {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return ts.getFilters( c.$table ).join( '' ) === '';
|
||||
},
|
||||
hideFilters: function( c, $table ) {
|
||||
var timer,
|
||||
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
|
||||
$row
|
||||
var timer;
|
||||
( $table || c.$table )
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
$row = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
$filterRow.removeClass( tscss.filterRowHide );
|
||||
$row.removeClass( tscss.filterRowHide );
|
||||
} else {
|
||||
// don't hide if input has focus
|
||||
// $( ':focus' ) needs jQuery 1.6+
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
||||
// don't hide row if any filter has a value
|
||||
if ( c.lastCombinedFilter === '' ) {
|
||||
$filterRow.addClass( tscss.filterRowHide );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
||||
}
|
||||
}
|
||||
}, 200 );
|
||||
@ -4036,9 +4056,7 @@
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
||||
}, 200 );
|
||||
});
|
||||
},
|
||||
@ -5232,7 +5250,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! TableSorter (FORK) v2.26.5 *//*
|
||||
/*! TableSorter (FORK) v2.26.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -21,7 +21,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.26.5',
|
||||
version : '2.26.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -1759,14 +1759,14 @@
|
||||
regex = ts.regex;
|
||||
// first try and sort Hex codes
|
||||
if ( regex.hex.test( b ) ) {
|
||||
aNum = parseInt( a.match( regex.hex ), 16 );
|
||||
bNum = parseInt( b.match( regex.hex ), 16 );
|
||||
aNum = parseInt( ( a || '' ).match( regex.hex ), 16 );
|
||||
bNum = parseInt( ( b || '' ).match( regex.hex ), 16 );
|
||||
if ( aNum < bNum ) { return -1; }
|
||||
if ( aNum > bNum ) { return 1; }
|
||||
}
|
||||
// chunk/tokenize
|
||||
aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
aNum = ( a || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
bNum = ( b || '' ).replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
|
||||
max = Math.max( aNum.length, bNum.length );
|
||||
// natural sorting through split numeric strings and default strings
|
||||
for ( indx = 0; indx < max; indx++ ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 06-28-2016 (v2.26.5)*/
|
||||
/*! tablesorter (FORK) - updated 07-11-2016 (v2.26.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -165,7 +165,7 @@
|
||||
id: 'uitheme',
|
||||
priority: 10,
|
||||
format: function(table, c, wo) {
|
||||
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
themesAll = ts.themes,
|
||||
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
||||
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
||||
@ -232,10 +232,20 @@
|
||||
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
||||
.addClass(themes.icons || '');
|
||||
}
|
||||
if ($table.hasClass('hasFilters')) {
|
||||
// filter widget initializes after uitheme
|
||||
if (c.widgets.indexOf('filter') > -1) {
|
||||
tmp = function() {
|
||||
$table.children('thead').children('.' + ts.css.filterRow)
|
||||
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
||||
.addClass(themes.filterRow || '');
|
||||
};
|
||||
if (wo.filter_initialized) {
|
||||
tmp();
|
||||
} else {
|
||||
$table.one('filterInit', function() {
|
||||
tmp();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < c.columns; i++) {
|
||||
@ -372,7 +382,7 @@
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -1159,12 +1169,13 @@
|
||||
.attr( 'data-lastSearchTime', new Date().getTime() )
|
||||
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
||||
.bind( 'keydown' + namespace, function( event ) {
|
||||
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
|
||||
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
||||
// prevent keypress event
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bind( 'keyup' + namespace, function( event ) {
|
||||
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||
// emulate what webkit does.... escape clears the filter
|
||||
@ -1191,7 +1202,8 @@
|
||||
// don't get cached data, in case data-column changes dynamically
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
if ( table.config.widgetOptions.filter_initialized &&
|
||||
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
||||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
||||
( event.type === 'input' && this.value === '' ) ) {
|
||||
@ -1240,7 +1252,7 @@
|
||||
// show/hide filter row as needed
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
|
||||
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
@ -1273,26 +1285,34 @@
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideFiltersCheck: function( c ) {
|
||||
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
||||
var val = c.widgetOptions.filter_hideFilters( c );
|
||||
if (typeof val === 'boolean') {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return ts.getFilters( c.$table ).join( '' ) === '';
|
||||
},
|
||||
hideFilters: function( c, $table ) {
|
||||
var timer,
|
||||
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
|
||||
$row
|
||||
var timer;
|
||||
( $table || c.$table )
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
$row = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
$filterRow.removeClass( tscss.filterRowHide );
|
||||
$row.removeClass( tscss.filterRowHide );
|
||||
} else {
|
||||
// don't hide if input has focus
|
||||
// $( ':focus' ) needs jQuery 1.6+
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
||||
// don't hide row if any filter has a value
|
||||
if ( c.lastCombinedFilter === '' ) {
|
||||
$filterRow.addClass( tscss.filterRowHide );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
||||
}
|
||||
}
|
||||
}, 200 );
|
||||
@ -1304,9 +1324,7 @@
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
||||
}, 200 );
|
||||
});
|
||||
},
|
||||
@ -2500,7 +2518,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Widget: columnSelector (responsive table widget) - updated 4/29/2016 (v2.25.9) *//*
|
||||
/* Widget: columnSelector (responsive table widget) - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Justin Hallett & Rob Garrison
|
||||
*/
|
||||
@ -348,7 +348,7 @@
|
||||
}
|
||||
// only add resize end if using media queries
|
||||
if ( hasSpans && wo.columnSelector_mediaquery ) {
|
||||
nspace = c.namespace.slice( 1 ) + 'columnselector';
|
||||
nspace = c.namespace + 'columnselector';
|
||||
// Setup window.resizeEnd event
|
||||
$window
|
||||
.off( nspace )
|
||||
@ -365,15 +365,18 @@
|
||||
adjustColspans: function(c, wo) {
|
||||
var index, cols, col, span, end, $cell,
|
||||
colSel = c.selector,
|
||||
autoModeOn = colSel.auto,
|
||||
$colspans = $( c.namespace + 'columnselectorHasSpan' ),
|
||||
len = $colspans.length;
|
||||
if ( len ) {
|
||||
filtered = wo.filter_filteredRow || 'filtered',
|
||||
autoModeOn = wo.columnSelector_mediaquery && colSel.auto,
|
||||
// find all header/footer cells in case a regular column follows a colspan; see #1238
|
||||
$headers = c.$table.children( 'thead, tfoot' ).children().children()
|
||||
.add( $(c.namespace + '_extra_table').children( 'thead, tfoot' ).children().children() ),
|
||||
len = $headers.length;
|
||||
for ( index = 0; index < len; index++ ) {
|
||||
$cell = $colspans.eq(index);
|
||||
$cell = $headers.eq(index);
|
||||
col = parseInt( $cell.attr('data-column'), 10 ) || $cell[0].cellIndex;
|
||||
span = parseInt( $cell.attr('data-col-span'), 10 );
|
||||
span = parseInt( $cell.attr('data-col-span'), 10 ) || 1;
|
||||
end = col + span;
|
||||
if ( span > 1 ) {
|
||||
for ( cols = col; cols < end; cols++ ) {
|
||||
if ( !autoModeOn && colSel.states[ cols ] === false ||
|
||||
autoModeOn && c.$headerIndexed[ cols ] && !c.$headerIndexed[ cols ].is(':visible') ) {
|
||||
@ -381,10 +384,12 @@
|
||||
}
|
||||
}
|
||||
if ( span ) {
|
||||
$cell.removeClass( wo.filter_filteredRow || 'filtered' )[0].colSpan = span;
|
||||
$cell.removeClass( filtered )[0].colSpan = span;
|
||||
} else {
|
||||
$cell.addClass( wo.filter_filteredRow || 'filtered' );
|
||||
$cell.addClass( filtered );
|
||||
}
|
||||
} else if ( typeof colSel.states[ col ] !== 'undefined' ) {
|
||||
$cell.toggleClass( filtered, !colSel.states[ col ] );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: filter, select2 formatter function - updated 5/28/2016 (v2.26.2) *//*
|
||||
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) *//*
|
||||
* 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+)
|
||||
*/
|
||||
@ -25,28 +25,40 @@
|
||||
|
||||
}, select2Def ),
|
||||
arry, data,
|
||||
c = $cell.closest('table')[0].config,
|
||||
// add class to $cell since it may point to a removed DOM node
|
||||
// after a "refreshWidgets"; see #1237
|
||||
c = $cell.addClass('select2col' + indx).closest('table')[0].config,
|
||||
wo = c.widgetOptions,
|
||||
// Add a hidden input to hold the range values
|
||||
$input = $('<input class="filter" type="hidden">')
|
||||
.appendTo($cell)
|
||||
// hidden filter update namespace trigger by filter widget
|
||||
.bind('change' + c.namespace + 'filter', function(){
|
||||
var val = this.value;
|
||||
val = val.replace(/[/()$^]/g, '').split('|');
|
||||
$cell.find('.select2').select2('val', val);
|
||||
var val = convertRegex(this.value);
|
||||
c.$table.find('.select2col' + indx + ' .select2').select2('val', val);
|
||||
updateSelect2();
|
||||
}),
|
||||
$header = c.$headerIndexed[indx],
|
||||
onlyAvail = $header.hasClass(wo.filter_onlyAvail),
|
||||
$shcell = [],
|
||||
matchPrefix = o.match ? '' : '^',
|
||||
matchSuffix = o.match ? '' : '$',
|
||||
flags = wo.filter_ignoreCase ? 'i' : '',
|
||||
|
||||
convertRegex = function(val) {
|
||||
// value = '/(^x$|^y$)/' => ['x','y']
|
||||
return val
|
||||
.replace(/^\/\(\^?/, '')
|
||||
.replace(/\$\|\^/g, '|')
|
||||
.replace(/\$?\)\/i?$/g, '')
|
||||
// unescape special regex characters
|
||||
.replace(/\\/g, '')
|
||||
.split('|');
|
||||
},
|
||||
|
||||
// this function updates the hidden input and adds the current values to the header cell text
|
||||
updateSelect2 = function() {
|
||||
var arry = false,
|
||||
v = $cell.find('.select2').select2('val') || o.value || '';
|
||||
v = c.$table.find('.select2col' + indx + ' .select2').select2('val') || o.value || '';
|
||||
// convert array to string
|
||||
if ($.isArray(v)) {
|
||||
arry = true;
|
||||
@ -60,12 +72,16 @@
|
||||
}
|
||||
$input
|
||||
// add regex, so we filter exact numbers
|
||||
.val( $.isArray(v) && v.length && v.join('') !== '' ? '/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' : '' )
|
||||
.val(
|
||||
$.isArray(v) && v.length && v.join('') !== '' ?
|
||||
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
|
||||
''
|
||||
)
|
||||
.trigger('search').end()
|
||||
.find('.select2').select2('val', v);
|
||||
// update sticky header cell
|
||||
if ($shcell.length) {
|
||||
$shcell.find('.select2').select2('val', v);
|
||||
if (c.widgetOptions.$sticky) {
|
||||
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
||||
}
|
||||
},
|
||||
|
||||
@ -91,13 +107,14 @@
|
||||
// data options are already defined
|
||||
if (!(o.ajax && !$.isEmptyObject(o.ajax)) && !o.data) {
|
||||
updateOptions();
|
||||
if (onlyAvail) {
|
||||
c.$table.bind('filterEnd', function(){
|
||||
updateOptions();
|
||||
$cell.add($shcell).find('.select2').select2(o);
|
||||
c.$table
|
||||
.find('.select2col' + indx)
|
||||
.add(c.widgetOptions.$sticky && c.widgetOptions.$sticky.find('.select2col' + indx))
|
||||
.find('.select2').select2(o);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// add a select2 hidden input!
|
||||
$('<input class="select2 select2-' + indx + '" type="hidden" />')
|
||||
@ -109,10 +126,10 @@
|
||||
});
|
||||
|
||||
// update select2 from filter hidden input, in case of saved filters
|
||||
c.$table.bind('filterFomatterUpdate', function(){
|
||||
c.$table.bind('filterFomatterUpdate', function() {
|
||||
// value = '/(^x$|^y$)/' => 'x,y'
|
||||
var val = c.$table.data('lastSearch')[indx] || '';
|
||||
val = val.replace(/^\/\(\^?/, '').replace(/\$\|\^/g, '|').replace(/\$?\)\/$/g, '').split('|');
|
||||
var val = convertRegex(c.$table.data('lastSearch')[indx] || '');
|
||||
$cell = c.$table.find('.select2col' + indx);
|
||||
$cell.find('.select2').select2('val', val);
|
||||
updateSelect2();
|
||||
ts.filter.formatterUpdated($cell, indx);
|
||||
@ -120,25 +137,26 @@
|
||||
|
||||
// has sticky headers?
|
||||
c.$table.bind('stickyHeadersInit', function(){
|
||||
$shcell = c.widgetOptions.$sticky.find('.' + ts.css.filterRow).children().eq(indx).empty();
|
||||
var $shcell = c.widgetOptions.$sticky.find('.select2col' + indx).empty();
|
||||
// add a select2!
|
||||
$('<input class="select2 select2-' + indx + '" type="hidden">')
|
||||
.val(o.value)
|
||||
.appendTo($shcell)
|
||||
.select2(o)
|
||||
.bind('change', function(){
|
||||
$cell.find('.select2').select2('val', $shcell.find('.select2').select2('val') );
|
||||
c.$table.find('.select2col' + indx)
|
||||
.find('.select2')
|
||||
.select2('val', c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val') );
|
||||
updateSelect2();
|
||||
});
|
||||
if (o.cellText) {
|
||||
$shcell.prepend('<label>' + o.cellText + '</label>');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// on reset
|
||||
c.$table.bind('filterReset', function(){
|
||||
$cell.find('.select2').select2('val', o.value || '');
|
||||
c.$table.find('.select2col' + indx).find('.select2').select2('val', o.value || '');
|
||||
setTimeout(function(){
|
||||
updateSelect2();
|
||||
}, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: filter - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: filter - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -785,12 +785,13 @@
|
||||
.attr( 'data-lastSearchTime', new Date().getTime() )
|
||||
.unbind( tmp.replace( ts.regex.spaces, ' ' ) )
|
||||
.bind( 'keydown' + namespace, function( event ) {
|
||||
if ( event.which === tskeyCodes.escape && !wo.filter_resetOnEsc ) {
|
||||
if ( event.which === tskeyCodes.escape && !table.config.widgetOptions.filter_resetOnEsc ) {
|
||||
// prevent keypress event
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.bind( 'keyup' + namespace, function( event ) {
|
||||
wo = table.config.widgetOptions; // make sure "wo" isn't cached
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||
// emulate what webkit does.... escape clears the filter
|
||||
@ -817,7 +818,8 @@
|
||||
// don't get cached data, in case data-column changes dynamically
|
||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||
if ( wo.filter_initialized && ( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
if ( table.config.widgetOptions.filter_initialized &&
|
||||
( event.which === tskeyCodes.enter || event.type === 'search' ||
|
||||
( event.type === 'change' ) && this.value !== c.lastSearch[column] ) ||
|
||||
// only "input" event fires in MS Edge when clicking the "x" to clear the search
|
||||
( event.type === 'input' && this.value === '' ) ) {
|
||||
@ -866,7 +868,7 @@
|
||||
// show/hide filter row as needed
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.triggerHandler( combinedFilters === '' ? 'mouseleave' : 'mouseenter' );
|
||||
.triggerHandler( tsf.hideFiltersCheck( c ) ? 'mouseleave' : 'mouseenter' );
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
@ -899,26 +901,34 @@
|
||||
return false;
|
||||
}
|
||||
},
|
||||
hideFiltersCheck: function( c ) {
|
||||
if (typeof c.widgetOptions.filter_hideFilters === 'function') {
|
||||
var val = c.widgetOptions.filter_hideFilters( c );
|
||||
if (typeof val === 'boolean') {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return ts.getFilters( c.$table ).join( '' ) === '';
|
||||
},
|
||||
hideFilters: function( c, $table ) {
|
||||
var timer,
|
||||
$row = ( $table || c.$table ).find( '.' + tscss.filterRow ).addClass( tscss.filterRowHide );
|
||||
$row
|
||||
var timer;
|
||||
( $table || c.$table )
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
$row = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
$filterRow.removeClass( tscss.filterRowHide );
|
||||
$row.removeClass( tscss.filterRowHide );
|
||||
} else {
|
||||
// don't hide if input has focus
|
||||
// $( ':focus' ) needs jQuery 1.6+
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $filterRow[0] ) {
|
||||
if ( $( document.activeElement ).closest( 'tr' )[0] !== $row[0] ) {
|
||||
// don't hide row if any filter has a value
|
||||
if ( c.lastCombinedFilter === '' ) {
|
||||
$filterRow.addClass( tscss.filterRowHide );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) );
|
||||
}
|
||||
}
|
||||
}, 200 );
|
||||
@ -930,9 +940,7 @@
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
$row.toggleClass( tscss.filterRowHide, tsf.hideFiltersCheck( c ) && event.type !== 'focus' );
|
||||
}, 200 );
|
||||
});
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: grouping - updated 6/28/2015 (v2.26.5) *//*
|
||||
/*! Widget: grouping - updated 7/11/2016 (v2.26.6) *//*
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -151,12 +151,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// save collapsed groups
|
||||
if ( wo.group_saveGroups &&
|
||||
!$.isEmptyObject( wo.group_collapsedGroups ) &&
|
||||
wo.group_collapsedGroups[ wo.group_collapsedGroup ].length ) {
|
||||
|
||||
name = $row.find( '.group-name' ).text().toLowerCase() + $row.attr( 'data-group-index' );
|
||||
isHidden = $.inArray( name, wo.group_collapsedGroups[ wo.group_collapsedGroup ] ) > -1;
|
||||
$row.toggleClass( 'collapsed', isHidden );
|
||||
@ -172,7 +170,7 @@
|
||||
var name = ( data.currentGroup || '' ).replace(/</g, '<').replace(/>/g, '>');
|
||||
return '<tr class="group-header ' + c.selectorRemove.slice(1) +
|
||||
'" unselectable="on" ' + ( c.tabIndex ? 'tabindex="0" ' : '' ) + 'data-group-index="' +
|
||||
( data.groupIndex++ ) + '">' +
|
||||
data.groupIndex + '">' +
|
||||
'<td colspan="' + c.columns + '">' +
|
||||
( wo.group_collapsible ? '<i/>' : '' ) +
|
||||
'<span class="group-name">' + name + '</span>' +
|
||||
@ -183,8 +181,8 @@
|
||||
// save current grouping
|
||||
var saveName, direction,
|
||||
savedGroup = false;
|
||||
if (wo.group_collapsible && wo.group_saveGroups && ts.storage) {
|
||||
wo.group_collapsedGroups = ts.storage( c.table, 'tablesorter-groups' ) || {};
|
||||
if (wo.group_collapsible && wo.group_saveGroups) {
|
||||
wo.group_collapsedGroups = ts.storage && ts.storage( c.table, 'tablesorter-groups' ) || {};
|
||||
// include direction when saving groups (reversed numbers shows different range values)
|
||||
direction = 'dir' + c.sortList[0][1];
|
||||
// combine column, sort direction & grouping as save key
|
||||
@ -234,9 +232,10 @@
|
||||
}
|
||||
data.$row.before( tsg.groupHeaderHTML( c, wo, data ) );
|
||||
if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) {
|
||||
// all groups start collapsed
|
||||
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup );
|
||||
// all groups start collapsed; data.groupIndex is 1 more than the expected index.
|
||||
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup + data.groupIndex );
|
||||
}
|
||||
data.groupIndex++;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: Pager - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: Pager - updated 7/11/2016 (v2.26.6) */
|
||||
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -1085,7 +1085,7 @@
|
||||
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
||||
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
||||
tsp.updatePageDisplay( c, false );
|
||||
} else {
|
||||
} else if (p.initialized) {
|
||||
tsp.getAjax( c );
|
||||
}
|
||||
} else if ( !p.ajax ) {
|
||||
@ -1115,7 +1115,7 @@
|
||||
parsePageSize: function( c, size, mode ) {
|
||||
var p = c.pager,
|
||||
s = parseInt( size, 10 ) || p.size || c.widgetOptions.pager_size || 10;
|
||||
return /all/i.test( size ) || s === p.totalRows ?
|
||||
return p.initialized && (/all/i.test( size ) || s === p.totalRows) ?
|
||||
// "get" to set `p.size` or "set" to set `p.$size.val()`
|
||||
'all' : ( mode === 'get' ? s : p.size );
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: resizable - updated 6/28/2015 (v2.26.5) */
|
||||
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: scroller - updated 6/15/2016 (v2.26.3) *//*
|
||||
/*! Widget: scroller - updated 7/11/2016 (v2.26.6) *//*
|
||||
Copyright (C) 2011 T. Connell & Associates, Inc.
|
||||
|
||||
Dual-licensed under the MIT and GPL licenses
|
||||
@ -370,6 +370,8 @@
|
||||
$tableWrap = $table.parent(),
|
||||
$hdr = wo.scroller_$header,
|
||||
$foot = wo.scroller_$footer,
|
||||
$win = $(window),
|
||||
position = [ $win.scrollLeft(), $win.scrollTop() ],
|
||||
id = c.namespace.slice( 1 ) + 'tsscroller',
|
||||
// Hide other scrollers so we can resize
|
||||
$div = $( 'div.' + tscss.scrollerWrap + '[id!="' + id + '"]' )
|
||||
@ -459,6 +461,8 @@
|
||||
.find( '.' + tscss.scrollerFixed )
|
||||
.find( '.' + tscss.scrollerTable )
|
||||
.scrollTop( wo.scroller_saved[1] );
|
||||
$win.scrollLeft( position[0] );
|
||||
$win.scrollTop( position[1] );
|
||||
|
||||
// update resizable widget handles
|
||||
setTimeout( function() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: uitheme - updated 3/26/2015 (v2.21.3) */
|
||||
/*! Widget: uitheme - updated 7/11/2016 (v2.26.6) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -56,7 +56,7 @@
|
||||
id: 'uitheme',
|
||||
priority: 10,
|
||||
format: function(table, c, wo) {
|
||||
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
|
||||
themesAll = ts.themes,
|
||||
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
|
||||
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
|
||||
@ -123,10 +123,20 @@
|
||||
.removeClass(hasOldTheme ? [ oldtheme.icons, oldIconRmv ].join(' ') : '')
|
||||
.addClass(themes.icons || '');
|
||||
}
|
||||
if ($table.hasClass('hasFilters')) {
|
||||
// filter widget initializes after uitheme
|
||||
if (c.widgets.indexOf('filter') > -1) {
|
||||
tmp = function() {
|
||||
$table.children('thead').children('.' + ts.css.filterRow)
|
||||
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
|
||||
.addClass(themes.filterRow || '');
|
||||
};
|
||||
if (wo.filter_initialized) {
|
||||
tmp();
|
||||
} else {
|
||||
$table.one('filterInit', function() {
|
||||
tmp();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < c.columns; i++) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Widget: view (beta) - updated 10/31/2015 (v2.24.0) */
|
||||
/* Widget: view (beta) - updated 7/11/2016 (v2.26.6) */
|
||||
/* By Justin F. Hallett (https://github.com/TheSin-)
|
||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||
*/
|
||||
@ -100,7 +100,10 @@
|
||||
var content = $(v).html();
|
||||
// Add 2 spans, one is dropped when using .html()
|
||||
var span = $('<span />').append($('<span/>', attrs).append(content));
|
||||
tmpl = tmpl.replace(reg, span.html());
|
||||
tmpl = tmpl.replace(new RegExp(reg, 'g'), span.html());
|
||||
|
||||
reg = '{col' + k + ':raw}';
|
||||
tmpl = tmpl.replace(new RegExp(reg, 'g'), $(v).text());
|
||||
});
|
||||
|
||||
var $tmpl = $(tmpl);
|
||||
@ -115,6 +118,7 @@
|
||||
});
|
||||
|
||||
$(wo.view_container).append($container);
|
||||
c.$table.triggerHandler('viewComplete');
|
||||
},
|
||||
|
||||
removeView: function(c, wo) {
|
||||
@ -151,7 +155,6 @@
|
||||
c.$table.on('tablesorter-ready', function() {
|
||||
view.buildToolBar(c, wo);
|
||||
view.buildView(c, wo);
|
||||
c.$table.triggerHandler('viewComplete');
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.26.5",
|
||||
"version": "2.26.6",
|
||||
"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.26.5",
|
||||
"version": "2.26.6",
|
||||
"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",
|
||||
|
Loading…
Reference in New Issue
Block a user