=0&&!e.$table.hasClass("hasFilters"))){var g,h=e.$table,i=a(f.stickyHeaders_attachTo),j=e.namespace+"stickyheaders ",k=a(f.stickyHeaders_yScroll||f.stickyHeaders_attachTo||b),l=a(f.stickyHeaders_xScroll||f.stickyHeaders_attachTo||b),m=h.children("thead:first"),n=m.children("tr").not(".sticky-false").children(),o=h.children("tfoot"),p=isNaN(f.stickyHeaders_offset)?a(f.stickyHeaders_offset):"",q=p.length?p.height()||0:parseInt(f.stickyHeaders_offset,10)||0,r=h.parent().closest("."+c.css.table).hasClass("hasStickyHeaders")?h.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],s=r.length?r.height():0,t=f.$sticky=h.clone().addClass("containsStickyHeaders "+c.css.sticky+" "+f.stickyHeaders).wrap(''),u=t.parent().addClass(c.css.stickyHide).css({position:i.length?"absolute":"fixed",padding:parseInt(t.parent().parent().css("padding-left"),10),top:q+s,left:0,visibility:"hidden",zIndex:f.stickyHeaders_zIndex||2}),v=t.children("thead:first"),w="",x=0,y=function(c,d){c.filter(":visible").each(function(c){var e,f,g=d.filter(":visible").eq(c),h=a(this);
"border-box"===h.css("box-sizing")?e=h.outerWidth():"collapse"===g.css("border-collapse")?b.getComputedStyle?e=parseFloat(b.getComputedStyle(this,null).width):(f=parseFloat(h.css("border-width")),e=h.outerWidth()-parseFloat(h.css("padding-left"))-parseFloat(h.css("padding-right"))-f):e=h.width(),g.css({"min-width":e,"max-width":e})})},z=function(){q=p.length?p.height()||0:parseInt(f.stickyHeaders_offset,10)||0,x=0,u.css({left:i.length?parseInt(i.css("padding-left"),10)||0:h.offset().left-parseInt(h.css("margin-left"),10)-l.scrollLeft()-x,width:h.outerWidth()}),y(h,t),y(n,g)};i.length&&!i.css("position")&&i.css("position","relative"),e.$extraTables&&e.$extraTables.length?e.$extraTables.add(t):e.$extraTables=t,t.attr("id")&&(t[0].id+=f.stickyHeaders_cloneId),t.find("thead:gt(0), tr.sticky-false").hide(),t.find("tbody, tfoot").remove(),t.find("caption").toggle(f.stickyHeaders_includeCaption),g=v.children().children(),t.css({height:0,width:0,margin:0}),g.find("."+c.css.resizer).remove(),h.addClass("hasStickyHeaders").bind("pagerComplete"+j,function(){z()}),c.bindEvents(d,v.children().children(".tablesorter-header")),h.after(u),e.onRenderHeader&&v.children("tr").children().each(function(b){e.onRenderHeader.apply(a(this),[b,e,t])}),l.add(k).unbind("scroll resize ".split(" ").join(j).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(j),function(b){if(h.is(":visible")){s=r.length?r.offset().top-k.scrollTop()+r.height():0;var d=h.offset(),e=a.isWindow(k[0]),f=a.isWindow(l[0]),g=(i.length?e?k.scrollTop():k.offset().top:k.scrollTop())+q+s,j=h.height()-(u.height()+(o.height()||0)),m=g>d.top&&g=0&&e.$filters&&e.$filters.eq(g).find("a, select, input").filter(":visible").focus())}),c.filter.bindSearch(h,g.find("."+c.css.filter)),f.filter_hideFilters&&c.filter.hideFilters(t,e)),h.trigger("stickyHeadersInit")}},remove:function(d,e,f){var g=e.namespace+"stickyheaders ";e.$table.removeClass("hasStickyHeaders").unbind("pagerComplete filterEnd ".split(" ").join(g).replace(/\s+/g," ")).next("."+c.css.stickyWrap).remove(),f.$sticky&&f.$sticky.length&&f.$sticky.remove(),a(b).add(f.stickyHeaders_xScroll).add(f.stickyHeaders_yScroll).add(f.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")),c.addHeaderResizeEvent(d,!1)}})}(jQuery,window),function(a,b){"use strict";var c=a.tablesorter=a.tablesorter||{};a.extend(c.css,{resizer:"tablesorter-resizer"}),c.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[],resizable_throttle:!1},format:function(d,e,f){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable"),c.resizableReset(d,!0);var g,h,i,j,k,l={},m=e.$table,n=m.parent(),o="auto"===m.parent().css("overflow"),p=0,q=null,r=null,s=Math.abs(m.parent().width()-m.width())<20,t=function(a){if(0!==p&&q){var b=a.pageX-p,c=q.width();q.width(c+b),q.width()!==c&&s?r.width(r.width()-b):o&&(m.width(function(a,c){return c+b}),r.length||(n[0].scrollLeft=m.width())),p=a.pageX}},u=function(){c.storage&&q&&r&&(l={},l[q.index()]=q.width(),l[r.index()]=r.width(),q.width(l[q.index()]),r.width(l[r.index()]),f.resizable!==!1&&c.storage(d,"tablesorter-resizable",e.$headers.map(function(){return a(this).width()}).get())),p=0,q=r=null,a(b).trigger("resize")};if(l=c.storage&&f.resizable!==!1?c.storage(d,"tablesorter-resizable"):{})for(j in l)!isNaN(j)&&j
'),f.resizable_addLastColumn||(i=i.slice(0,-1)),h=h?h.add(i):i}),h.each(function(){var b=a(this),d=parseInt(b.css("padding-right"),10)+10;b.find("."+c.css.wrapper).append('')}).find("."+c.css.resizer).bind("mousedown",function(b){q=a(b.target).closest("th");var c=e.$headers.filter('[data-column="'+q.attr("data-column")+'"]');c.length>1&&(q=q.add(c)),r=b.shiftKey?q.parent().find("th").not(".resizable-false").filter(":last"):q.nextAll(":not(.resizable-false)").eq(0),p=b.pageX}),a(document).bind("mousemove.tsresize",function(a){0!==p&&q&&(f.resizable_throttle?(clearTimeout(k),k=setTimeout(function(){t(a)},isNaN(f.resizable_throttle)?5:f.resizable_throttle)):t(a))}).bind("mouseup.tsresize",function(){u()}),m.find("thead:first").bind("contextmenu.tsresize",function(){c.resizableReset(d);var b=a.isEmptyObject?a.isEmptyObject(l):!0;return l={},b})}},remove:function(a,b){b.$table.removeClass("hasResizable").children("thead").unbind("mouseup.tsresize mouseleave.tsresize contextmenu.tsresize").children("tr").children().unbind("mousemove.tsresize mouseup.tsresize").find("."+c.css.resizer).remove(),c.resizableReset(a)}}),c.resizableReset=function(b,d){a(b).each(function(){var e,f=this.config,g=f&&f.widgetOptions;b&&f&&(f.$headers.each(function(b){e=a(this),g.resizable_widths&&g.resizable_widths[b]?e.css("width",g.resizable_widths[b]):e.hasClass("resizable-false")||e.css("width","")}),c.storage&&!d&&c.storage(this,"tablesorter-resizable",{}))})}}(jQuery,window),function(a){"use strict";var b=a.tablesorter=a.tablesorter||{};b.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(a,b,c,d){b.format(a,c,d,!0)},format:function(c,d,e,f){var g,h,i=d.$table,j=e.saveSort!==!1,k={sortList:d.sortList};d.debug&&(h=new Date),i.hasClass("hasSaveSort")?j&&c.hasInitialized&&b.storage&&(b.storage(c,"tablesorter-savesort",k),d.debug&&b.benchmark("saveSort widget: Saving last sort: "+d.sortList,h)):(i.addClass("hasSaveSort"),k="",b.storage&&(g=b.storage(c,"tablesorter-savesort"),k=g&&g.hasOwnProperty("sortList")&&a.isArray(g.sortList)?g.sortList:"",d.debug&&b.benchmark('saveSort: Last sort loaded: "'+k+'"',h),i.bind("saveSortReset",function(a){a.stopPropagation(),b.storage(c,"tablesorter-savesort","")})),f&&k&&k.length>0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&i.trigger("sorton",[k]))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(jQuery),a.tablesorter});
\ No newline at end of file
diff --git a/dist/js/widgets/widget-scroller.min.js b/dist/js/widgets/widget-scroller.min.js
index fdc0f760..6fef6f10 100644
--- a/dist/js/widgets/widget-scroller.min.js
+++ b/dist/js/widgets/widget-scroller.min.js
@@ -31,4 +31,4 @@
Website: www.tconnell.com
*/
-!function(a,b){"use strict";a.fn.hasScrollBar=function(){return this.get(0).scrollHeight>this.height()};var c=a.tablesorter;c.window_resize=function(){this.resize_timer&&clearTimeout(this.resize_timer),this.resize_timer=setTimeout(function(){a(this).trigger("resizeEnd")},250)},a(function(){var b="";a(b).appendTo("body")}),c.addWidget({id:"scroller",priority:60,options:{scroller_height:300,scroller_jumpToHeader:!0,scroller_upAfterSort:!0,scroller_barWidth:null},init:function(d,e,f){var g=a(b),h=f.namespace+"tsscroller";g.bind("resize"+h,c.window_resize).bind("resizeEnd"+h,function(){a.isFunction(d.config.widgetOptions.scroller_resizeWidth)&&(g.unbind("resize"+h,c.window_resize),d.config.widgetOptions.scroller_resizeWidth(),g.bind("resize"+h,c.window_resize))})},format:function(d,e,f){var g,h,i,j,k,l,m,n,o=[],p=e.namespace.slice(1)+"tsscroller",q=a(b),r=e.$table;e.isScrolling||(e.widthFixed=!0,g=f.scroller_height||300,h=r.children("tbody").height(),0!==h&&g>h&&(g=h+10),i=a(''+r.children("thead")[0].outerHTML+"
"),j=r.children("tfoot"),j.length&&(o=a('').append(j.clone(!0)).append(r.children("thead")[0].outerHTML).wrap(''),n=o.children("tfoot").eq(0).children("tr").children()),e.$extraTables=e.$extraTables&&e.$extraTables.length?e.$extraTables.add(i).add(o):i.add(o),r.wrap('').before(i).find(".tablesorter-filter-row").addClass("hideme"),o.length&&r.after(o.parent()),m=i.wrap('').find("."+c.css.header),r.wrap(''),c.bindEvents(d,m),r.hasClass("hasFilters")&&c.filter.bindSearch(r,i.find("."+c.css.filter)),l=function(){var b=a('').appendTo("body"),c=b[0],d=c.offsetWidth-c.clientWidth;return b.remove(),d},k=function(){var b,c,e,g,h=a('div.tablesorter-scroller[id != "'+p+'"]').hide();r.children("thead").show(),r.add(i).add(o).children("colgroup").remove(),r.addClass("tablesorter-scroller-reset").children("thead").find(".tablesorter-header-inner").addClass("tablesorter-scroller-reset").end().find(".tablesorter-filter-row").show(),b=r.parent(),b.addClass("tablesorter-scroller-reset"),b.parent().trigger("resize"),c=parseInt(r.css("border-left-width"),10)+parseInt(r.css("border-right-width"),10),g=(f.scroller_barWidth||l())+c,b.width(b.parent().innerWidth()-(b.parent().hasScrollBar()?g:0)),g=b.innerWidth()-(b.hasScrollBar()?g:0),r.add(i).add(i.parent()).add(o).width(g),r.closest(".tablesorter-scroller").find(".tablesorter-scroller-reset").removeClass("tablesorter-scroller-reset"),a.tablesorter.fixColumnWidth(d),e=r.children("colgroup"),e.length&&(c=e[0].outerHTML,i.prepend(c),o.length&&o.prepend(c)),r.children("thead").find(".tablesorter-filter-row").hide(),h.show()},f.scroller_resizeWidth=k,k(),r.find("thead").css("visibility","hidden"),e.isScrolling=!0,h=r.parent().parent().height(),r.parent().bind("scroll",function(){if(f.scroller_jumpToHeader){var b=q.scrollTop()-i.offset().top;0!==a(this).scrollTop()&&h>b&&b>0&&q.scrollTop(i.offset().top)}i.parent().scrollLeft(a(this).scrollLeft())})),f.scroller_upAfterSort&&r.parent().animate({scrollTop:0},"fast")},remove:function(c,d){var e=d.$table,f=d.namespace+"tsscroller";e.closest(".tablesorter-scroller").find(".tablesorter-scroller-header").remove(),e.closest(".tablesorter-scroller").find(".tablesorter-scroller-footer").remove(),e.unwrap().find(".tablesorter-filter-row").removeClass("hideme").end().find("thead").show().css("visibility","visible"),a(b).unbind("resize"+f+" resizeEnd"+f),d.isScrolling=!1}})}(jQuery,window);
\ No newline at end of file
+!function(a,b){"use strict";a.fn.hasScrollBar=function(){return this.get(0).scrollHeight>this.height()};var c=a.tablesorter;c.window_resize=function(){this.resize_timer&&clearTimeout(this.resize_timer),this.resize_timer=setTimeout(function(){a(this).trigger("resizeEnd")},250)},a(function(){var b="";a(b).appendTo("body")}),c.addWidget({id:"scroller",priority:60,options:{scroller_height:300,scroller_jumpToHeader:!0,scroller_upAfterSort:!0,scroller_barWidth:null},init:function(d,e,f){var g=a(b),h=f.namespace+"tsscroller";g.bind("resize"+h,c.window_resize).bind("resizeEnd"+h,function(){a.isFunction(d.config.widgetOptions.scroller_resizeWidth)&&(g.unbind("resize"+h,c.window_resize),d.config.widgetOptions.scroller_resizeWidth(),g.bind("resize"+h,c.window_resize))})},format:function(d,e,f){var g,h,i,j,k,l,m,n,o,p=a(),q=e.namespace.slice(1)+"tsscroller",r=a(b),s=e.$table;e.isScrolling||(e.widthFixed=!0,g=f.scroller_height||300,h=s.children("tbody").height(),0!==h&&g>h&&(g=h+10),i=a('
'+s.children("thead")[0].outerHTML+"
"),j=s.children("tfoot"),j.length&&(p=a('
').append(j.clone(!0)).append(s.children("thead")[0].outerHTML).wrap(''),n=p.children("tfoot").eq(0).children("tr").children()),e.$extraTables=e.$extraTables&&e.$extraTables.length?e.$extraTables.add(i).add(p):i.add(p),s.wrap('
').before(i).find(".tablesorter-filter-row").addClass("hideme"),p.length&&s.after(p.parent()),m=i.wrap('').find("."+c.css.header),s.wrap('
'),o=s.parent(),c.bindEvents(d,m),s.hasClass("hasFilters")&&c.filter.bindSearch(s,i.find("."+c.css.filter)),l=function(){var b=a('
').appendTo("body"),c=b[0],d=c.offsetWidth-c.clientWidth;return b.remove(),d},k=function(){var c,e,g,h,j=a('div.tablesorter-scroller[id != "'+q+'"]').hide();s.children("thead").show(),s.add(i).add(p).children("colgroup").remove(),s.addClass("tablesorter-scroller-reset").children("thead").find(".tablesorter-header-inner").addClass("tablesorter-scroller-reset").end().find(".tablesorter-filter-row").show(),o.addClass("tablesorter-scroller-reset"),o.parent().trigger("resize"),c=parseInt(s.css("border-left-width"),10)+parseInt(s.css("border-right-width"),10),h=(f.scroller_barWidth||l())+c,o.width(o.parent().innerWidth()-(o.parent().hasScrollBar()?h:0)),h=o.innerWidth()-(o.hasScrollBar()?h:0),i.parent().add(p.parent()).width(h),h=s.width(),e=i.children("thead").children().children("th, td").filter(":visible"),g=p.children("tfoot").children().children("th, td").filter(":visible"),s.children("thead").children().eq(0).children("th, td").each(function(c){var d,f,h=a(this);"border-box"===h.css("box-sizing")?d=h.outerWidth():"collapse"===e.eq(c).css("border-collapse")?b.getComputedStyle?d=parseFloat(b.getComputedStyle(this,null).width):(f=parseFloat(h.css("border-width")),d=h.outerWidth()-parseFloat(h.css("padding-left"))-parseFloat(h.css("padding-right"))-f):d=h.width(),e.eq(c).add(g.eq(c)).css({"min-width":d,"max-width":d})}),s.closest(".tablesorter-scroller").find(".tablesorter-scroller-reset").removeClass("tablesorter-scroller-reset"),a.tablesorter.fixColumnWidth(d),e=s.children("colgroup"),e.length&&(c=e[0].outerHTML,i.prepend(c),p.length&&p.prepend(c)),s.children("thead").find(".tablesorter-filter-row").hide(),j.show()},f.scroller_resizeWidth=k,k(),s.find("thead").css("visibility","hidden"),e.isScrolling=!0,h=o.parent().height(),o.bind("scroll",function(){if(f.scroller_jumpToHeader){var b=r.scrollTop()-i.offset().top;0!==a(this).scrollTop()&&h>b&&b>0&&r.scrollTop(i.offset().top)}i.parent().add(p.parent()).scrollLeft(a(this).scrollLeft())})),f.scroller_upAfterSort&&s.parent().animate({scrollTop:0},"fast")},remove:function(c,d){var e=d.$table,f=d.namespace+"tsscroller";e.closest(".tablesorter-scroller").find(".tablesorter-scroller-header").remove(),e.closest(".tablesorter-scroller").find(".tablesorter-scroller-footer").remove(),e.unwrap().find(".tablesorter-filter-row").removeClass("hideme").end().find("thead").show().css("visibility","visible"),a(b).unbind("resize"+f+" resizeEnd"+f),d.isScrolling=!1}})}(jQuery,window);
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index ab2b09cb..bcb6ef29 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -519,7 +519,7 @@
Repeat Headers widget (v2.0.5; v2.19.0)
† Resizable Columns widget (v2.0.23.1; v2.19.0)
† Save sort widget (v2.0.27)
-
Scroller widget (v2.9; v2.21.0).
+
Scroller widget (v2.9; v2.21.1).
StaticRow widget (v2.16; v2.19.1).
† Sticky header widget (v2.0.21.1; v2.21.0)
Sticky header (css3) widget (v2.14.2; v2.19.1).
@@ -728,11 +728,13 @@
cssIcon |
String |
"tablesorter-icon" |
-
The CSS style used to style the header cell icon (modified v2.7).
+ | The CSS style used to style the header cell icon (modified v2.7; v2.21.1).
- As of v2.4, an <i> element, with this class name, is automatically appended to the header cells. To prevent the plugin from adding an <i> element to the headers, set the cssIcon option to an empty string.
+ In v2.21.1, adding multiple class names to this option is now properly supported.
- In v2.7, the icon will only be added to the header if both the cssIcon option is set AND the headerTemplate option includes the icon tag ( {icon} ).
+ As of v2.7, the icon will only be added to the header if both the cssIcon option is set AND the headerTemplate option includes the icon tag ( {icon} ).
+
+ In v2.4, an <i> element, with this class name, is automatically appended to the header cells. To prevent the plugin from adding an <i> element to the headers, set the cssIcon option to an empty string.
|
|
@@ -6389,7 +6391,7 @@ widget.format( table, table.config, table.config.widgetOptions );
getColumnData |
- This function returns the column data from an object based on a column index or classname/id.
+ | This function returns the column data from an object based on a column index or classname/id (v2.21.1).
Use it as follows:
diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js
index 726aa896..28b7e0db 100644
--- a/js/jquery.tablesorter.js
+++ b/js/jquery.tablesorter.js
@@ -1,4 +1,4 @@
-/*! TableSorter (FORK) v2.21.0 *//*
+/*! TableSorter (FORK) v2.21.1 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@@ -34,7 +34,7 @@
var ts = this;
- ts.version = '2.21.0';
+ ts.version = '2.21.1';
ts.parsers = [];
ts.widgets = [];
diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js
index 62f8d507..2496bd4c 100644
--- a/js/jquery.tablesorter.widgets.js
+++ b/js/jquery.tablesorter.widgets.js
@@ -4,7 +4,7 @@
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
*/
-/*! tablesorter (FORK) widgets - updated 03-09-2015 (v2.21.0)*/
+/*! tablesorter (FORK) widgets - updated 03-10-2015 (v2.21.1)*/
/* Includes: storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort */
(function(factory) {
if (typeof define === 'function' && define.amd) {
diff --git a/package.json b/package.json
index 0773cadb..f880d72f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
- "version": "2.21.0",
+ "version": "2.21.1",
"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",
diff --git a/tablesorter.jquery.json b/tablesorter.jquery.json
index ef81e84d..af4e543c 100644
--- a/tablesorter.jquery.json
+++ b/tablesorter.jquery.json
@@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
- "version": "2.21.0",
+ "version": "2.21.1",
"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",
|