mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
ac8786c9d3
34
README.md
34
README.md
@ -104,6 +104,28 @@ If you would like to contribute, please...
|
|||||||
|
|
||||||
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
|
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
|
||||||
|
|
||||||
|
#### <a name="v2.28.15">Version 2.28.15</a> (7/4/2017)
|
||||||
|
|
||||||
|
* Core:
|
||||||
|
* Use calculated index instead of DOM index. See [pull #1424](https://github.com/Mottie/tablesorter/pull/1424); thanks [@ced-b](https://github.com/ced-b)!
|
||||||
|
* Fix check count cell indexing.
|
||||||
|
* ColumnSelector:
|
||||||
|
* Remove colspan adjustments when widget removed.
|
||||||
|
* Include tbody colspan updates on removal.
|
||||||
|
* Filter:
|
||||||
|
* Add namespacing to filter-formatter listeners. Needed to prevent JS error when a "resetToLoadState" is triggered and the "filterFomatterUpdate" bindings are still firing.
|
||||||
|
* Fix namespacing of events.
|
||||||
|
* Sort2Hash:
|
||||||
|
* Prevent filter update if unchanged & compare (with) hash filter.
|
||||||
|
* Fix p's (reference to pager object).
|
||||||
|
* Docs
|
||||||
|
* CSS fixed to comply with editable_wrapContent : `<div>`. See [pull #1420](https://github.com/Mottie/tablesorter/pull/1420); thanks [@LaurentBarbareau](https://github.com/LaurentBarbareau)!
|
||||||
|
* Remove note on contenteditable wrapping. See [pull #1420](https://github.com/Mottie/tablesorter/pull/1420).
|
||||||
|
* Update pager widget options in demo code.
|
||||||
|
* Use src files in filter formatter demo for testing.
|
||||||
|
* Meta:
|
||||||
|
* Include `js` & `css` folders with bower installs.
|
||||||
|
|
||||||
#### <a name="v2.28.14">Version 2.28.14</a> (6/8/2017)
|
#### <a name="v2.28.14">Version 2.28.14</a> (6/8/2017)
|
||||||
|
|
||||||
* Core:
|
* Core:
|
||||||
@ -127,15 +149,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
|
|||||||
* Meta:
|
* Meta:
|
||||||
* Set jQuery dependency back to >=1.2.6. Fixes [issue #1411](https://github.com/Mottie/tablesorter/issues/1411).
|
* Set jQuery dependency back to >=1.2.6. Fixes [issue #1411](https://github.com/Mottie/tablesorter/issues/1411).
|
||||||
* Add `package-lock.json` file.
|
* Add `package-lock.json` file.
|
||||||
|
|
||||||
#### <a name="v2.28.12">Version 2.28.12</a> (5/26/2017)
|
|
||||||
|
|
||||||
* ColumnSelector:
|
|
||||||
* Don't clear container on updateAll. Fixes [issue #1406](https://github.com/Mottie/tablesorter/issues/1406).
|
|
||||||
* Filter:
|
|
||||||
* Return `null` from `filter_selectSource` to prevent select updates; From discussion in IRC with [@alexweissman](https://github.com/alexweissman).
|
|
||||||
* Select searches now process filter types, then exactly match. Previously only exact matches were performed by default, filter types were ignored. This broke the filter + jQuery UI selectmenu demo.
|
|
||||||
* Docs/Meta:
|
|
||||||
* Fix linting issues.
|
|
||||||
* Update jQuery UI to v1.12.1.
|
|
||||||
* Update [filter selectmenu demo](https://mottie.github.io/tablesorter/docs/example-widget-filter-selectmenu.html).
|
|
||||||
|
@ -34,11 +34,8 @@
|
|||||||
"/node_modules",
|
"/node_modules",
|
||||||
"/bower_components",
|
"/bower_components",
|
||||||
"/.git",
|
"/.git",
|
||||||
"/addons",
|
|
||||||
"/beta-testing",
|
"/beta-testing",
|
||||||
"/css",
|
|
||||||
"/docs",
|
"/docs",
|
||||||
"/js",
|
|
||||||
"/testing",
|
"/testing",
|
||||||
"/Gruntfile.js",
|
"/Gruntfile.js",
|
||||||
"/package.json",
|
"/package.json",
|
||||||
|
22
dist/js/jquery.tablesorter.combined.js
vendored
22
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
|
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
||||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
}(function(jQuery) {
|
}(function(jQuery) {
|
||||||
|
|
||||||
/*! TableSorter (FORK) v2.28.14 *//*
|
/*! TableSorter (FORK) v2.28.15 *//*
|
||||||
* Client-side table sorting with ease!
|
* Client-side table sorting with ease!
|
||||||
* @requires jQuery v1.2.6+
|
* @requires jQuery v1.2.6+
|
||||||
*
|
*
|
||||||
@ -34,7 +34,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter = {
|
var ts = $.tablesorter = {
|
||||||
|
|
||||||
version : '2.28.14',
|
version : '2.28.15',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -2252,7 +2252,7 @@
|
|||||||
cells = $rows[ i ].cells;
|
cells = $rows[ i ].cells;
|
||||||
for ( j = 0; j < cells.length; j++ ) {
|
for ( j = 0; j < cells.length; j++ ) {
|
||||||
cell = cells[ j ];
|
cell = cells[ j ];
|
||||||
rowIndex = cell.parentNode.rowIndex;
|
rowIndex = i;
|
||||||
rowSpan = cell.rowSpan || 1;
|
rowSpan = cell.rowSpan || 1;
|
||||||
colSpan = cell.colSpan || 1;
|
colSpan = cell.colSpan || 1;
|
||||||
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
||||||
@ -2311,7 +2311,7 @@
|
|||||||
if ( !valid ) {
|
if ( !valid ) {
|
||||||
$rows.each( function( indx, el ) {
|
$rows.each( function( indx, el ) {
|
||||||
var cell = el.parentElement.nodeName;
|
var cell = el.parentElement.nodeName;
|
||||||
if ( cells.indexOf( cell ) ) {
|
if ( cells.indexOf( cell ) < 0 ) {
|
||||||
cells.push( cell );
|
cells.push( cell );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -3268,7 +3268,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
|
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3339,8 +3339,10 @@
|
|||||||
var tbodyIndex, $tbody,
|
var tbodyIndex, $tbody,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
events = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search '
|
events = (
|
||||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
||||||
|
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
||||||
|
).split( ' ' ).join( c.namespace + 'filter ' );
|
||||||
$table
|
$table
|
||||||
.removeClass( 'hasFilters' )
|
.removeClass( 'hasFilters' )
|
||||||
// add filter namespace to all BUT search
|
// add filter namespace to all BUT search
|
||||||
@ -3869,7 +3871,9 @@
|
|||||||
// so we have to work with it instead
|
// so we have to work with it instead
|
||||||
formatterUpdated: function( $cell, column ) {
|
formatterUpdated: function( $cell, column ) {
|
||||||
// prevent error if $cell is undefined - see #1056
|
// prevent error if $cell is undefined - see #1056
|
||||||
var wo = $cell && $cell.closest( 'table' )[0].config.widgetOptions;
|
var $table = $cell && $cell.closest( 'table' );
|
||||||
|
var config = $table.length && $table[0].config,
|
||||||
|
wo = config && config.widgetOptions;
|
||||||
if ( wo && !wo.filter_initialized ) {
|
if ( wo && !wo.filter_initialized ) {
|
||||||
// add updates by column since this function
|
// add updates by column since this function
|
||||||
// may be called numerous times before initialization
|
// may be called numerous times before initialization
|
||||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
8
dist/js/jquery.tablesorter.js
vendored
8
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
}(function(jQuery) {
|
}(function(jQuery) {
|
||||||
|
|
||||||
/*! TableSorter (FORK) v2.28.14 *//*
|
/*! TableSorter (FORK) v2.28.15 *//*
|
||||||
* Client-side table sorting with ease!
|
* Client-side table sorting with ease!
|
||||||
* @requires jQuery v1.2.6+
|
* @requires jQuery v1.2.6+
|
||||||
*
|
*
|
||||||
@ -32,7 +32,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter = {
|
var ts = $.tablesorter = {
|
||||||
|
|
||||||
version : '2.28.14',
|
version : '2.28.15',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -2250,7 +2250,7 @@
|
|||||||
cells = $rows[ i ].cells;
|
cells = $rows[ i ].cells;
|
||||||
for ( j = 0; j < cells.length; j++ ) {
|
for ( j = 0; j < cells.length; j++ ) {
|
||||||
cell = cells[ j ];
|
cell = cells[ j ];
|
||||||
rowIndex = cell.parentNode.rowIndex;
|
rowIndex = i;
|
||||||
rowSpan = cell.rowSpan || 1;
|
rowSpan = cell.rowSpan || 1;
|
||||||
colSpan = cell.colSpan || 1;
|
colSpan = cell.colSpan || 1;
|
||||||
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
||||||
@ -2309,7 +2309,7 @@
|
|||||||
if ( !valid ) {
|
if ( !valid ) {
|
||||||
$rows.each( function( indx, el ) {
|
$rows.each( function( indx, el ) {
|
||||||
var cell = el.parentElement.nodeName;
|
var cell = el.parentElement.nodeName;
|
||||||
if ( cells.indexOf( cell ) ) {
|
if ( cells.indexOf( cell ) < 0 ) {
|
||||||
cells.push( cell );
|
cells.push( cell );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
2
dist/js/jquery.tablesorter.min.js
vendored
2
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
14
dist/js/jquery.tablesorter.widgets.js
vendored
14
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
|
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
||||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -402,7 +402,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
|
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -473,8 +473,10 @@
|
|||||||
var tbodyIndex, $tbody,
|
var tbodyIndex, $tbody,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
events = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search '
|
events = (
|
||||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
||||||
|
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
||||||
|
).split( ' ' ).join( c.namespace + 'filter ' );
|
||||||
$table
|
$table
|
||||||
.removeClass( 'hasFilters' )
|
.removeClass( 'hasFilters' )
|
||||||
// add filter namespace to all BUT search
|
// add filter namespace to all BUT search
|
||||||
@ -1003,7 +1005,9 @@
|
|||||||
// so we have to work with it instead
|
// so we have to work with it instead
|
||||||
formatterUpdated: function( $cell, column ) {
|
formatterUpdated: function( $cell, column ) {
|
||||||
// prevent error if $cell is undefined - see #1056
|
// prevent error if $cell is undefined - see #1056
|
||||||
var wo = $cell && $cell.closest( 'table' )[0].config.widgetOptions;
|
var $table = $cell && $cell.closest( 'table' );
|
||||||
|
var config = $table.length && $table[0].config,
|
||||||
|
wo = config && config.widgetOptions;
|
||||||
if ( wo && !wo.filter_initialized ) {
|
if ( wo && !wo.filter_initialized ) {
|
||||||
// add updates by column since this function
|
// add updates by column since this function
|
||||||
// may be called numerous times before initialization
|
// may be called numerous times before initialization
|
||||||
|
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
4
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
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
|
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
|
||||||
!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('<input class="filter" type="hidden">').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var t=!1,l=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(l)&&(t=!0,l=l.join("\0")),l=l.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),t&&(l=l.split("\0")),o.val(e.isArray(l)&&l.length&&""!==l.join("")?"/("+u+(l||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",l),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",l)},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend("<label>"+s.cellText+"</label>"),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('<input class="select2 select2-'+c+'" type="hidden" />').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('<input class="select2 select2-'+c+'" type="hidden">').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("<label>"+s.cellText+"</label>")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery);
|
!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('<input class="filter" type="hidden">').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var l=!1,i=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(i)&&(l=!0,i=i.join("\0")),i=i.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),l&&(i=i.split("\0")),t.isEmptyObject(o.find(".select2").data())||(o.val(e.isArray(i)&&i.length&&""!==i.join("")?"/("+u+(i||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",i),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",i))},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend("<label>"+s.cellText+"</label>"),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('<input class="select2 select2-'+c+'" type="hidden" />').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('<input class="select2 select2-'+c+'" type="hidden">').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("<label>"+s.cellText+"</label>")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery);
|
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-sort2Hash.min.js
vendored
4
dist/js/widgets/widget-sort2Hash.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: sort2Hash (BETA) - updated 4/2/2017 (v2.28.6) */
|
/*! Widget: sort2Hash (BETA) - updated 7/4/2017 (v2.28.15) */
|
||||||
!function(e){"use strict";var t=e.tablesorter||{},a=t.sort2Hash={init:function(r,o){var s,n,i,h,d=r.table,c=r.pager,l=t.hasWidget(d,"saveSort"),H=a.decodeHash(r,o,"sort");(H&&!l||H&&l&&o.sort2Hash_overrideSaveSort)&&a.convertString2Sort(r,o,H),t.hasWidget(r.table,"pager")&&(n=parseInt(a.decodeHash(r,o,"page"),10),i=c.page=n<0?0:n>c.totalPages?c.totalPages-1:n,h=c.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(d,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),e.tablesorter.setFilters(d,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,d,c=r.split(t.sort2Hash_separator),l=0,H=c.length,g=[];l<H;){if(s=c[l++],i=parseInt(s,10),isNaN(i)||i>e.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h<e.columns;h++)d=e.$headerIndexed[h],o.test(d.attr(t.sort2Hash_headerTextAttr))&&(s=h,h=e.columns);n=c[l++],void 0!==s&&void 0!==n&&(isNaN(n)&&(n=n.indexOf(t.sort2Hash_directionText[1])>-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],d=h.length;for(r=0;r<d;r++)s=h[r][0],o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)),i.push(""!==o?encodeURIComponent(o):s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},convertFilter2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],d=h.length;for(r=0;r<d;r++)s=h[r][0],s=void 0!==(o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)))?encodeURIComponent(o):s,i.push(s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},getParam:function(e,t,r){t||(t=window.location.hash);var o=new RegExp("[\\?&]"+a.regexEscape(e)+"=([^&#]*)"),s=o.exec(t);return r?o:null===s?"":decodeURIComponent(s[1])},removeParam:function(e,t){t||(t=window.location.hash);var r,o=a.getParam(e,t,!0),s=[],n=t.split("&"),i=n.length;for(r=0;r<i;r++)o.test("&"+n[r])||s.push(n[r]);return s.length?s.join("&"):""},encodeHash:function(e,t,r,o,s){var n=!1,i=a.getTableId(e,t);return"function"==typeof t.sort2Hash_encodeHash&&(n=t.sort2Hash_encodeHash(e,i,r,o,s||o)),!1===n&&(n="&"+r+"["+i+"]="+o),n},decodeHash:function(e,t,r){var o=!1,s=a.getTableId(e,t);return"function"==typeof t.sort2Hash_decodeHash&&(o=t.sort2Hash_decodeHash(e,s,r)),!1===o&&(o=a.getParam(r+"["+s+"]")),o||""},cleanHash:function(e,t,r,o){var s=!1,n=a.getTableId(e,t);return"function"==typeof t.sort2Hash_cleanHash&&(s=t.sort2Hash_cleanHash(e,n,r,o)),!1===s&&(s=a.removeParam(r+"["+n+"]",o)),s||""},setHash:function(r,o){var s="",n=window.location.hash,i=t.hasWidget(r.table,"pager"),h=t.hasWidget(r.table,"filter"),d=a.convertSort2String(r,o),c=h&&""!==r.lastSearch.join("")?r.lastSearch:[],l=encodeURIComponent(c.join(r.widgetOptions.sort2Hash_separator)),H={sort:d?a.encodeHash(r,o,"sort",d,r.sortList):"",page:i?a.encodeHash(r,o,"page",r.pager.page+1):"",size:i?a.encodeHash(r,o,"size",r.pager.size):"",filter:l?a.encodeHash(r,o,"filter",l,c):""};e.each(H,function(e,t){n=a.cleanHash(r,o,e,n),s+=t}),window.location.hash=((window.location.hash||"").replace("#","").length?n:o.sort2Hash_hash)+s}};t.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(e,t,r,o){a.init(r,o)},remove:function(e,t){t.$table.off(".sort2hash")}})}(jQuery);
|
!function(e){"use strict";var t=e.tablesorter||{},a=t.sort2Hash={init:function(r,o){var s,n,i,h,d=r.table,l=r.pager,c=t.hasWidget(d,"saveSort"),H=a.decodeHash(r,o,"sort");(H&&!c||H&&c&&o.sort2Hash_overrideSaveSort)&&a.convertString2Sort(r,o,H),t.hasWidget(r.table,"pager")&&(n=parseInt(a.decodeHash(r,o,"page"),10),i=l.page=n<0?0:n>l.totalPages?l.totalPages-1:n,h=l.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(d,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),(n=t.filter.equalFilters?t.filter.equalFilters(r,r.lastSearch,s):(r.lastSearch||[]).join("")!==(s||[]).join(""))||e.tablesorter.setFilters(d,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,d,l=r.split(t.sort2Hash_separator),c=0,H=l.length,g=[];c<H;){if(s=l[c++],i=parseInt(s,10),isNaN(i)||i>e.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h<e.columns;h++)d=e.$headerIndexed[h],o.test(d.attr(t.sort2Hash_headerTextAttr))&&(s=h,h=e.columns);n=l[c++],void 0!==s&&void 0!==n&&(isNaN(n)&&(n=n.indexOf(t.sort2Hash_directionText[1])>-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],d=h.length;for(r=0;r<d;r++)s=h[r][0],o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)),i.push(""!==o?encodeURIComponent(o):s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},convertFilter2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],d=h.length;for(r=0;r<d;r++)s=h[r][0],s=void 0!==(o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)))?encodeURIComponent(o):s,i.push(s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},getParam:function(e,t,r){t||(t=window.location.hash);var o=new RegExp("[\\?&]"+a.regexEscape(e)+"=([^&#]*)"),s=o.exec(t);return r?o:null===s?"":decodeURIComponent(s[1])},removeParam:function(e,t){t||(t=window.location.hash);var r,o=a.getParam(e,t,!0),s=[],n=t.split("&"),i=n.length;for(r=0;r<i;r++)o.test("&"+n[r])||s.push(n[r]);return s.length?s.join("&"):""},encodeHash:function(e,t,r,o,s){var n=!1,i=a.getTableId(e,t);return"function"==typeof t.sort2Hash_encodeHash&&(n=t.sort2Hash_encodeHash(e,i,r,o,s||o)),!1===n&&(n="&"+r+"["+i+"]="+o),n},decodeHash:function(e,t,r){var o=!1,s=a.getTableId(e,t);return"function"==typeof t.sort2Hash_decodeHash&&(o=t.sort2Hash_decodeHash(e,s,r)),!1===o&&(o=a.getParam(r+"["+s+"]")),o||""},cleanHash:function(e,t,r,o){var s=!1,n=a.getTableId(e,t);return"function"==typeof t.sort2Hash_cleanHash&&(s=t.sort2Hash_cleanHash(e,n,r,o)),!1===s&&(s=a.removeParam(r+"["+n+"]",o)),s||""},setHash:function(r,o){var s="",n=window.location.hash,i=t.hasWidget(r.table,"pager"),h=t.hasWidget(r.table,"filter"),d=a.convertSort2String(r,o),l=h&&""!==r.lastSearch.join("")?r.lastSearch:[],c=encodeURIComponent(l.join(r.widgetOptions.sort2Hash_separator)),H={sort:d?a.encodeHash(r,o,"sort",d,r.sortList):"",page:i?a.encodeHash(r,o,"page",r.pager.page+1):"",size:i?a.encodeHash(r,o,"size",r.pager.size):"",filter:c?a.encodeHash(r,o,"filter",c,l):""};e.each(H,function(e,t){n=a.cleanHash(r,o,e,n),s+=t}),window.location.hash=((window.location.hash||"").replace("#","").length?n:o.sort2Hash_hash)+s}};t.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(e,t,r,o){a.init(r,o)},remove:function(e,t){t.$table.off(".sort2hash")}})}(jQuery);
|
@ -31,7 +31,7 @@
|
|||||||
.color2 { color: blue; }
|
.color2 { color: blue; }
|
||||||
.color3 { color: green; }
|
.color3 { color: green; }
|
||||||
</style>
|
</style>
|
||||||
<style id="css">.tablesorter tbody > tr > td[contenteditable=true]:focus {
|
<style id="css">.tablesorter tbody > tr > td > div[contenteditable=true]:focus {
|
||||||
outline: #08f 1px solid;
|
outline: #08f 1px solid;
|
||||||
background: #eee;
|
background: #eee;
|
||||||
resize: none;
|
resize: none;
|
||||||
@ -122,8 +122,7 @@ td.editable_updated {
|
|||||||
<h3><a href="#">Notes</a></h3>
|
<h3><a href="#">Notes</a></h3>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>This widget can not be applied to the original plugin and requires jQuery 1.7+ and a browser that supports <a href="http://caniuse.com/#feat=contenteditable"><code>contenteditable</code> attributes</a> (almost all modern browsers).</li>
|
<li>This widget can not be applied to the original plugin and requires jQuery 1.7+ and a browser that supports <a href="http://caniuse.com/#feat=contenteditable"><code>contenteditable</code> attributes</a> (almost all modern browsers)<br><br></li>
|
||||||
<li><span class="label warning">Important</span>: In Internet Explorer, please wrap the cell content with a DIV or SPAN as <a href="http://msdn.microsoft.com/en-us/library/ie/ms533690(v=vs.85).aspx">it is not possible to make table cells directly contenteditable</a>. Wrapping the content in the markup is much more efficient than using javascript to do it for you (especially in IE).<br><br></li>
|
|
||||||
<li>In <span class="version">v2.23.0</span>, the <code>editable_columns</code> option will now accept a string with both ranges and single columns, e.g. <code>'1,3-5,7'</code>.</li>
|
<li>In <span class="version">v2.23.0</span>, the <code>editable_columns</code> option will now accept a string with both ranges and single columns, e.g. <code>'1,3-5,7'</code>.</li>
|
||||||
<li>In <span class="version">v2.22.2</span>,
|
<li>In <span class="version">v2.22.2</span>,
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -33,7 +33,10 @@
|
|||||||
<link href="../css/theme.jui.css" rel="stylesheet">
|
<link href="../css/theme.jui.css" rel="stylesheet">
|
||||||
<link href="../css/filter.formatter.css" rel="stylesheet">
|
<link href="../css/filter.formatter.css" rel="stylesheet">
|
||||||
<script src="../js/jquery.tablesorter.js"></script>
|
<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-stickyHeaders.js"></script>
|
||||||
|
<script src="../js/widgets/widget-storage.js"></script>
|
||||||
|
<script src="../js/widgets/widget-uitheme.js"></script>
|
||||||
<script src="../js/widgets/widget-filter-formatter-jui.js"></script>
|
<script src="../js/widgets/widget-filter-formatter-jui.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
@ -38,6 +38,26 @@
|
|||||||
widgets: ['zebra', 'filter', 'pager'],
|
widgets: ['zebra', 'filter', 'pager'],
|
||||||
widgetOptions: {
|
widgetOptions: {
|
||||||
|
|
||||||
|
// css class names of pager arrows
|
||||||
|
pager_css: {
|
||||||
|
container : 'tablesorter-pager',
|
||||||
|
errorRow : 'tablesorter-errorRow', // error information row (don't include period at beginning)
|
||||||
|
disabled : 'disabled' // class added to arrows @ extremes (i.e. prev/first arrows "disabled" on first page)
|
||||||
|
},
|
||||||
|
|
||||||
|
// jQuery selectors
|
||||||
|
pager_selectors: {
|
||||||
|
container : '.pager', // target the pager markup (wrapper)
|
||||||
|
first : '.first', // go to first page arrow
|
||||||
|
prev : '.prev', // previous page arrow
|
||||||
|
next : '.next', // next page arrow
|
||||||
|
last : '.last', // go to last page arrow
|
||||||
|
gotoPage : '.gotoPage', // go to page selector - select dropdown that sets the current page
|
||||||
|
pageDisplay : '.pagedisplay', // location of where the "output" is displayed
|
||||||
|
pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
// output default: '{page}/{totalPages}'
|
// output default: '{page}/{totalPages}'
|
||||||
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
|
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
|
||||||
// also {page:input} & {startRow:input} will add a modifiable input in place of the value
|
// also {page:input} & {startRow:input} will add a modifiable input in place of the value
|
||||||
@ -49,12 +69,24 @@
|
|||||||
// starting page of the pager (zero based index)
|
// starting page of the pager (zero based index)
|
||||||
pager_startPage: 0,
|
pager_startPage: 0,
|
||||||
|
|
||||||
|
// Reset pager to this page after filtering; set to desired page number
|
||||||
|
// (zero-based index), or false to not change page at filter start
|
||||||
|
pager_pageReset: 0,
|
||||||
|
|
||||||
// Number of visible rows
|
// Number of visible rows
|
||||||
pager_size: 25,
|
pager_size: 25,
|
||||||
|
|
||||||
|
// f true, child rows will be counted towards the pager set size
|
||||||
|
pager_countChildRows: false,
|
||||||
|
|
||||||
// Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js)
|
// Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js)
|
||||||
pager_savePages: true,
|
pager_savePages: true,
|
||||||
|
|
||||||
|
// Saves tablesorter paging to custom key if defined. Key parameter name
|
||||||
|
// used by the $.tablesorter.storage function. Useful if you have
|
||||||
|
// multiple tables defined
|
||||||
|
pager_storageKey: "tablesorter-pager",
|
||||||
|
|
||||||
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
|
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
|
||||||
// table row set to a height to compensate; default is false
|
// table row set to a height to compensate; default is false
|
||||||
pager_fixedHeight: false,
|
pager_fixedHeight: false,
|
||||||
@ -94,6 +126,18 @@
|
|||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Set this option to false if your table data is preloaded into the
|
||||||
|
// table, but you are still using ajax
|
||||||
|
pager_processAjaxOnInit: true,
|
||||||
|
|
||||||
|
// When processAjaxOnInit is set to false, set this option to contain
|
||||||
|
// the total number of rows and filtered rows to prevent an initial ajax
|
||||||
|
// call
|
||||||
|
initialRows: {
|
||||||
|
total: 100,
|
||||||
|
filtered: 100
|
||||||
|
},
|
||||||
|
|
||||||
// process ajax so that the following information is returned:
|
// process ajax so that the following information is returned:
|
||||||
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
|
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
|
||||||
// example:
|
// example:
|
||||||
@ -140,26 +184,6 @@
|
|||||||
// in version 2.10, you can optionally return $(rows) a set of table rows within a jQuery object
|
// in version 2.10, you can optionally return $(rows) a set of table rows within a jQuery object
|
||||||
return [ total, rows, headers ];
|
return [ total, rows, headers ];
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
// css class names of pager arrows
|
|
||||||
pager_css: {
|
|
||||||
container : 'tablesorter-pager',
|
|
||||||
errorRow : 'tablesorter-errorRow', // error information row (don't include period at beginning)
|
|
||||||
disabled : 'disabled' // class added to arrows @ extremes (i.e. prev/first arrows "disabled" on first page)
|
|
||||||
},
|
|
||||||
|
|
||||||
// jQuery selectors
|
|
||||||
pager_selectors: {
|
|
||||||
container : '.pager', // target the pager markup (wrapper)
|
|
||||||
first : '.first', // go to first page arrow
|
|
||||||
prev : '.prev', // previous page arrow
|
|
||||||
next : '.next', // next page arrow
|
|
||||||
last : '.last', // go to last page arrow
|
|
||||||
gotoPage : '.gotoPage', // go to page selector - select dropdown that sets the current page
|
|
||||||
pageDisplay : '.pagedisplay', // location of where the "output" is displayed
|
|
||||||
pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,66 +37,9 @@
|
|||||||
|
|
||||||
widgetOptions: {
|
widgetOptions: {
|
||||||
|
|
||||||
// output default: '{page}/{totalPages}'
|
// ** NOTE: All default ajax options have been removed from this demo,
|
||||||
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
|
// see the example-widget-pager-ajax demo for a full list of pager
|
||||||
// also {page:input} & {startRow:input} will add a modifiable input in place of the value
|
// options
|
||||||
pager_output: '{startRow:input} – {endRow} / {totalRows} rows', // '{page}/{totalPages}'
|
|
||||||
|
|
||||||
// apply disabled classname to the pager arrows when the rows at either extreme is visible
|
|
||||||
pager_updateArrows: true,
|
|
||||||
|
|
||||||
// starting page of the pager (zero based index)
|
|
||||||
pager_startPage: 0,
|
|
||||||
|
|
||||||
// Number of visible rows
|
|
||||||
pager_size: 10,
|
|
||||||
|
|
||||||
// Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js)
|
|
||||||
pager_savePages: true,
|
|
||||||
|
|
||||||
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
|
|
||||||
// table row set to a height to compensate; default is false
|
|
||||||
pager_fixedHeight: true,
|
|
||||||
|
|
||||||
// remove rows from the table to speed up the sort of large tables.
|
|
||||||
// setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled.
|
|
||||||
pager_removeRows: false, // removing rows in larger tables speeds up the sort
|
|
||||||
|
|
||||||
// use this format: "http://mydatabase.com?page={page}&size={size}&{sortList:col}&{filterList:fcol}"
|
|
||||||
// where {page} is replaced by the page number, {size} is replaced by the number of records to show,
|
|
||||||
// {sortList:col} adds the sortList to the url into a "col" array, and {filterList:fcol} adds
|
|
||||||
// the filterList to the url into an "fcol" array.
|
|
||||||
// So a sortList = [[2,0],[3,0]] becomes "&col[2]=0&col[3]=0" in the url
|
|
||||||
// and a filterList = [[2,Blue],[3,13]] becomes "&fcol[2]=Blue&fcol[3]=13" in the url
|
|
||||||
pager_ajaxUrl: null,
|
|
||||||
|
|
||||||
// modify the url after all processing has been applied
|
|
||||||
pager_customAjaxUrl: function(table, url) { return url; },
|
|
||||||
|
|
||||||
// ajax error callback from $.tablesorter.showError function
|
|
||||||
// pager_ajaxError: function( config, xhr, settings, exception ){ return exception; };
|
|
||||||
// returning false will abort the error message
|
|
||||||
pager_ajaxError: null,
|
|
||||||
|
|
||||||
// modify the $.ajax object to allow complete control over your ajax requests
|
|
||||||
pager_ajaxObject: {
|
|
||||||
dataType: 'json'
|
|
||||||
},
|
|
||||||
|
|
||||||
// process ajax so that the following information is returned:
|
|
||||||
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
|
|
||||||
// example:
|
|
||||||
// [
|
|
||||||
// 100, // total rows
|
|
||||||
// [
|
|
||||||
// [ "row1cell1", "row1cell2", ... "row1cellN" ],
|
|
||||||
// [ "row2cell1", "row2cell2", ... "row2cellN" ],
|
|
||||||
// ...
|
|
||||||
// [ "rowNcell1", "rowNcell2", ... "rowNcellN" ]
|
|
||||||
// ],
|
|
||||||
// [ "header1", "header2", ... "headerN" ] // optional
|
|
||||||
// ]
|
|
||||||
pager_ajaxProcessing: function(ajax){ return [ 0, [], null ]; },
|
|
||||||
|
|
||||||
// css class names that are added
|
// css class names that are added
|
||||||
pager_css: {
|
pager_css: {
|
||||||
@ -115,7 +58,44 @@
|
|||||||
gotoPage : '.gotoPage', // go to page selector - select dropdown that sets the current page
|
gotoPage : '.gotoPage', // go to page selector - select dropdown that sets the current page
|
||||||
pageDisplay : '.pagedisplay', // location of where the "output" is displayed
|
pageDisplay : '.pagedisplay', // location of where the "output" is displayed
|
||||||
pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option
|
pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// output default: '{page}/{totalPages}'
|
||||||
|
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
|
||||||
|
// also {page:input} & {startRow:input} will add a modifiable input in place of the value
|
||||||
|
pager_output: '{startRow:input} – {endRow} / {totalRows} rows', // '{page}/{totalPages}'
|
||||||
|
|
||||||
|
// apply disabled classname to the pager arrows when the rows at either extreme is visible
|
||||||
|
pager_updateArrows: true,
|
||||||
|
|
||||||
|
// starting page of the pager (zero based index)
|
||||||
|
pager_startPage: 0,
|
||||||
|
|
||||||
|
// Reset pager to this page after filtering; set to desired page number
|
||||||
|
// (zero-based index), or false to not change page at filter start
|
||||||
|
pager_pageReset: 0,
|
||||||
|
|
||||||
|
// Number of visible rows
|
||||||
|
pager_size: 10,
|
||||||
|
|
||||||
|
// f true, child rows will be counted towards the pager set size
|
||||||
|
pager_countChildRows: false,
|
||||||
|
|
||||||
|
// Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js)
|
||||||
|
pager_savePages: true,
|
||||||
|
|
||||||
|
// Saves tablesorter paging to custom key if defined. Key parameter name
|
||||||
|
// used by the $.tablesorter.storage function. Useful if you have
|
||||||
|
// multiple tables defined
|
||||||
|
pager_storageKey: "tablesorter-pager",
|
||||||
|
|
||||||
|
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
|
||||||
|
// table row set to a height to compensate; default is false
|
||||||
|
pager_fixedHeight: true,
|
||||||
|
|
||||||
|
// remove rows from the table to speed up the sort of large tables.
|
||||||
|
// setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled.
|
||||||
|
pager_removeRows: false // removing rows in larger tables speeds up the sort
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,11 +461,11 @@
|
|||||||
|
|
||||||
<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="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; <span class="version updated">v2.28.11</span>).</li>
|
<li><span class="results">†</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17; <span class="version updated">v2.28.11</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.28.2</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.28.15</span>).</li>
|
||||||
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li>
|
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li>
|
||||||
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li>
|
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li>
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-dragtable.html">Dragtable mod</a> - (jQuery UI widget for column reordering [<a class="external" href="http://stackoverflow.com/a/27770224/145346">ref</a>]; <span class="version">v2.24.0</span>).</li>
|
<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.28.11</span>):
|
<li><span class="results">†</span> Filter widget (<span class="version updated">v2.28.15</span>):
|
||||||
<ul>
|
<ul>
|
||||||
<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.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.27.5</span>).</li>
|
<li><a href="example-widget-filter-any-match.html">external option (match any column)</a> (<span class="version">v2.13.3</span>; <span class="version updated">v2.27.5</span>).</li>
|
||||||
@ -508,7 +508,7 @@
|
|||||||
<li><span class="results">†</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.28.8</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.28.8</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><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.28.8</span>).</li>
|
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.28.8</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.28.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.28.15</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.28.0</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.28.0</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>
|
<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>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||||
*/
|
*/
|
||||||
/*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
|
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
||||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
}(function(jQuery) {
|
}(function(jQuery) {
|
||||||
|
|
||||||
/*! TableSorter (FORK) v2.28.14 *//*
|
/*! TableSorter (FORK) v2.28.15 *//*
|
||||||
* Client-side table sorting with ease!
|
* Client-side table sorting with ease!
|
||||||
* @requires jQuery v1.2.6+
|
* @requires jQuery v1.2.6+
|
||||||
*
|
*
|
||||||
@ -40,7 +40,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter = {
|
var ts = $.tablesorter = {
|
||||||
|
|
||||||
version : '2.28.14',
|
version : '2.28.15',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -2258,7 +2258,7 @@
|
|||||||
cells = $rows[ i ].cells;
|
cells = $rows[ i ].cells;
|
||||||
for ( j = 0; j < cells.length; j++ ) {
|
for ( j = 0; j < cells.length; j++ ) {
|
||||||
cell = cells[ j ];
|
cell = cells[ j ];
|
||||||
rowIndex = cell.parentNode.rowIndex;
|
rowIndex = i;
|
||||||
rowSpan = cell.rowSpan || 1;
|
rowSpan = cell.rowSpan || 1;
|
||||||
colSpan = cell.colSpan || 1;
|
colSpan = cell.colSpan || 1;
|
||||||
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
||||||
@ -2317,7 +2317,7 @@
|
|||||||
if ( !valid ) {
|
if ( !valid ) {
|
||||||
$rows.each( function( indx, el ) {
|
$rows.each( function( indx, el ) {
|
||||||
var cell = el.parentElement.nodeName;
|
var cell = el.parentElement.nodeName;
|
||||||
if ( cells.indexOf( cell ) ) {
|
if ( cells.indexOf( cell ) < 0 ) {
|
||||||
cells.push( cell );
|
cells.push( cell );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -3274,7 +3274,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
|
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3345,8 +3345,10 @@
|
|||||||
var tbodyIndex, $tbody,
|
var tbodyIndex, $tbody,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
events = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search '
|
events = (
|
||||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
||||||
|
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
||||||
|
).split( ' ' ).join( c.namespace + 'filter ' );
|
||||||
$table
|
$table
|
||||||
.removeClass( 'hasFilters' )
|
.removeClass( 'hasFilters' )
|
||||||
// add filter namespace to all BUT search
|
// add filter namespace to all BUT search
|
||||||
@ -3875,7 +3877,9 @@
|
|||||||
// so we have to work with it instead
|
// so we have to work with it instead
|
||||||
formatterUpdated: function( $cell, column ) {
|
formatterUpdated: function( $cell, column ) {
|
||||||
// prevent error if $cell is undefined - see #1056
|
// prevent error if $cell is undefined - see #1056
|
||||||
var wo = $cell && $cell.closest( 'table' )[0].config.widgetOptions;
|
var $table = $cell && $cell.closest( 'table' );
|
||||||
|
var config = $table.length && $table[0].config,
|
||||||
|
wo = config && config.widgetOptions;
|
||||||
if ( wo && !wo.filter_initialized ) {
|
if ( wo && !wo.filter_initialized ) {
|
||||||
// add updates by column since this function
|
// add updates by column since this function
|
||||||
// may be called numerous times before initialization
|
// may be called numerous times before initialization
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! TableSorter (FORK) v2.28.14 *//*
|
/*! TableSorter (FORK) v2.28.15 *//*
|
||||||
* Client-side table sorting with ease!
|
* Client-side table sorting with ease!
|
||||||
* @requires jQuery v1.2.6+
|
* @requires jQuery v1.2.6+
|
||||||
*
|
*
|
||||||
@ -22,7 +22,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter = {
|
var ts = $.tablesorter = {
|
||||||
|
|
||||||
version : '2.28.14',
|
version : '2.28.15',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -2240,7 +2240,7 @@
|
|||||||
cells = $rows[ i ].cells;
|
cells = $rows[ i ].cells;
|
||||||
for ( j = 0; j < cells.length; j++ ) {
|
for ( j = 0; j < cells.length; j++ ) {
|
||||||
cell = cells[ j ];
|
cell = cells[ j ];
|
||||||
rowIndex = cell.parentNode.rowIndex;
|
rowIndex = i;
|
||||||
rowSpan = cell.rowSpan || 1;
|
rowSpan = cell.rowSpan || 1;
|
||||||
colSpan = cell.colSpan || 1;
|
colSpan = cell.colSpan || 1;
|
||||||
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
if ( typeof matrix[ rowIndex ] === 'undefined' ) {
|
||||||
@ -2299,7 +2299,7 @@
|
|||||||
if ( !valid ) {
|
if ( !valid ) {
|
||||||
$rows.each( function( indx, el ) {
|
$rows.each( function( indx, el ) {
|
||||||
var cell = el.parentElement.nodeName;
|
var cell = el.parentElement.nodeName;
|
||||||
if ( cells.indexOf( cell ) ) {
|
if ( cells.indexOf( cell ) < 0 ) {
|
||||||
cells.push( cell );
|
cells.push( cell );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||||
*/
|
*/
|
||||||
/*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
|
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/
|
||||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -408,7 +408,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
|
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -479,8 +479,10 @@
|
|||||||
var tbodyIndex, $tbody,
|
var tbodyIndex, $tbody,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
events = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search '
|
events = (
|
||||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
||||||
|
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
||||||
|
).split( ' ' ).join( c.namespace + 'filter ' );
|
||||||
$table
|
$table
|
||||||
.removeClass( 'hasFilters' )
|
.removeClass( 'hasFilters' )
|
||||||
// add filter namespace to all BUT search
|
// add filter namespace to all BUT search
|
||||||
@ -1009,7 +1011,9 @@
|
|||||||
// so we have to work with it instead
|
// so we have to work with it instead
|
||||||
formatterUpdated: function( $cell, column ) {
|
formatterUpdated: function( $cell, column ) {
|
||||||
// prevent error if $cell is undefined - see #1056
|
// prevent error if $cell is undefined - see #1056
|
||||||
var wo = $cell && $cell.closest( 'table' )[0].config.widgetOptions;
|
var $table = $cell && $cell.closest( 'table' );
|
||||||
|
var config = $table.length && $table[0].config,
|
||||||
|
wo = config && config.widgetOptions;
|
||||||
if ( wo && !wo.filter_initialized ) {
|
if ( wo && !wo.filter_initialized ) {
|
||||||
// add updates by column since this function
|
// add updates by column since this function
|
||||||
// may be called numerous times before initialization
|
// may be called numerous times before initialization
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Widget: columnSelector (responsive table widget) - updated 5/25/2017 (v2.28.12) *//*
|
/* Widget: columnSelector (responsive table widget) - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Justin Hallett & Rob Garrison
|
* by Justin Hallett & Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -547,6 +547,11 @@
|
|||||||
csel.$style.remove();
|
csel.$style.remove();
|
||||||
csel.$breakpoints.remove();
|
csel.$breakpoints.remove();
|
||||||
$( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow || 'filtered' );
|
$( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow || 'filtered' );
|
||||||
|
c.$table.find('[data-col-span]').each(function(indx, el) {
|
||||||
|
var $el = $(el);
|
||||||
|
console.log($el, $el.attr('data-col-span'));
|
||||||
|
$el.attr('colspan', $el.attr('data-col-span'));
|
||||||
|
});
|
||||||
c.$table.off('updateAll' + namespace + ' update' + namespace);
|
c.$table.off('updateAll' + namespace + ' update' + namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
chkd = $cell.find('.toggle').is(':checked');
|
chkd = $cell.find('.toggle').is(':checked');
|
||||||
}
|
}
|
||||||
state = o.disabled || !chkd ? 'disable' : 'enable';
|
state = o.disabled || !chkd ? 'disable' : 'enable';
|
||||||
|
if (!ts.isEmptyObject($cell.find('.spinner').data())) {
|
||||||
$cell.find('.filter')
|
$cell.find('.filter')
|
||||||
// add equal to the beginning, so we filter exact numbers
|
// add equal to the beginning, so we filter exact numbers
|
||||||
.val( chkd ? (compare ? compare : o.exactMatch ? '=' : '') + v : '' )
|
.val( chkd ? (compare ? compare : o.exactMatch ? '=' : '') + v : '' )
|
||||||
@ -103,6 +104,7 @@
|
|||||||
$shcell.find('.toggle')[0].checked = chkd;
|
$shcell.find('.toggle')[0].checked = chkd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// add callbacks; preserve added callbacks
|
// add callbacks; preserve added callbacks
|
||||||
@ -137,7 +139,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// update spinner from hidden input, in case of saved filters
|
// update spinner from hidden input, in case of saved filters
|
||||||
c.$table.bind('filterFomatterUpdate', function(){
|
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
||||||
var val = tsff.updateCompare($cell, $input, o)[0];
|
var val = tsff.updateCompare($cell, $input, o)[0];
|
||||||
$cell.find('.spinner').val( val );
|
$cell.find('.spinner').val( val );
|
||||||
updateSpinner({ value: val }, true);
|
updateSpinner({ value: val }, true);
|
||||||
@ -153,7 +155,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// has sticky headers?
|
// has sticky headers?
|
||||||
c.$table.bind('stickyHeadersInit', function(){
|
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
||||||
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
||||||
if (o.addToggle) {
|
if (o.addToggle) {
|
||||||
$('<div class="button"><input id="stickyuispinnerbutton' + indx + '" type="checkbox" class="toggle" />' +
|
$('<div class="button"><input id="stickyuispinnerbutton' + indx + '" type="checkbox" class="toggle" />' +
|
||||||
@ -187,7 +189,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// on reset
|
// on reset
|
||||||
c.$table.bind('filterReset', function(){
|
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
||||||
if ($.isArray(o.compare)) {
|
if ($.isArray(o.compare)) {
|
||||||
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
||||||
}
|
}
|
||||||
@ -250,11 +252,12 @@
|
|||||||
// add values to the handle data-value attribute so the css tooltip will work properly
|
// add values to the handle data-value attribute so the css tooltip will work properly
|
||||||
$cell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
$cell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
||||||
}
|
}
|
||||||
|
// prevent JS error if "resetToLoadState" or filter widget was removed for another reason
|
||||||
|
if (!ts.isEmptyObject($cell.find('.slider').data())) {
|
||||||
// update the hidden input;
|
// update the hidden input;
|
||||||
|
$cell.find('.filter')
|
||||||
// ****** ADD AN EQUAL SIGN TO THE BEGINNING! <- this makes the slide exactly match the number ******
|
// ****** ADD AN EQUAL SIGN TO THE BEGINNING! <- this makes the slide exactly match the number ******
|
||||||
// when the value is at the minimum, clear the hidden input so all rows will be seen
|
// when the value is at the minimum, clear the hidden input so all rows will be seen
|
||||||
|
|
||||||
$cell.find('.filter')
|
|
||||||
.val( ( compare ? compare + v : v === o.min ? '' : (o.exactMatch ? '=' : '') + v ) )
|
.val( ( compare ? compare + v : v === o.min ? '' : (o.exactMatch ? '=' : '') + v ) )
|
||||||
.trigger( notrigger ? '' : 'search', searchType ).end()
|
.trigger( notrigger ? '' : 'search', searchType ).end()
|
||||||
.find('.slider').slider('value', v);
|
.find('.slider').slider('value', v);
|
||||||
@ -270,6 +273,7 @@
|
|||||||
$shcell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
$shcell.find('.ui-slider-handle').addClass('value-popup').attr('data-value', result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
$cell.closest('thead').find('th[data-column=' + indx + ']').addClass('filter-parsed');
|
$cell.closest('thead').find('th[data-column=' + indx + ']').addClass('filter-parsed');
|
||||||
@ -296,7 +300,7 @@
|
|||||||
.slider(o);
|
.slider(o);
|
||||||
|
|
||||||
// update slider from hidden input, in case of saved filters
|
// update slider from hidden input, in case of saved filters
|
||||||
c.$table.bind('filterFomatterUpdate', function(){
|
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
||||||
var val = tsff.updateCompare($cell, $input, o)[0];
|
var val = tsff.updateCompare($cell, $input, o)[0];
|
||||||
$cell.find('.slider').slider('value', val );
|
$cell.find('.slider').slider('value', val );
|
||||||
updateSlider({ value: val }, false);
|
updateSlider({ value: val }, false);
|
||||||
@ -312,7 +316,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// on reset
|
// on reset
|
||||||
c.$table.bind('filterReset', function(){
|
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
||||||
if ($.isArray(o.compare)) {
|
if ($.isArray(o.compare)) {
|
||||||
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
||||||
}
|
}
|
||||||
@ -322,7 +326,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// has sticky headers?
|
// has sticky headers?
|
||||||
c.$table.bind('stickyHeadersInit', function(){
|
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
||||||
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
||||||
|
|
||||||
// add a jQuery UI slider!
|
// add a jQuery UI slider!
|
||||||
@ -401,6 +405,7 @@
|
|||||||
.eq(0).attr('data-value', val[0]).end() // adding value to data attribute
|
.eq(0).attr('data-value', val[0]).end() // adding value to data attribute
|
||||||
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
||||||
}
|
}
|
||||||
|
if (!ts.isEmptyObject($cell.find('.range').data())) {
|
||||||
// update the hidden input
|
// update the hidden input
|
||||||
$cell.find('.filter').val(range)
|
$cell.find('.filter').val(range)
|
||||||
.trigger(notrigger ? '' : 'search', searchType).end()
|
.trigger(notrigger ? '' : 'search', searchType).end()
|
||||||
@ -417,6 +422,7 @@
|
|||||||
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
.eq(1).attr('data-value', val[1]); // value popup shown via css
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
$cell.closest('thead').find('th[data-column=' + indx + ']').addClass('filter-parsed');
|
$cell.closest('thead').find('th[data-column=' + indx + ']').addClass('filter-parsed');
|
||||||
@ -443,13 +449,13 @@
|
|||||||
.slider(o);
|
.slider(o);
|
||||||
|
|
||||||
// update slider from hidden input, in case of saved filters
|
// update slider from hidden input, in case of saved filters
|
||||||
c.$table.bind('filterFomatterUpdate', function(){
|
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
||||||
getRange();
|
getRange();
|
||||||
ts.filter.formatterUpdated($cell, indx);
|
ts.filter.formatterUpdated($cell, indx);
|
||||||
});
|
});
|
||||||
|
|
||||||
// on reset
|
// on reset
|
||||||
c.$table.bind('filterReset', function(){
|
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
||||||
$cell.find('.range').slider('values', o.values);
|
$cell.find('.range').slider('values', o.values);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
updateUiRange();
|
updateUiRange();
|
||||||
@ -457,7 +463,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// has sticky headers?
|
// has sticky headers?
|
||||||
c.$table.bind('stickyHeadersInit', function(){
|
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
||||||
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
||||||
|
|
||||||
// add a jQuery UI slider!
|
// add a jQuery UI slider!
|
||||||
@ -552,7 +558,7 @@
|
|||||||
$date.datepicker(o);
|
$date.datepicker(o);
|
||||||
|
|
||||||
// on reset
|
// on reset
|
||||||
c.$table.bind('filterReset', function(){
|
c.$table.bind('filterReset' + c.namespace + 'filter', function(){
|
||||||
if ($.isArray(o.compare)) {
|
if ($.isArray(o.compare)) {
|
||||||
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
$cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
|
||||||
}
|
}
|
||||||
@ -563,7 +569,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// update date compare from hidden input, in case of saved filters
|
// update date compare from hidden input, in case of saved filters
|
||||||
c.$table.bind('filterFomatterUpdate', function(){
|
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
||||||
var num, v = $input.val();
|
var num, v = $input.val();
|
||||||
if (/\s+-\s+/.test(v)) {
|
if (/\s+-\s+/.test(v)) {
|
||||||
// date range found; assume an exact match on one day
|
// date range found; assume an exact match on one day
|
||||||
@ -591,7 +597,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// has sticky headers?
|
// has sticky headers?
|
||||||
c.$table.bind('stickyHeadersInit', function(){
|
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
||||||
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
||||||
|
|
||||||
// add a jQuery datepicker!
|
// add a jQuery datepicker!
|
||||||
@ -702,7 +708,7 @@
|
|||||||
$cell.find('.dateTo').datepicker(o);
|
$cell.find('.dateTo').datepicker(o);
|
||||||
|
|
||||||
// update date compare from hidden input, in case of saved filters
|
// update date compare from hidden input, in case of saved filters
|
||||||
c.$table.bind('filterFomatterUpdate', function(){
|
c.$table.bind('filterFomatterUpdate' + c.namespace + 'filter', function(){
|
||||||
var val = $input.val() || '',
|
var val = $input.val() || '',
|
||||||
from = '',
|
from = '',
|
||||||
to = '';
|
to = '';
|
||||||
@ -733,7 +739,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// has sticky headers?
|
// has sticky headers?
|
||||||
c.$table.bind('stickyHeadersInit', function(){
|
c.$table.bind('stickyHeadersInit' + c.namespace + 'filter', function(){
|
||||||
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
$shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
|
||||||
$shcell.append(t);
|
$shcell.append(t);
|
||||||
|
|
||||||
@ -747,7 +753,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// on reset
|
// on reset
|
||||||
$cell.closest('table').bind('filterReset', function(){
|
$cell.closest('table').bind('filterReset' + c.namespace + 'filter', function(){
|
||||||
$cell.add($shcell).find('.dateFrom').val('').datepicker('setDate', o.from || null );
|
$cell.add($shcell).find('.dateFrom').val('').datepicker('setDate', o.from || null );
|
||||||
$cell.add($shcell).find('.dateTo').val('').datepicker('setDate', o.to || null );
|
$cell.add($shcell).find('.dateTo').val('').datepicker('setDate', o.to || null );
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
if (arry) {
|
if (arry) {
|
||||||
v = v.split('\u0000');
|
v = v.split('\u0000');
|
||||||
}
|
}
|
||||||
|
if (!ts.isEmptyObject($input.find('.select2').data())) {
|
||||||
$input
|
$input
|
||||||
// add regex, so we filter exact numbers
|
// add regex, so we filter exact numbers
|
||||||
.val(
|
.val(
|
||||||
@ -83,6 +84,7 @@
|
|||||||
if (c.widgetOptions.$sticky) {
|
if (c.widgetOptions.$sticky) {
|
||||||
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// get options from table cell content or filter_selectSource (v2.16)
|
// get options from table cell content or filter_selectSource (v2.16)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: filter - updated 5/24/2017 (v2.28.11) *//*
|
/*! Widget: filter - updated 7/4/2017 (v2.28.15) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -69,8 +69,10 @@
|
|||||||
var tbodyIndex, $tbody,
|
var tbodyIndex, $tbody,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
events = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterEnd search '
|
events = (
|
||||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
'addRows updateCell update updateRows updateComplete appendCache filterReset ' +
|
||||||
|
'filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit '
|
||||||
|
).split( ' ' ).join( c.namespace + 'filter ' );
|
||||||
$table
|
$table
|
||||||
.removeClass( 'hasFilters' )
|
.removeClass( 'hasFilters' )
|
||||||
// add filter namespace to all BUT search
|
// add filter namespace to all BUT search
|
||||||
@ -599,7 +601,9 @@
|
|||||||
// so we have to work with it instead
|
// so we have to work with it instead
|
||||||
formatterUpdated: function( $cell, column ) {
|
formatterUpdated: function( $cell, column ) {
|
||||||
// prevent error if $cell is undefined - see #1056
|
// prevent error if $cell is undefined - see #1056
|
||||||
var wo = $cell && $cell.closest( 'table' )[0].config.widgetOptions;
|
var $table = $cell && $cell.closest( 'table' );
|
||||||
|
var config = $table.length && $table[0].config,
|
||||||
|
wo = config && config.widgetOptions;
|
||||||
if ( wo && !wo.filter_initialized ) {
|
if ( wo && !wo.filter_initialized ) {
|
||||||
// add updates by column since this function
|
// add updates by column since this function
|
||||||
// may be called numerous times before initialization
|
// may be called numerous times before initialization
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: sort2Hash (BETA) - updated 4/2/2017 (v2.28.6) */
|
/*! Widget: sort2Hash (BETA) - updated 7/4/2017 (v2.28.15) */
|
||||||
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -29,7 +29,18 @@
|
|||||||
c.$table.one( 'filterEnd', function() {
|
c.$table.one( 'filterEnd', function() {
|
||||||
$(this).triggerHandler( 'pageAndSize', [ page, size ] );
|
$(this).triggerHandler( 'pageAndSize', [ page, size ] );
|
||||||
});
|
});
|
||||||
|
// use the newest filter comparison code
|
||||||
|
if ( ts.filter.equalFilters ) {
|
||||||
|
temp = ts.filter.equalFilters( c, c.lastSearch, filter );
|
||||||
|
} else {
|
||||||
|
// quick n' dirty comparison... it will miss filter changes of
|
||||||
|
// the same value in a different column, see #1363
|
||||||
|
temp = ( c.lastSearch || [] ).join( '' ) !== ( filter || [] ).join( '' );
|
||||||
|
}
|
||||||
|
// don't set filters if they haven't changed
|
||||||
|
if ( !temp ) {
|
||||||
$.tablesorter.setFilters( table, filter, true );
|
$.tablesorter.setFilters( table, filter, true );
|
||||||
|
}
|
||||||
}, 100 );
|
}, 100 );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tablesorter",
|
"name": "tablesorter",
|
||||||
"title": "tablesorter",
|
"title": "tablesorter",
|
||||||
"version": "2.28.14",
|
"version": "2.28.15",
|
||||||
"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.",
|
"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": {
|
"author": {
|
||||||
"name": "Christian Bach",
|
"name": "Christian Bach",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tablesorter",
|
"name": "tablesorter",
|
||||||
"title": "tablesorter",
|
"title": "tablesorter",
|
||||||
"version": "2.28.14",
|
"version": "2.28.15",
|
||||||
"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.",
|
"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": {
|
"author": {
|
||||||
"name": "Christian Bach",
|
"name": "Christian Bach",
|
||||||
|
Loading…
Reference in New Issue
Block a user