diff --git a/README.md b/README.md index 9a2b652a..b7cd8421 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,81 @@ tablesorter can successfully parse and sort many types of data including linked View the [complete listing here](//github.com/Mottie/tablesorter/wiki/Changes). +#### Version 2.18.0 (10/26/2014) + +* Core + * Move "ipAddress" parser into `parser-network.js` parser file. + * Add "image" parser to core. + * Add `widgetClass` option + * Allows adding widgets to the table by adding a table class name. + * Fix debug logs for applying widgets. + * Fixes [issue #743](https://github.com/Mottie/tablesorter/issues/743). + * Add `$cell` parameter to parser detection `is` function (`is: function(s, table, cell, $cell) { /* ... */ }`). + * Add `$table` parameter to `onRenderHeader` function (`onRenderHeader: function (index, config, $table){ /* ... */ }`). + * Fix ARIA caption label reference. + * Get column index from data-attribute when sorting. + * The `aria-labelledby` attribute is no longer to all nested captions. + * Update `widgetClass` option matching. See [issue #743](https://github.com/Mottie/tablesorter/issues/743). +* Themes + * Include caption element in metro theme; update various demo theme selectors to include the metro theme. + * Fix zebra striping in nested tables. +* Parsers + * Created `parser-network.js` parser + * Removed "ipAddress" parser from core. + * Move "ipAddress" parser into this file; a duplicate of the parser named "ipv4Address" is included. + * Moved "ipv6Address" parser into this file. + * Added new MAC parser. + * Update all date parsers to ensure a valid date is being parsed. + * Add named number parser & demo. +* Column Selector widget + * Prevent adding a media query when no priorities are set. + * `col` element will now be hidden along with the column. Fixes [issues #740](https://github.com/Mottie/tablesorter/issues/740). +* Editable widget + * Make updatable so this widget works with the pager. Fixes [issue #732](https://github.com/Mottie/tablesorter/issues/732). +* Filter widget + * Fix wildcard match logic to behave logically. Fixes [issue #727](https://github.com/Mottie/tablesorter/issues/727). + * Add `filter_cellFilter` option. Fixes [issue #731](https://github.com/Mottie/tablesorter/issues/731). + * External inputs can now target multiple columns (e.g. `data-column="0-2,4,6-7"`); see [this Stackoverflow question](http://stackoverflow.com/q/26470602/145346). + * Any match filters now properly uses `filter_ignoreCase`. Fixes [issue #748](https://github.com/Mottie/tablesorter/issues/748). + * Fix saved filter updates to multiple or "any" column inputs. +* Grouping widget + * Add "monthyear" grouping to dates. Fixes [issue #744](https://github.com/Mottie/tablesorter/issues/744). +* Pager addon & widget + * Use a sample of page number links for large collections. + * Add `maxOptionSize` option + * Tweak code & fix problems introduces in [pull #711](https://github.com/Mottie/tablesorter/pull/711). + * Thanks [camallen](https://github.com/camallen)! + * Fix ouput display not updating on initialization. + * Add url check to allow ajax updating of table. Fixes [issue #730](https://github.com/Mottie/tablesorter/issues/730). + * Check for dynamically changing `ajaxUrl` option. + * Add `ajaxObject` to the `table.config.pager` variable. + * IE requires a value attribute for every option. Fixes [issue #734](https://github.com/Mottie/tablesorter/issues/734). + * Revert some code modified for large collections to use jQuery instead of native javascript (more IE issues). + * Ensure `pager.filteredRows` is current on page move. See [issue #745](https://github.com/Mottie/tablesorter/issues/745). + * Fix empty table select showing 0 & 1 pages. + * The `fixedHeight` option is now working properly. Fixes [issue #742](https://github.com/Mottie/tablesorter/issues/742) & [issue #729](https://github.com/Mottie/tablesorter/issues/729). + * Widget cleanup & only use the last search data. + * Add note about including an ajax `success` function within the `ajaxObject` definition. See [issue #749](https://github.com/Mottie/tablesorter/issues/749). +* RepeatHeaders widget + * Now works with filtered & nested tables. +* Resizable widget + * Make it work inside of an overflow container. Fixes [issue #737](https://github.com/Mottie/tablesorter/issues/737). +* Scroller widget + * Remove `scroller_idPrefix` in lieu of a unique namespace id. +* StickyHeaders widget + * Now stacks when within a nested table. + * Wrapped sticky header components (`thead` & `caption`) in a sticky div. + * Added `stickyHeaders_xScroll` and `stickyHeaders_yScroll` options. + * Removed jQuery UI selection from the demo to allow the accordion to be properly themed. +* CssStickyHeaders widget + * Now stacks when within a nested table. + * Removed `cssStickyHeaders_zIndex` option as the widget no longer uses relative positioning (it wasn't necessary) + * Please note that **using this widget on nested tables does not work properly in ALL versions of IE** (including IE11). +* UITheme + * Ignore nested tables. + * Add method to remove previous theme. + * Fix multiple header row sort icons. + #### Version 2.17.8 (9/15/2014) * Core @@ -115,44 +190,3 @@ View the [complete listing here](//github.com/Mottie/tablesorter/wiki/Changes). * Core: Do not detach rows before appending to prevent ajax rows from disappearing. Fixes [issue #701](//github.com/Mottie/tablesorter/issues/701). * Docs: Fix change log links. * Filter: attached external select causing javascript errors. Fixes [issue #702](//github.com/Mottie/tablesorter/issues/702) - -#### Version 2.17.6 (8/1/2014) - -* Core - * Adding a class name of `parser-false` to a column will now automatically set `sorter-false` and `filter-false` behavior. - * Add extractor type which allows giving a column two parsers, one to extract content from an input/select and the second to parse the extracted text. Thanks to [TheSin-](//github.com/TheSin-)! - * Ensure custom parsed data adheres to the `ignoreCase` option. - * Add a delay to any sort if there is an update in progress. This prevents issues with a sort being applied causing duplicate rows to be added to the table, hopefully. - * The `widthFixed` option now finds both visible `th` and `td` cells within the first row of the tbody to set column width percentages. - * Ensure all rows have a set role for screen readers (`role="row"`). Fixes [issue #690](//github.com/Mottie/tablesorter/issues/690). - * Redefine `c.$headers` when building headers for new/replaced header cells (not just content). Fixes [issue #683](//github.com/Mottie/tablesorter/issues/683). -* Docs - * Fixed lots of minor HTML issues (e.g. missing closing `` & `

` tags) -* Parsers - * Add parser for textareas within the `parser-input-select.js` file. - * Modify input & textarea parser to only update the table cache when: - * The user presses enter (input) or alt + enter (textarea) within the element. - * When the element is blurred. - * Or, when the mouse leaves the tbody. -* Editable - * Add two new options: - * `editable_autoAccept`: accepts any changes made to the table cell automatically (`true` by default) - * `editable_validate`: a function used to validate the changes; return a valid string (`null` by default) - * Modify `editable_columns` type check to prevent javascript errors. See [pull #688](//github.com/Mottie/tablesorter/issues/688). Thanks [scratcher28](//github.com/scratcher28)! - * Limit the `editable_columns` array value to columns within the table. -* Filter - * Make all options show within the current select when the `filter-onlyAvail` class is set on a column. - * Updated & added docs for `$.tablesorter.filter.buildSelect` function to allow external calls to modify filter select options. - * Update `filter_selectSource` to accept arrays instead of a function. This was documented as working, but it wasn't coded until now. Sorry! - * Add `filter_selectSourceSeparator` option: - * Include a separator within the `filter_selectSource` array (e.g. "a-z|A through Z"). - * The text that is left of the separator is added to the option value, the the text on the right is added to the option text. - * So `"a-z|A through Z"` becomes ``. - * Fixes [issue #692](//github.com/Mottie/tablesorter/issues/692). - * Add `role="row"` to the filter row. Fixes [issue #697](//github.com/Mottie/tablesorter/issues/697). - * Any match inputs now follow the `filter_startsWith` setting. See [this Stackoverflow](//stackoverflow.com/q/25070448/145346) question. -* Pager - * The `ouput` option can now include user modifiable `startRow` (`{startRow:input}`) or `page` (`{page:input}`) inputs within the output. - * Remove selected attribute from page selector options. Fixes [issue #700](//github.com/Mottie/tablesorter/issues/700). -* Resizable - * Update `$.tablesorter.addHeaderResizeEvent` function's first parameter `table` to accept table DOM elements as well as jQuery objects. Fixes [issue #687](//github.com/Mottie/tablesorter/issues/687). diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index ec7535b7..ad9f79d7 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -1,6 +1,6 @@ /*! * tablesorter pager plugin - * updated 9/15/2014 (v2.17.8) + * updated 10/26/2014 (v2.18.0) */ /*jshint browser:true, jquery:true, unused:false */ ;(function($) { diff --git a/addons/pager/jquery.tablesorter.pager.min.js b/addons/pager/jquery.tablesorter.pager.min.js index ef9a49b9..9a1b5af9 100644 --- a/addons/pager/jquery.tablesorter.pager.min.js +++ b/addons/pager/jquery.tablesorter.pager.min.js @@ -1,2 +1,2 @@ -/* tablesorter pager plugin updated 9/15/2014 (v2.17.8) */ -;(function(h){var k=h.tablesorter;h.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(b,a){return a},ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(b){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last", cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var w=this,p=function(b,a){var d=b.cssDisabled,f=!!a,g=f||0===b.page,e=Math.min(b.totalPages,b.filteredPages),f=f||b.page===e-1||0===e;b.updateArrows&&(b.$container.find(b.cssFirst+","+b.cssPrev)[g?"addClass":"removeClass"](d).attr("aria-disabled", g),b.$container.find(b.cssNext+","+b.cssLast)[f?"addClass":"removeClass"](d).attr("aria-disabled",f))},t=function(b,a,d){var f,g,e,l,c=b.config;l=c.$table.hasClass("hasFilters");e=[];f=a.size||10;e=[c.widgetOptions&&c.widgetOptions.filter_filteredRow||"filtered",c.selectorRemove.replace(/^(\w+\.)/g,"")];a.countChildRows&&e.push(c.cssChildRow);e.join("|");l&&!a.ajaxUrl?h.isEmptyObject(c.cache)?a.filteredRows=a.totalRows=c.$tbodies.eq(0).children("tr").not(a.countChildRows?"":"."+c.cssChildRow).length: (a.filteredRows=0,h.each(c.cache[0].normalized,function(b,d){a.filteredRows+=a.regexRows.test(d[c.columns].$row[0].className)?0:1})):l||(a.filteredRows=a.totalRows);a.totalPages=Math.ceil(a.totalRows/f);c.totalRows=a.totalRows;c.filteredRows=a.filteredRows;a.filteredPages=Math.ceil(a.filteredRows/f)||0;if(0<=Math.min(a.totalPages,a.filteredPages)&&(e=a.size*a.page>a.filteredRows,a.startRow=e?1:0===a.filteredRows?0:a.size*a.page+1,a.page=e?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size* (a.page+1)),l=a.$container.find(a.cssPageDisplay),e=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(c,b){return a.totalPages?a.page+(b?parseInt(b,10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(c){var b,d;b=c.replace(/[{}\s]/g,"");c=b.split(":");d=a.ajaxData;var e=/(rows?|pages?)$/i.test(b)?0:"";return/(startRow|page)/.test(c[0])&&"input"===c[1]?(b=(""+("page"===c[0]?a.totalPages:a.totalRows)).length,d="page"===c[0]?a.page+1:a.startRow, ''):1"+f+"";a.$goto[0].innerHTML=e;a.$goto[0].value=a.page+1}l.find(".ts-startRow, .ts-page").unbind("change").bind("change",function(){var b=h(this).val(),b=h(this).hasClass("ts-startRow")?Math.floor(b/a.size)+ 1:b;c.$table.trigger("pageSet.pager",[b])})}p(a);a.initialized&&!1!==d&&(c.$table.trigger("pagerComplete",a),a.savePages&&k.storage&&k.storage(b,a.storageKey,{page:a.page,size:a.size}))},u=function(b,a){var d,f=b.config,g=f.$tbodies.eq(0);a.fixedHeight&&(g.find("tr.pagerSavedHeightSpacer").remove(),d=h.data(b,"pagerSavedHeight"))&&(d-=g.height(),5'))},A=function(b,a){var d=b.config.$tbodies.eq(0);d.find("tr.pagerSavedHeightSpacer").remove();h.data(b,"pagerSavedHeight",d.height());u(b,a);h.data(b,"pagerLastSize",a.size)},v=function(b,a){if(!a.ajaxUrl){var d,f=0,g=b.config,e=g.$tbodies.eq(0).children("tr"),h=e.length,c=a.page*a.size,m=c+a.size,n=g.widgetOptions&&g.widgetOptions.filter_filteredRow||"filtered",s=0;for(d=0;d=c&&s";for(g=0;g"+f[e][g]+"";p+=""}d.processAjaxOnInit&&r.$tbodies.eq(0).html(p)}d.processAjaxOnInit=!0;n&&n.length===b&&(m=(l=q.hasClass("hasStickyHeaders"))?r.widgetOptions.$sticky.children("thead:first").children("tr").children():"",c=q.find("tfoot tr:first").children(),r.$headers.filter("th").each(function(a){var b=h(this), d;b.find("."+k.css.icon).length?(d=b.find("."+k.css.icon).clone(!0),b.find(".tablesorter-header-inner").html(n[a]).append(d),l&&m.length&&(d=m.eq(a).find("."+k.css.icon).clone(!0),m.eq(a).find(".tablesorter-header-inner").html(n[a]).append(d))):(b.find(".tablesorter-header-inner").html(n[a]),l&&m.length&&m.eq(a).find(".tablesorter-header-inner").html(n[a]));c.eq(a).html(n[a])}))}r.showProcessing&&k.isProcessing(a);d.totalPages=Math.ceil(d.totalRows/(d.size||10));d.last.totalRows=d.totalRows;d.last.currentFilters= d.currentFilters;d.last.sortList=(r.sortList||[]).join(",");t(a,d);u(a,d);q.trigger("updateCache",[function(){d.initialized&&setTimeout(function(){q.trigger("applyWidgets").trigger("pagerChange",d)},0)}])}d.initialized||(d.initialized=!0,h(a).trigger("applyWidgets").trigger("pagerInitialized",d))},H=function(b,a){var d=G(b,a),f=h(document),g,e=b.config;""!==d&&(e.showProcessing&&k.isProcessing(b,!0),f.bind("ajaxError.pager",function(d,c,e,g){C(null,b,a,c,g);f.unbind("ajaxError.pager")}),g=++a.ajaxCounter, a.ajaxObject.url=d,a.ajaxObject.success=function(d,c,e){g(a&&a.length||0))f.debug&&k.log("Pager: no rows for pager to render");else{d.page>=d.totalPages&&D(b,d);d.isDisabled=!1;d.initialized&&c.trigger("pagerChange",d);if(d.removeRows){k.clearTableBody(b);f=k.processTbody(b,f.$tbodies.eq(0),!0);g=m?0:n;e=m?0:n;for(l=0;ln&&l<=s&&(l++,f.append(a[g]))),g++;k.processTbody(b,f,!1)}else v(b,d);t(b, d);d.isDisabled||u(b,d);b.isUpdating&&c.trigger("updateComplete",[b,!0])}},E=function(b,a){a.ajax?p(a,!0):(a.isDisabled=!0,h.data(b,"pagerLastPage",a.page),h.data(b,"pagerLastSize",a.size),a.page=0,a.size=a.totalRows,a.totalPages=1,h(b).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),x(b,b.config.rowsCopy,a),h(b).trigger("applyWidgets"),b.config.debug&&k.log("pager disabled"));a.$size.add(a.$goto).add(a.$container.find(".ts-startRow, .ts-page")).each(function(){h(this).attr("aria-disabled", "true").addClass(a.cssDisabled)[0].disabled=!0})},y=function(b){var a=b.config,d=a.pager;a.$table.trigger("updateCache",[function(){var f,g=[],e=b.config.cache[0].normalized;d.totalRows=e.length;for(f=0;fa.page&&(a.page=0);a.page>l-1&&0!==l&&(a.page= l-1);e.currentFilters=""===(e.currentFilters||[]).join("")?[]:e.currentFilters;a.currentFilters=""===(a.currentFilters||[]).join("")?[]:a.currentFilters;if(e.page!==a.page||e.size!==a.size||e.totalRows!==a.totalRows||(e.currentFilters||[]).join(",")!==(a.currentFilters||[]).join(",")||e.sortList!==(f.sortList||[]).join(","))f.debug&&k.log("Pager changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(f.sortList||[]).join(","),totalRows:a.totalRows,currentFilters:a.currentFilters||[]}, a.ajax?H(b,a):a.ajax||x(b,f.rowsCopy,a),h.data(b,"pagerLastPage",a.page),a.initialized&&!1!==d&&(g.trigger("pageMoved",a).trigger("applyWidgets"),b.isUpdating&&g.trigger("updateComplete",[b,!0]))}},z=function(b,a,d){d.size=a||d.size||10;d.$size.val(d.size);h.data(b,"pagerLastPage",d.page);h.data(b,"pagerLastSize",d.size);d.totalPages=Math.ceil(d.totalRows/d.size);d.filteredPages=Math.ceil(d.filteredRows/d.size);q(b,d)},I=function(b,a){a.page=0;q(b,a)},D=function(b,a){a.page=Math.min(a.totalPages, a.filteredPages)-1;q(b,a)},J=function(b,a){a.page++;a.page>=Math.min(a.totalPages,a.filteredPages)-1&&(a.page=Math.min(a.totalPages,a.filteredPages)-1);q(b,a)},K=function(b,a){a.page--;0>=a.page&&(a.page=0);q(b,a)},F=function(b,a,d){var f,g=b.config;a.$size.add(a.$goto).add(a.$container.find(".ts-startRow, .ts-page")).removeClass(a.cssDisabled).removeAttr("disabled").attr("aria-disabled","false");a.isDisabled=!1;a.page=h.data(b,"pagerLastPage")||a.page||0;a.size=h.data(b,"pagerLastSize")||parseInt(a.$size.find("option[selected]").val(), 10)||a.size||10;a.$size.val(a.size);a.totalPages=Math.ceil(Math.min(a.totalRows,a.filteredRows)/a.size);b.id&&(f=b.id+"_pager_info",a.$container.find(a.cssPageDisplay).attr("id",f),g.$table.attr("aria-describedby",f));d&&(g.$table.trigger("updateRows"),z(b,a.size,a),B(b,a),u(b,a),g.debug&&k.log("pager enabled"))};w.appender=function(b,a){var d=b.config,f=d.pager;f.ajax||(d.rowsCopy=a,f.totalRows=f.countChildRows?d.$tbodies.eq(0).children("tr").length:a.length,f.size=h.data(b,"pagerLastSize")||f.size|| 10,f.totalPages=Math.ceil(f.totalRows/f.size),x(b,a,f),t(b,f,!1))};w.construct=function(b){return this.each(function(){if(this.config&&this.hasInitialized){var a,d,f,g=this,e=g.config,l=e.widgetOptions,c=e.pager=h.extend(!0,{},h.tablesorterPager.defaults,b),m=e.$table,n=c.$container=h(c.container).addClass("tablesorter-pager").show();e.debug&&k.log("Pager initializing");c.oldAjaxSuccess=c.oldAjaxSuccess||c.ajaxObject.success;e.appender=w.appender;k.filter&&0<=h.inArray("filter",e.widgets)&&(c.currentFilters= e.$table.data("lastSearch")||k.filter.setDefaults(g,e,e.widgetOptions)||[],k.setFilters(g,c.currentFilters,!1));c.savePages&&k.storage&&(a=k.storage(g,c.storageKey)||{},c.page=isNaN(a.page)?c.page:a.page,c.size=(isNaN(a.size)?c.size:a.size)||10,h.data(g,"pagerLastSize",c.size));c.regexRows=new RegExp("("+(l.filter_filteredRow||"filtered")+"|"+e.selectorRemove.replace(/^(\w+\.)/g,"")+"|"+e.cssChildRow+")");m.unbind("filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize ".split(" ").join(".pager ")).bind("filterStart.pager", function(a,b){c.currentFilters=b;!1!==c.pageReset&&(e.lastCombinedFilter||"")!==(b||[]).join("")&&(c.page=c.pageReset)}).bind("filterEnd.pager sortEnd.pager",function(){c.initialized&&(e.delayInit&&e.rowsCopy&&0===e.rowsCopy.length&&y(g),t(g,c,!1),q(g,c,!1),e.$table.trigger("applyWidgets"),u(g,c))}).bind("disable.pager",function(a){a.stopPropagation();E(g,c)}).bind("enable.pager",function(a){a.stopPropagation();F(g,c,!0)}).bind("destroy.pager",function(a){a.stopPropagation();E(g,c);c.$container.hide(); g.config.appender=null;c.initialized=!1;delete g.config.rowsCopy;h(g).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager");k.storage&&k.storage(g,c.storageKey,"")}).bind("updateComplete.pager",function(a,b,d){a.stopPropagation();b&&!d&&(u(b,c),a=e.$tbodies.eq(0).children("tr").not(e.selectorRemove),c.totalRows=a.length-(c.countChildRows?0:a.filter("."+e.cssChildRow).length),c.totalPages=Math.ceil(c.totalRows/c.size),a.length&&e.rowsCopy&&0===e.rowsCopy.length&&y(b),t(b, c),v(b,c))}).bind("pageSize.pager",function(a,b){a.stopPropagation();z(g,parseInt(b,10)||10,c);v(g,c);t(g,c,!1);c.$size.length&&c.$size.val(c.size)}).bind("pageSet.pager",function(a,b){a.stopPropagation();c.page=(parseInt(b,10)||1)-1;c.$goto.length&&c.$goto.val(c.size);q(g,c,!0);t(g,c,!1)});d=[c.cssFirst,c.cssPrev,c.cssNext,c.cssLast];f=[I,K,J,D];n.find(d.join(",")).attr("tabindex",0).unbind("click.pager").bind("click.pager",function(a){a.stopPropagation();var b=h(this),e=d.length;if(!b.hasClass(c.cssDisabled))for(a= 0;a/.test(p)?h(p):h(''+p+"")).click(function(){h(this).remove()}).appendTo(k.$table.find("thead:first")).addClass(u+" "+k.selectorRemove.replace(/^(\w+\.)/g,"")).attr({role:"alert","aria-live":"assertive"}))})};h.fn.extend({tablesorterPager:h.tablesorterPager.construct})})(jQuery); +/* tablesorter pager plugin updated 10/26/2014 (v2.18.0) */ +;(function(h){var k=h.tablesorter;h.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(c,a){return a},ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(c){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next", cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var w=this,u=function(c,a){var b=c.cssDisabled,e=!!a,f=e||0===c.page,g=Math.min(c.totalPages,c.filteredPages),e=e||c.page===g-1||0===g;c.updateArrows&&(c.$container.find(c.cssFirst+","+c.cssPrev)[f?"addClass":"removeClass"](b).attr("aria-disabled", f),c.$container.find(c.cssNext+","+c.cssLast)[e?"addClass":"removeClass"](b).attr("aria-disabled",e))},p=function(c,a){var b=c.config,e=b.$table.hasClass("hasFilters");e&&!a.ajaxUrl?h.isEmptyObject(b.cache)?a.filteredRows=a.totalRows=b.$tbodies.eq(0).children("tr").not(a.countChildRows?"":"."+b.cssChildRow).length:(a.filteredRows=0,h.each(b.cache[0].normalized,function(c,e){a.filteredRows+=a.regexRows.test(e[b.columns].$row[0].className)?0:1})):e||(a.filteredRows=a.totalRows)},t=function(c,a,b){if(a.initialized){var e, f,g,l=c.config;e=a.size||10;a.countChildRows&&f.push(l.cssChildRow);a.totalPages=Math.ceil(a.totalRows/e);l.totalRows=a.totalRows;p(c,a);l.filteredRows=a.filteredRows;a.filteredPages=Math.ceil(a.filteredRows/e)||0;0<=Math.min(a.totalPages,a.filteredPages)&&(f=a.size*a.page>a.filteredRows,a.startRow=f?1:0===a.filteredRows?0:a.size*a.page+1,a.page=f?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),g=a.$container.find(a.cssPageDisplay),e=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output|| a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(d,b){return a.totalPages?a.page+(b?parseInt(b,10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(d){var b,c;b=d.replace(/[{}\s]/g,"");d=b.split(":");c=a.ajaxData;var e=/(rows?|pages?)$/i.test(b)?0:"";return/(startRow|page)/.test(d[0])&&"input"===d[1]?(b=(""+("page"===d[0]?a.totalPages:a.totalRows)).length,c="page"===d[0]?a.page+1:a.startRow,''):1'+b+""}),a.$goto.html(f).val(a.page+1)),g.find(".ts-startRow, .ts-page").unbind("change").bind("change",function(){var b=h(this).val(),b=h(this).hasClass("ts-startRow")?Math.floor(b/a.size)+1:b;l.$table.trigger("pageSet.pager",[b])})));u(a);C(c,a);a.initialized&&!1!==b&&(l.$table.trigger("pagerComplete",a),a.savePages&& k.storage&&k.storage(c,a.storageKey,{page:a.page,size:a.size}))}},H=function(c){var a,b,e,f,g;g=Math.min(c.totalPages,c.filteredPages)||1;var l=5*Math.ceil(g/c.maxOptionSize/5);e=g>c.maxOptionSize;f=c.page+1;a=l;b=g-l;var d=[1];for(a=e?l:1;a<=g;)d.push(a),a+=e?l:1;d.push(g);if(e){e=[];b=Math.max(Math.floor(c.maxOptionSize/l)-1,5);a=f-b;1>a&&(a=1);b=f+b;for(b>g&&(b=g);a<=b;a++)e.push(a);d=h.grep(d,function(a,b){return h.inArray(a,d)===b});f=d.length;g=e.length;f-g>l/2&&f+g>c.maxOptionSize&&(c=Math.floor(f/ 2)-Math.floor(g/2),Array.prototype.splice.apply(d,[c,g]));d=d.concat(e)}return d=h.grep(d,function(a,b){return h.inArray(a,d)===b}).sort(function(a,b){return a-b})},C=function(c,a){var b,e=c.config,f=e.$tbodies.eq(0);f.find("tr.pagerSavedHeightSpacer").remove();a.fixedHeight&&!a.isDisabled&&(b=h.data(c,"pagerSavedHeight"))&&(b-=f.height(),5'))},x=function(c,a){var b;b=c.config;var e=b.$tbodies.eq(0);e.find("tr.pagerSavedHeightSpacer").remove();e.children("tr:visible").length||e.append(' ');b=e.children("tr").eq(0).height()*a.size;h.data(c,"pagerSavedHeight",b);C(c,a);h.data(c,"pagerLastSize",a.size)},v=function(c,a){if(!a.ajaxUrl){var b,e=0,f=c.config,g=f.$tbodies.eq(0).children("tr"),h=g.length,d=a.page*a.size,m=d+a.size,s=f.widgetOptions&& f.widgetOptions.filter_filteredRow||"filtered",r=0;for(b=0;b=d&&r";for(f=0;f"+e[g][f]+"";n+=""}b.processAjaxOnInit&&q.$tbodies.eq(0).html(n)}b.processAjaxOnInit=!0;s&&s.length===c&&(m=(l=p.hasClass("hasStickyHeaders"))? q.widgetOptions.$sticky.children("thead:first").children("tr").children():"",d=p.find("tfoot tr:first").children(),q.$headers.filter("th").each(function(a){var b=h(this),c;b.find("."+k.css.icon).length?(c=b.find("."+k.css.icon).clone(!0),b.find(".tablesorter-header-inner").html(s[a]).append(c),l&&m.length&&(c=m.eq(a).find("."+k.css.icon).clone(!0),m.eq(a).find(".tablesorter-header-inner").html(s[a]).append(c))):(b.find(".tablesorter-header-inner").html(s[a]),l&&m.length&&m.eq(a).find(".tablesorter-header-inner").html(s[a])); d.eq(a).html(s[a])}))}q.showProcessing&&k.isProcessing(a);b.totalPages=Math.ceil(b.totalRows/(b.size||10));b.last.totalRows=b.totalRows;b.last.currentFilters=b.currentFilters;b.last.sortList=(q.sortList||[]).join(",");t(a,b,!0);p.trigger("updateCache",[function(){b.initialized&&setTimeout(function(){p.trigger("applyWidgets").trigger("pagerChange",b)},0)}])}b.initialized||(b.initialized=!0,h(a).trigger("applyWidgets").trigger("pagerInitialized",b))},J=function(c,a){var b=I(c,a),e=h(document),f,g=c.config; ""!==b&&(g.showProcessing&&k.isProcessing(c,!0),e.bind("ajaxError.pager",function(b,d,f,g){E(null,c,a,d,g);e.unbind("ajaxError.pager")}),f=++a.ajaxCounter,a.ajaxObject.url=b,a.ajaxObject.success=function(b,d,g){f(a&&a.length||0))e.debug&&k.log("Pager: no rows for pager to render");else{b.page>=b.totalPages&&y(c,b);b.isDisabled=!1;b.initialized&&d.trigger("pagerChange",b);if(b.removeRows){k.clearTableBody(c);e=k.processTbody(c,e.$tbodies.eq(0), !0);f=m?0:p;g=m?0:p;for(l=0;lp&&l<=r&&(l++,e.append(a[f]))),f++;k.processTbody(c,e,!1)}else v(c,b);t(c,b,!0);c.isUpdating&&d.trigger("updateComplete",[c,!0])}},F=function(c,a){a.ajax?u(a,!0):(a.isDisabled=!0,h.data(c,"pagerLastPage",a.page),h.data(c,"pagerLastSize",a.size),a.page=0,a.size=a.totalRows,a.totalPages=1,h(c).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),z(c,c.config.rowsCopy, a),h(c).trigger("applyWidgets"),c.config.debug&&k.log("pager disabled"));a.$size.add(a.$goto).add(a.$container.find(".ts-startRow, .ts-page")).each(function(){h(this).attr("aria-disabled","true").addClass(a.cssDisabled)[0].disabled=!0})},A=function(c){var a=c.config,b=a.pager;a.$table.trigger("updateCache",[function(){var e,f=[],g=c.config.cache[0].normalized;b.totalRows=g.length;for(e=0;ea.page&&(a.page=0);a.page>e-1&&0!==e&&(a.page=e-1);l.currentFilters=""===(l.currentFilters||[]).join("")?[]:l.currentFilters;a.currentFilters=""===(a.currentFilters||[]).join("")?[]:a.currentFilters;if(l.page!==a.page||l.size!==a.size||l.totalRows!==a.totalRows||(l.currentFilters||[]).join(",")!==(a.currentFilters||[]).join(",")||(l.ajaxUrl||"")!==(a.ajaxObject.url|| "")||(l.optAjaxUrl||"")!==(a.ajaxUrl||"")||l.sortList!==(f.sortList||[]).join(","))f.debug&&k.log("Pager changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(f.sortList||[]).join(","),totalRows:a.totalRows,currentFilters:a.currentFilters||[],ajaxUrl:a.ajaxObject.url||"",optAjaxUrl:a.ajaxUrl||""},a.ajax?J(c,a):a.ajax||z(c,f.rowsCopy,a),h.data(c,"pagerLastPage",a.page),a.initialized&&!1!==b&&(g.trigger("pageMoved",a).trigger("applyWidgets"),c.isUpdating&&g.trigger("updateComplete",[c, !0]))}},B=function(c,a,b){b.size=a||b.size||10;b.$size.val(b.size);h.data(c,"pagerLastPage",b.page);h.data(c,"pagerLastSize",b.size);b.totalPages=Math.ceil(b.totalRows/b.size);b.filteredPages=Math.ceil(b.filteredRows/b.size);n(c,b)},K=function(c,a){a.page=0;n(c,a)},y=function(c,a){a.page=Math.min(a.totalPages,a.filteredPages)-1;n(c,a)},L=function(c,a){a.page++;a.page>=Math.min(a.totalPages,a.filteredPages)-1&&(a.page=Math.min(a.totalPages,a.filteredPages)-1);n(c,a)},M=function(c,a){a.page--;0>=a.page&& (a.page=0);n(c,a)},G=function(c,a,b){var e,f=c.config;a.$size.add(a.$goto).add(a.$container.find(".ts-startRow, .ts-page")).removeClass(a.cssDisabled).removeAttr("disabled").attr("aria-disabled","false");a.isDisabled=!1;a.page=h.data(c,"pagerLastPage")||a.page||0;a.size=h.data(c,"pagerLastSize")||parseInt(a.$size.find("option[selected]").val(),10)||a.size||10;a.$size.val(a.size);a.totalPages=Math.ceil(Math.min(a.totalRows,a.filteredRows)/a.size);c.id&&(e=c.id+"_pager_info",a.$container.find(a.cssPageDisplay).attr("id", e),f.$table.attr("aria-describedby",e));x(c,a);b&&(f.$table.trigger("updateRows"),B(c,a.size,a),D(c,a),f.debug&&k.log("pager enabled"))};w.appender=function(c,a){var b=c.config,e=b.pager;e.ajax||(b.rowsCopy=a,e.totalRows=e.countChildRows?b.$tbodies.eq(0).children("tr").length:a.length,e.size=h.data(c,"pagerLastSize")||e.size||10,e.totalPages=Math.ceil(e.totalRows/e.size),z(c,a,e),t(c,e,!1))};w.construct=function(c){return this.each(function(){if(this.config&&this.hasInitialized){var a,b,e,f=this, g=f.config,l=g.widgetOptions,d=g.pager=h.extend(!0,{},h.tablesorterPager.defaults,c),m=g.$table,p=d.$container=h(d.container).addClass("tablesorter-pager").show();g.debug&&k.log("Pager initializing");d.oldAjaxSuccess=d.oldAjaxSuccess||d.ajaxObject.success;g.appender=w.appender;k.filter&&0<=h.inArray("filter",g.widgets)&&(d.currentFilters=g.$table.data("lastSearch")||k.filter.setDefaults(f,g,g.widgetOptions)||[],k.setFilters(f,d.currentFilters,!1));d.savePages&&k.storage&&(a=k.storage(f,d.storageKey)|| {},d.page=isNaN(a.page)?d.page:a.page,d.size=(isNaN(a.size)?d.size:a.size)||10,h.data(f,"pagerLastSize",d.size));d.regexRows=new RegExp("("+(l.filter_filteredRow||"filtered")+"|"+g.selectorRemove.replace(/^(\w+\.)/g,"")+"|"+g.cssChildRow+")");m.unbind("filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize pageSet ".split(" ").join(".pager ")).bind("filterStart.pager",function(a,b){d.currentFilters=b;!1!==d.pageReset&&(g.lastCombinedFilter||"")!==(b||[]).join("")&&(d.page=d.pageReset)}).bind("filterEnd.pager sortEnd.pager", function(){d.initialized&&(g.delayInit&&g.rowsCopy&&0===g.rowsCopy.length&&A(f),n(f,d,!1),g.$table.trigger("applyWidgets"),t(f,d,!1))}).bind("disable.pager",function(a){a.stopPropagation();F(f,d)}).bind("enable.pager",function(a){a.stopPropagation();G(f,d,!0)}).bind("destroy.pager",function(a){a.stopPropagation();F(f,d);d.$container.hide();f.config.appender=null;d.initialized=!1;delete f.config.rowsCopy;h(f).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager");k.storage&& k.storage(f,d.storageKey,"")}).bind("updateComplete.pager",function(a,b,c){a.stopPropagation();b&&!c&&(a=g.$tbodies.eq(0).children("tr").not(g.selectorRemove),d.totalRows=a.length-(d.countChildRows?0:a.filter("."+g.cssChildRow).length),d.totalPages=Math.ceil(d.totalRows/d.size),a.length&&g.rowsCopy&&0===g.rowsCopy.length&&A(b),d.page>=d.totalPages&&y(b,d),v(b,d),x(b,d),t(b,d,!0))}).bind("pageSize.pager",function(a,b){a.stopPropagation();B(f,parseInt(b,10)||10,d);v(f,d);t(f,d,!1);d.$size.length&&d.$size.val(d.size)}).bind("pageSet.pager", function(a,b){a.stopPropagation();d.page=(parseInt(b,10)||1)-1;d.$goto.length&&d.$goto.val(d.size);n(f,d,!0);t(f,d,!1)});b=[d.cssFirst,d.cssPrev,d.cssNext,d.cssLast];e=[K,M,L,y];p.find(b.join(",")).attr("tabindex",0).unbind("click.pager").bind("click.pager",function(a){a.stopPropagation();var c=h(this),g=b.length;if(!c.hasClass(d.cssDisabled))for(a=0;a/.test(u)?h(u):h(''+u+"")).click(function(){h(this).remove()}).appendTo(k.$table.find("thead:first")).addClass(t+ " "+k.selectorRemove.replace(/^(\w+\.)/g,"")).attr({role:"alert","aria-live":"assertive"}))})};h.fn.extend({tablesorterPager:h.tablesorterPager.construct})})(jQuery); diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 11e44ed5..1fdc8ee2 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,5 +1,5 @@ /**! -* TableSorter 2.17.8 - Client-side table sorting with ease! +* TableSorter 2.18.0 - Client-side table sorting with ease! * @requires jQuery v1.2.6+ * * Copyright (c) 2007 Christian Bach @@ -24,7 +24,7 @@ var ts = this; - ts.version = "2.17.8"; + ts.version = "2.18.0"; ts.parsers = []; ts.widgets = []; diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index e20f0114..0449400b 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.17.8 min - Client-side table sorting with ease! +* TableSorter 2.18.0 min - Client-side table sorting with ease! * Copyright (c) 2007 Christian Bach */ -!function(h){h.extend({tablesorter:new function(){function d(){var b=arguments[0],a=1':"";n.$headers=h(b).find(n.selectorHeaders).each(function(k){c=h(this);a=g.getColumnData(b,n.headers,k,!0);n.headerContent[k]=h(this).html();""!==n.headerTemplate&&(l=n.headerTemplate.replace(/\{content\}/g,h(this).html()).replace(/\{icon\}/g, e),n.onRenderTemplate&&(f=n.onRenderTemplate.apply(c,[k,l]))&&"string"===typeof f&&(l=f),h(this).html('

'+l+"
"));n.onRenderHeader&&n.onRenderHeader.apply(c,[k]);this.column=parseInt(h(this).attr("data-column"),10);this.order=D(g.getData(c,a,"sortInitialOrder")||n.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;x=g.getData(c,a,"lockedOrder")||!1;"undefined"!==typeof x&&!1!==x&&(this.order=this.lockedOrder=D(x)?[1,1,1]:[0,0,0]);c.addClass(g.css.header+ " "+n.cssHeader);n.headerList[k]=this;c.parent().addClass(g.css.headerRow+" "+n.cssHeaderRow).attr("role","row");n.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});H(b);n.debug&&(q("Built headers:",k),d(n.$headers))}function C(b,a,c){var f=b.config;f.$table.find(f.selectorRemove).remove();v(b);w(b);I(f.$table,a,c)}function H(b){var a,c,f,e=b.config;e.$headers.each(function(l,d){c=h(d);f=g.getColumnData(b,e.headers,l,!0);a="false"===g.getData(d,f,"sorter")||"false"===g.getData(d, f,"parser");d.sortDisabled=a;c[a?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+a);b.id&&(a?c.removeAttr("aria-controls"):c.attr("aria-controls",b.id))})}function F(b){var a,c,f=b.config,e=f.sortList,l=e.length,d=g.css.sortNone+" "+f.cssNone,k=[g.css.sortAsc+" "+f.cssAsc,g.css.sortDesc+" "+f.cssDesc],n=["ascending","descending"],m=h(b).find("tfoot tr").children().add(f.$extraHeaders).removeClass(k.join(" "));f.$headers.removeClass(k.join(" ")).addClass(d).attr("aria-sort","none"); for(a=0;a"),c=h(b).width(),h(b.tBodies).not("."+f.cssInfoBlock).find("tr:first").children(":visible").each(function(){a.append(h("").css("width",parseInt(h(this).width()/c*1E3,10)/10+"%"))}),f.$table.prepend(a))}function P(b,a){var c,f,e,l,g,k=b.config,d=a||k.sortList;k.sortList= [];h.each(d,function(b,a){l=parseInt(a[0],10);if(e=k.$headers.filter('[data-column="'+l+'"]:last')[0]){f=(f=(""+a[1]).match(/^(1|d|s|o|n)/))?f[0]:"";switch(f){case "1":case "d":f=1;break;case "s":f=g||0;break;case "o":c=e.order[(g||0)%(k.sortReset?3:2)];f=0===c?1:1===c?0:2;break;case "n":e.count+=1;f=e.order[e.count%(k.sortReset?3:2)];break;default:f=0}g=0===b?f:g;c=[l,parseInt(f,10)||0];k.sortList.push(c);f=h.inArray(c[1],e.order);e.count=0<=f?f:c[1]%(k.sortReset?3:2)}})}function Q(b,a){return b&& b[a]?b[a].type||"":""}function L(b,a,c){if(b.isUpdating)return setTimeout(function(){L(b,a,c)},50);var f,e,l,d,k=b.config,n=!c[k.sortMultiSortKey],m=k.$table;m.trigger("sortStart",b);a.count=c[k.sortResetKey]?2:(a.count+1)%(k.sortReset?3:2);k.sortRestart&&(e=a,k.$headers.each(function(){this===e||!n&&h(this).is("."+g.css.sortDesc+",."+g.css.sortAsc)||(this.count=-1)}));e=a.column;if(n){k.sortList=[];if(null!==k.sortForce)for(f=k.sortForce,l=0;lf&&(k.sortList.push([e,f]),1f&& (k.sortList.push([e,f]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me", debug:!1,headerList:[],empties:{},strings:{},parsers:[]};g.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};g.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ", sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"};g.log=d;g.benchmark=q;g.construct=function(b){return this.each(function(){var a=h.extend(!0,{},g.defaults,b);a.originalSettings=b;!this.hasInitialized&&g.buildTable&&"TABLE"!==this.tagName?g.buildTable(this,a):g.setup(this,a)})};g.setup=function(b,a){if(!b||!b.tHead||0===b.tBodies.length||!0===b.hasInitialized)return a.debug?d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"): "";var c="",f=h(b),e=h.metadata;b.hasInitialized=!1;b.isProcessing=!0;b.config=a;h.data(b,"tablesorter",a);a.debug&&h.data(b,"startoveralltimer",new Date);a.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1'),c=h.fn.detach?a.detach():a.remove();c=h(b).find("span.tablesorter-savemyplace");a.insertAfter(c);c.remove();b.isProcessing=!1};g.clearTableBody=function(b){h(b)[0].config.$tbodies.children().detach()};g.bindEvents=function(b,a,c){b=h(b)[0];var f,e=b.config;!0!==c&&(e.$extraHeaders=e.$extraHeaders? e.$extraHeaders.add(a):a);a.find(e.selectorSort).add(a.filter(e.selectorSort)).unbind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" "),function(c,d){var g;g=c.type;if(!(1!==(c.which||c.button)&&!/sort|keyup/.test(g)||"keyup"===g&&13!==c.which||"mouseup"===g&&!0!==d&&250<(new Date).getTime()-f)){if("mousedown"===g)return f=(new Date).getTime(),/(input|select|button|textarea)/i.test(c.target.tagName)?"":!e.cancelSelection; e.delayInit&&p(e.cache)&&w(b);g=h.fn.closest?h(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)?this:h(this).parents("th, td")[0];g=e.$headers[a.index(g)];g.sortDisabled||L(b,g,c)}});e.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};g.restoreHeaders=function(b){var a=h(b)[0].config;a.$table.find(a.selectorHeaders).each(function(b){h(this).find("."+g.css.headerIn).length&&h(this).html(a.headerContent[b])})};g.destroy=function(b, a,c){b=h(b)[0];if(b.hasInitialized){g.refreshWidgets(b,!0,!0);var f=h(b),e=b.config,d=f.find("thead:first"),q=d.find("tr."+g.css.headerRow).removeClass(g.css.headerRow+" "+e.cssHeaderRow),k=f.find("tfoot:first > tr").children("th, td");!1===a&&0<=h.inArray("uitheme",e.widgets)&&(f.trigger("applyWidgetId",["uitheme"]),f.trigger("applyWidgetId",["zebra"]));d.find("tr").not(q).remove();f.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState ".split(" ").join(e.namespace+ " "));e.$headers.add(k).removeClass([g.css.header,e.cssHeader,e.cssAsc,e.cssDesc,g.css.sortAsc,g.css.sortDesc,g.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");q.find(e.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(e.namespace+" "));g.restoreHeaders(b);f.toggleClass(g.css.table+" "+e.tableClass+" tablesorter-"+e.theme,!1===a);b.hasInitialized=!1;delete b.config.cache;"function"===typeof c&&c(b)}};g.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};g.sortNatural=function(b,a){if(b===a)return 0;var c,f,e,d,h,k;f=g.regex;if(f.hex.test(a)){c=parseInt(b.match(f.hex),16);e=parseInt(a.match(f.hex),16);if(ce)return 1}c=b.replace(f.chunk,"\\0$1\\0").replace(f.chunks,"").split("\\0");f=a.replace(f.chunk,"\\0$1\\0").replace(f.chunks,"").split("\\0");k=Math.max(c.length,f.length);for(h=0;hd)return 1}return 0};g.sortNaturalAsc=function(b,a,c,f,e){if(b===a)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===a&&0!==c?"boolean"===typeof c?c?1:-1:c||1:g.sortNatural(b,a)};g.sortNaturalDesc=function(b,a,c,f,e){if(b===a)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===a&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:g.sortNatural(a,b)};g.sortText=function(b,a){return b>a?1:bh.inArray(q[f].id,l))&&(e.debug&&d('Refeshing widgets: Removing "'+q[f].id+'"'),q[f].hasOwnProperty("remove")&&e.widgetInit[q[f].id]&&(q[f].remove(b, e,e.widgetOptions),e.widgetInit[q[f].id]=!1));!0!==c&&g.applyWidget(b,a)};g.getData=function(b,a,c){var d="";b=h(b);var e,g;if(!b.length)return"";e=h.metadata?b.metadata():!1;g=" "+(b.attr("class")||"");"undefined"!==typeof b.data(c)||"undefined"!==typeof b.data(c.toLowerCase())?d+=b.data(c)||b.data(c.toLowerCase()):e&&"undefined"!==typeof e[c]?d+=e[c]:a&&"undefined"!==typeof a[c]?d+=a[c]:" "!==g&&g.match(" "+c+"-")&&(d=g.match(new RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return h.trim(d)};g.formatFloat= function(b,a){if("string"!==typeof b||""===b)return b;var c;b=(a&&a.config?!1!==a.config.usNumberFormat:"undefined"!==typeof a?a:1)?b.replace(/,/g,""):b.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(b)&&(b=b.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(b);return isNaN(c)?h.trim(b):c};g.isDigit=function(b){return isNaN(b)?/^[\-+(]?\d+[)]?$/.test(b.toString().replace(/[,.'"\s]/g,"")):!0}}});var r=h.tablesorter;h.fn.extend({tablesorter:r.construct});r.addParser({id:"no-parser",is:function(){return!1}, format:function(){return""},type:"text"});r.addParser({id:"text",is:function(){return!0},format:function(d,q){var p=q.config;d&&(d=h.trim(p.ignoreCase?d.toLocaleLowerCase():d),d=p.sortLocaleCompare?r.replaceAccents(d):d);return d},type:"text"});r.addParser({id:"digit",is:function(d){return r.isDigit(d)},format:function(d,q){var p=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof p?p:d?h.trim(d&&q.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});r.addParser({id:"currency", is:function(d){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((d||"").replace(/[+\-,. ]/g,""))},format:function(d,q){var p=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof p?p:d?h.trim(d&&q.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});r.addParser({id:"ipAddress",is:function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},format:function(d,h){var p,y=d?d.split("."):"",v="",w=y.length; for(p=0;pd.length},format:function(d,h){return d?r.formatFloat(d.replace(/%/g,""),h):d},type:"numeric"});r.addParser({id:"usLongDate",is:function(d){return/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i.test(d)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(d)},format:function(d,h){return d?r.formatFloat((new Date(d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,h):d},type:"numeric"});r.addParser({id:"shortDate",is:function(d){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((d|| "").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(d,h,p,y){if(d){p=h.config;var v=p.$headers.filter("[data-column="+y+"]:last");y=v.length&&v[0].dateFormat||r.getData(v,r.getColumnData(h,p.headers,y),"dateFormat")||p.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===y?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===y?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===y&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/, "$1/$2/$3"))}return d?r.formatFloat((new Date(d)).getTime()||d,h):d},type:"numeric"});r.addParser({id:"time",is:function(d){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(d)},format:function(d,h){return d?r.formatFloat((new Date("2000/01/01 "+d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,h):d},type:"numeric"});r.addParser({id:"metadata",is:function(){return!1},format:function(d,q,p){d=q.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return h(p).metadata()[d]}, type:"numeric"});r.addWidget({id:"zebra",priority:90,format:function(d,q,p){var y,v,w,z,D,E=new RegExp(q.cssChildRow,"i"),C=q.$tbodies;q.debug&&(D=new Date);for(d=0;d':"";n.$headers=k(b).find(n.selectorHeaders).each(function(h){c=k(this);a=g.getColumnData(b,n.headers,h,!0);n.headerContent[h]=k(this).html();""!==n.headerTemplate&&(l=n.headerTemplate.replace(/\{content\}/g,k(this).html()).replace(/\{icon\}/g, d),n.onRenderTemplate&&(e=n.onRenderTemplate.apply(c,[h,l]))&&"string"===typeof e&&(l=e),k(this).html('
'+l+"
"));n.onRenderHeader&&n.onRenderHeader.apply(c,[h,n,n.$table]);this.column=parseInt(k(this).attr("data-column"),10);this.order=E(g.getData(c,a,"sortInitialOrder")||n.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;w=g.getData(c,a,"lockedOrder")||!1;"undefined"!==typeof w&&!1!==w&&(this.order=this.lockedOrder=E(w)?[1,1,1]:[0,0,0]);c.addClass(g.css.header+ " "+n.cssHeader);n.headerList[h]=this;c.parent().addClass(g.css.headerRow+" "+n.cssHeaderRow).attr("role","row");n.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});G(b);n.debug&&(t("Built headers:",h),f(n.$headers))}function H(b,a,c){var e=b.config;e.$table.find(e.selectorRemove).remove();q(b);z(b);I(e.$table,a,c)}function G(b){var a,c,e,d=b.config;d.$headers.each(function(l,f){c=k(f);e=g.getColumnData(b,d.headers,l,!0);a="false"===g.getData(f,e,"sorter")||"false"===g.getData(f, e,"parser");f.sortDisabled=a;c[a?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+a);b.id&&(a?c.removeAttr("aria-controls"):c.attr("aria-controls",b.id))})}function F(b){var a,c,e=b.config,d=e.sortList,l=d.length,f=g.css.sortNone+" "+e.cssNone,h=[g.css.sortAsc+" "+e.cssAsc,g.css.sortDesc+" "+e.cssDesc],n=["ascending","descending"],p=k(b).find("tfoot tr").children().add(e.$extraHeaders).removeClass(h.join(" "));e.$headers.removeClass(h.join(" ")).addClass(f).attr("aria-sort","none"); for(a=0;a"),c=k(b).width(),k(b.tBodies).not("."+e.cssInfoBlock).find("tr:first").children(":visible").each(function(){a.append(k("").css("width",parseInt(k(this).width()/c*1E3,10)/10+"%"))}),e.$table.prepend(a))}function Q(b,a){var c,e,d,l,g,h=b.config,f=a||h.sortList;h.sortList= [];k.each(f,function(b,a){l=parseInt(a[0],10);if(d=h.$headers.filter('[data-column="'+l+'"]:last')[0]){e=(e=(""+a[1]).match(/^(1|d|s|o|n)/))?e[0]:"";switch(e){case "1":case "d":e=1;break;case "s":e=g||0;break;case "o":c=d.order[(g||0)%(h.sortReset?3:2)];e=0===c?1:1===c?0:2;break;case "n":d.count+=1;e=d.order[d.count%(h.sortReset?3:2)];break;default:e=0}g=0===b?e:g;c=[l,parseInt(e,10)||0];h.sortList.push(c);e=k.inArray(c[1],d.order);d.count=0<=e?e:c[1]%(h.sortReset?3:2)}})}function R(b,a){return b&& b[a]?b[a].type||"":""}function M(b,a,c){if(b.isUpdating)return setTimeout(function(){M(b,a,c)},50);var e,d,l,f,h=b.config,n=!c[h.sortMultiSortKey],p=h.$table;p.trigger("sortStart",b);a.count=c[h.sortResetKey]?2:(a.count+1)%(h.sortReset?3:2);h.sortRestart&&(d=a,h.$headers.each(function(){this===d||!n&&k(this).is("."+g.css.sortDesc+",."+g.css.sortAsc)||(this.count=-1)}));d=parseInt(k(a).attr("data-column"),10);if(n){h.sortList=[];if(null!==h.sortForce)for(e=h.sortForce,l=0;le&&(h.sortList.push([d,e]),1e&&(h.sortList.push([d,e]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};g.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner", icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};g.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"};g.log=f;g.benchmark=t;g.construct=function(b){return this.each(function(){var a= k.extend(!0,{},g.defaults,b);a.originalSettings=b;!this.hasInitialized&&g.buildTable&&"TABLE"!==this.tagName?g.buildTable(this,a):g.setup(this,a)})};g.setup=function(b,a){if(!b||!b.tHead||0===b.tBodies.length||!0===b.hasInitialized)return a.debug?f("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var c="",e=k(b),d=k.metadata;b.hasInitialized=!1;b.isProcessing=!0;b.config=a;k.data(b,"tablesorter",a);a.debug&&k.data(b,"startoveralltimer",new Date); a.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1'),c=k.fn.detach?a.detach():a.remove();c=k(b).find("span.tablesorter-savemyplace");a.insertAfter(c);c.remove();b.isProcessing=!1};g.clearTableBody=function(b){k(b)[0].config.$tbodies.children().detach()};g.bindEvents=function(b,a,c){b=k(b)[0];var e,d=b.config;!0!==c&&(d.$extraHeaders=d.$extraHeaders?d.$extraHeaders.add(a):a);a.find(d.selectorSort).add(a.filter(d.selectorSort)).unbind(["mousedown","mouseup", "sort","keyup",""].join(d.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(d.namespace+" "),function(c,g){var f;f=c.type;if(!(1!==(c.which||c.button)&&!/sort|keyup/.test(f)||"keyup"===f&&13!==c.which||"mouseup"===f&&!0!==g&&250<(new Date).getTime()-e)){if("mousedown"===f)return e=(new Date).getTime(),/(input|select|button|textarea)/i.test(c.target.tagName)?"":!d.cancelSelection;d.delayInit&&m(d.cache)&&z(b);f=k.fn.closest?k(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)? this:k(this).parents("th, td")[0];f=d.$headers[a.index(f)];f.sortDisabled||M(b,f,c)}});d.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};g.restoreHeaders=function(b){var a=k(b)[0].config;a.$table.find(a.selectorHeaders).each(function(b){k(this).find("."+g.css.headerIn).length&&k(this).html(a.headerContent[b])})};g.destroy=function(b,a,c){b=k(b)[0];if(b.hasInitialized){g.refreshWidgets(b,!0,!0);var e=k(b),d=b.config,f=e.find("thead:first"), m=f.find("tr."+g.css.headerRow).removeClass(g.css.headerRow+" "+d.cssHeaderRow),h=e.find("tfoot:first > tr").children("th, td");!1===a&&0<=k.inArray("uitheme",d.widgets)&&(e.trigger("applyWidgetId",["uitheme"]),e.trigger("applyWidgetId",["zebra"]));f.find("tr").not(m).remove();e.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState ".split(" ").join(d.namespace+ " "));d.$headers.add(h).removeClass([g.css.header,d.cssHeader,d.cssAsc,d.cssDesc,g.css.sortAsc,g.css.sortDesc,g.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");m.find(d.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(d.namespace+" "));g.restoreHeaders(b);e.toggleClass(g.css.table+" "+d.tableClass+" tablesorter-"+d.theme,!1===a);b.hasInitialized=!1;delete b.config.cache;"function"===typeof c&&c(b)}};g.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};g.sortNatural=function(b,a){if(b===a)return 0;var c,e,d,f,k,h;e=g.regex;if(e.hex.test(a)){c=parseInt(b.match(e.hex),16);d=parseInt(a.match(e.hex),16);if(cd)return 1}c=b.replace(e.chunk,"\\0$1\\0").replace(e.chunks,"").split("\\0");e=a.replace(e.chunk,"\\0$1\\0").replace(e.chunks,"").split("\\0");h=Math.max(c.length,e.length);for(k=0;kf)return 1}return 0};g.sortNaturalAsc=function(b,a,c,e,d){if(b===a)return 0;c=d.string[d.empties[c]||d.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===a&&0!==c?"boolean"===typeof c?c?1:-1:c||1:g.sortNatural(b,a)};g.sortNaturalDesc=function(b,a,c,e,d){if(b===a)return 0;c=d.string[d.empties[c]||d.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===a&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:g.sortNatural(a,b)};g.sortText=function(b,a){return b>a?1:bk.inArray(m[e].id,l))&&(d.debug&&f('Refeshing widgets: Removing "'+m[e].id+'"'),m[e].hasOwnProperty("remove")&&d.widgetInit[m[e].id]&&(m[e].remove(b,d,d.widgetOptions),d.widgetInit[m[e].id]=!1));!0!==c&&g.applyWidget(b,a)};g.getData=function(b, a,c){var e="";b=k(b);var d,f;if(!b.length)return"";d=k.metadata?b.metadata():!1;f=" "+(b.attr("class")||"");"undefined"!==typeof b.data(c)||"undefined"!==typeof b.data(c.toLowerCase())?e+=b.data(c)||b.data(c.toLowerCase()):d&&"undefined"!==typeof d[c]?e+=d[c]:a&&"undefined"!==typeof a[c]?e+=a[c]:" "!==f&&f.match(" "+c+"-")&&(e=f.match(new RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return k.trim(e)};g.formatFloat=function(b,a){if("string"!==typeof b||""===b)return b;var c;b=(a&&a.config?!1!==a.config.usNumberFormat: "undefined"!==typeof a?a:1)?b.replace(/,/g,""):b.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(b)&&(b=b.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(b);return isNaN(c)?k.trim(b):c};g.isDigit=function(b){return isNaN(b)?/^[\-+(]?\d+[)]?$/.test(b.toString().replace(/[,.'"\s]/g,"")):!0}}});var q=k.tablesorter;k.fn.extend({tablesorter:q.construct});q.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"});q.addParser({id:"text",is:function(){return!0}, format:function(f,t){var m=t.config;f&&(f=k.trim(m.ignoreCase?f.toLocaleLowerCase():f),f=m.sortLocaleCompare?q.replaceAccents(f):f);return f},type:"text"});q.addParser({id:"digit",is:function(f){return q.isDigit(f)},format:function(f,t){var m=q.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),t);return f&&"number"===typeof m?m:f?k.trim(f&&t.config.ignoreCase?f.toLocaleLowerCase():f):f},type:"numeric"});q.addParser({id:"currency",is:function(f){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((f|| "").replace(/[+\-,. ]/g,""))},format:function(f,t){var m=q.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),t);return f&&"number"===typeof m?m:f?k.trim(f&&t.config.ignoreCase?f.toLocaleLowerCase():f):f},type:"numeric"});q.addParser({id:"url",is:function(f){return/^(https?|ftp|file):\/\//.test(f)},format:function(f){return f?k.trim(f.replace(/(https?|ftp|file):\/\//,"")):f},parsed:!0,type:"text"});q.addParser({id:"isoDate",is:function(f){return/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/.test(f)},format:function(f, k){var m=f?new Date(f.replace(/-/g,"/")):f;return m instanceof Date&&isFinite(m)?m.getTime():f},type:"numeric"});q.addParser({id:"percent",is:function(f){return/(\d\s*?%|%\s*?\d)/.test(f)&&15>f.length},format:function(f,k){return f?q.formatFloat(f.replace(/%/g,""),k):f},type:"numeric"});q.addParser({id:"image",is:function(f,k,m,q){return 0'),a.cssIcon&&h.find("."+c.css.icon).addClass(l.icons),e.hasClass("hasFilters")&&h.find("."+c.css.filterRow).addClass(l.filterRow));for(e=0;e=]/g,query:"(q|query)"},types:{regex:function(d,a){if(c.filter.regex.regex.test(a.iFilter)){var b,e=c.filter.regex.regex.exec(a.iFilter);try{b=(new RegExp(e[1],e[2])).test(a.iExact)}catch(f){b=!1}return b}return null},operators:function(d,a){if(/^[<>]=?/.test(a.iFilter)){var b, e;b=d.table;var f=a.index,h=a.parsed[f],g=c.formatFloat(a.iFilter.replace(c.filter.regex.operators,""),b),n=d.parsers[f],l=g;if(h||"numeric"===n.type)e=c.filter.parseFilter(d,k.trim(""+a.iFilter.replace(c.filter.regex.operators,"")),f,h,!0),g="number"!==typeof e||""===e||isNaN(e)?g:e;b=!h&&"numeric"!==n.type||isNaN(g)||"undefined"===typeof a.cache?isNaN(a.iExact)?c.formatFloat(a.iExact.replace(c.filter.regex.nondigit,""),b):c.formatFloat(a.iExact,b):a.cache;/>/.test(a.iFilter)&&(e=/>=/.test(a.iFilter)? b>=g:b>g);/l&&(e=k,k=l,l=e);return b>=k&&b<=l||""===k||""===l}return null},wild:function(d,a){if(/[\?|\*]/.test(a.iFilter)||c.filter.regex.orReplace.test(a.filter)){var b=a.index,e=a.parsed[b],e=c.filter.parseFilter(d,a.iFilter.replace(c.filter.regex.orReplace,"|"),b,e);!d.$headers.filter('[data-column="'+b+'"]:last').hasClass("filter-match")&&/\|/.test(e)&&(e=a.anyMatch&&k.isArray(a.rowArray)?"("+e+")":"^("+e+ ")$");return(new RegExp(e.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*"))).test(a.iExact)}return null},fuzzy:function(d,a){if(/^~/.test(a.iFilter)){var b,e=0,f=a.iExact.length,h=c.filter.parseFilter(d,a.iFilter.slice(1),a.index,a.parsed[a.index]);for(b=0;b'+(g.data("placeholder")||g.attr("data-placeholder")||b.filter_placeholder.select||"")+"":"",h=r=f,0<=f.indexOf(b.filter_selectSourceSeparator)&&(r=f.split(b.filter_selectSourceSeparator),h=r[1],r=r[0]),e+="");a.$table.find("thead").find("select."+c.css.filter+ '[data-column="'+n+'"]').append(e)}c.filter.buildDefault(d,!0);c.filter.bindSearch(d,a.$table.find("."+c.css.filter),!0);b.filter_external&&c.filter.bindSearch(d,b.filter_external);b.filter_hideFilters&&c.filter.hideFilters(d,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(b,e){g=e?a.$table.find("."+c.css.header).filter("[data-column]").filter(function(){return""!==e[k(this).data("column")]}):"";c.isProcessing(d,"filterStart"===b.type, e?g:"")});a.filteredRows=a.totalRows;a.debug&&c.benchmark("Applying Filter widget",p);a.$table.bind("tablesorter-initialized pagerInitialized",function(){var b=this.config.widgetOptions;l=c.filter.setDefaults(d,a,b)||[];l.length&&(a.delayInit&&""===l.join("")||c.setFilters(d,l,!0));a.$table.trigger("filterFomatterUpdate");setTimeout(function(){b.filter_initialized||c.filter.filterInitComplete(a)},100)});a.pager&&a.pager.initialized&&!b.filter_initialized&&(a.$table.trigger("filterFomatterUpdate"), setTimeout(function(){c.filter.filterInitComplete(a)},100))},formatterUpdated:function(c,a){var b=c.closest("table")[0].config.widgetOptions;b.filter_initialized||(b.filter_formatterInit[a]=1)},filterInitComplete:function(d){var a=d.widgetOptions,b=0,e=function(){a.filter_initialized=!0;a.filter_initializing=!1;c.filter.findRows(d.table,d.$table.data("lastSearch"),null);d.$table.trigger("filterInit",d)};k.each(a.filter_formatterInit,function(a,c){1===c&&b++});clearTimeout(a.filter_initTimer);a.filter_initialized|| b!==a.filter_formatterCount?a.filter_initialized||(a.filter_initTimer=setTimeout(function(){e()},500)):e()},setDefaults:function(d,a,b){var e,f=c.getFilters(d)||[];b.filter_saveFilters&&c.storage&&(e=c.storage(d,"tablesorter-filters")||[],(d=k.isArray(e))&&""===e.join("")||!d||(f=e));if(""===f.join(""))for(d=0;d';for(f=0;f";a.$filters=k(g+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(f=0;f").appendTo(a.$filters.eq(f)):((g=c.getColumnData(d,b.filter_formatter,f))?(b.filter_formatterCount++,(g=g(a.$filters.eq(f),f))&&0===g.length&&(g=a.$filters.eq(f).children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==a.$filters[f])&&a.$filters.eq(f).append(g)):g=k('').appendTo(a.$filters.eq(f)),g&&g.attr("placeholder",h.data("placeholder")||h.attr("data-placeholder")||b.filter_placeholder.search||"")),g&&(h=(k.isArray(b.filter_cssFilter)? "undefined"!==typeof b.filter_cssFilter[f]?b.filter_cssFilter[f]||"":"":b.filter_cssFilter)||"",g.addClass(c.css.filter+" "+h).attr("data-column",f),e&&(g.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(d,a,b){d=k(d)[0];a=k(a);if(a.length){var e=d.config,f=e.widgetOptions,h=f.filter_$externalFilters;!0!==b&&(f.filter_$anyMatch=a.filter('[data-column="all"]'),f.filter_$externalFilters=h&&h.length?f.filter_$externalFilters.add(a):a,c.setFilters(d,e.$table.data("lastSearch")|| [],!1===b));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keypress","keyup","search","change",""].join(e.namespace+"filter ")).bind("keyup"+e.namespace+"filter",function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if(!1===f.filter_liveSearch||""!==this.value&&("number"===typeof f.filter_liveSearch&&this.value.lengtha.which||37<=a.which&&40>=a.which)))return;c.filter.searching(d,!0, !0)}).bind(["search","change","keypress",""].join(e.namespace+"filter "),function(a){var b=k(this).data("column");if(13===a.which||"search"===a.type||"change"===a.type&&this.value!==e.lastSearch[b])a.preventDefault(),k(this).attr("data-lastSearchTime",(new Date).getTime()),c.filter.searching(d,!1,!0)})}},searching:function(d,a,b){var e=d.config.widgetOptions;clearTimeout(e.searchTimer);"undefined"===typeof a||!0===a?e.searchTimer=setTimeout(function(){c.filter.checkFilters(d,a,b)},e.filter_liveSearch? e.filter_searchDelay:10):c.filter.checkFilters(d,a,b)},checkFilters:function(d,a,b){var e=d.config,f=e.widgetOptions,h=k.isArray(a),g=h?a:c.getFilters(d,!0),n=(g||[]).join("");if(k.isEmptyObject(e.cache))e.delayInit&&e.pager&&e.pager.initialized&&e.$table.trigger("updateCache",[function(){c.filter.checkFilters(d,!1,b)}]);else if(h&&(c.setFilters(d,g,!1,!0!==b),f.filter_initialized||(e.lastCombinedFilter="")),f.filter_hideFilters&&e.$table.find("."+c.css.filterRow).trigger(""===n?"mouseleave":"mouseenter"), e.lastCombinedFilter!==n||!1===a)if(!1===a&&(e.lastCombinedFilter=null,e.lastSearch=[]),f.filter_initialized&&e.$table.trigger("filterStart",[g]),e.showProcessing)setTimeout(function(){c.filter.findRows(d,g,n);return!1},30);else return c.filter.findRows(d,g,n),!1},hideFilters:function(d,a){var b,e,f;k(d).find("."+c.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(c){b=k(this);clearTimeout(f);f=setTimeout(function(){/enter|over/.test(c.type)?b.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!== b[0]&&""===a.lastCombinedFilter&&b.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(b){e=k(this).closest("tr");clearTimeout(f);f=setTimeout(function(){if(""===c.getFilters(a.$table).join(""))e["focus"===b.type?"removeClass":"addClass"]("hideme")},200)})},defaultFilter:function(d,a){if(""===d)return d;var b=c.filter.regex.iQuery,e=a.match(c.filter.regex.igQuery).length,f=1h&&1=?\s*-\d)/.test(y)||/(<=?\s*\d)/.test(y))&&!(""!==y&&q.$filters&&q.$filters.eq(l).find("select").length&&!q.$headers.filter('[data-column="'+l+'"]:last').hasClass("filter-match"));y=f.not("."+u.filter_filteredRow).length;z&&0===y&&(z=!1);q.debug&&c.log("Searching through "+(z&&yk.inArray(a,H)&&(x=b(q,m),null!==x))return B=x,!1});if(null!==B)v=B;else if(u.filter_startsWith)for(v=!1,p=q.columns;!v&&0k.inArray(a,G)&&(x=b(q,m),null!==x))return B=x,!1}),null!==B?w=B:(m.exact=(m.iExact+m.childRowText).indexOf(c.filter.parseFilter(q,m.iFilter,p,m.parsed[p])),w=!u.filter_startsWith&&0<=m.exact||u.filter_startsWith&&0===m.exact)),v=w?v:!1);f.eq(h).toggle(v).toggleClass(u.filter_filteredRow,!v); s.length&&s.toggleClass(u.filter_filteredRow,!v)}}q.filteredRows+=f.not("."+u.filter_filteredRow).length;q.totalRows+=f.length;c.processTbody(d,n,!1)}q.lastCombinedFilter=b;q.lastSearch=a;q.$table.data("lastSearch",a);u.filter_saveFilters&&c.storage&&c.storage(d,"tablesorter-filters",a);q.debug&&c.benchmark("Completed filter widget search",A);u.filter_initialized&&q.$table.trigger("filterEnd",q);setTimeout(function(){q.$table.trigger("applyWidgets")},0)}},getOptionSource:function(d,a,b){var e,f=d.config, h=[],g=!1,n=f.widgetOptions.filter_selectSource,l=f.$table.data("lastSearch")||[],r=k.isFunction(n)?!0:c.getColumnData(d,n,a);b&&""!==l[a]&&(b=!1);if(!0===r)g=n(d,a,b);else{if(r instanceof k||"string"===k.type(r)&&0<=r.indexOf(""))return r;k.isArray(r)?g=r:"object"===k.type(n)&&r&&(g=r(d,a,b))}!1===g&&(g=c.filter.getOptions(d,a,b));g=k.grep(g,function(a,b){return k.inArray(a,g)===b});f.$headers.filter('[data-column="'+a+'"]:last').hasClass("filter-select-nosort")||(k.each(g,function(b,c){h.push({t:c, p:f.parsers&&f.parsers[a].format(c,d,[],a)})}),e=f.textSorter||"",h.sort(function(b,f){var g=b.p.toString(),h=f.p.toString();return k.isFunction(e)?e(g,h,!0,a,d):"object"===typeof e&&e.hasOwnProperty(a)?e[a](g,h,!0,a,d):c.sortNatural?c.sortNatural(g,h):!0}),g=[],k.each(h,function(a,b){g.push(b.t)}));return g},getOptions:function(c,a,b){var e,f,h,g,n=c.config,l=n.widgetOptions,r=n.$table.children("tbody"),p=[];for(e=0;e",r=g.$table.find("thead").find("select."+c.css.filter+'[data-column="'+a+'"]').val();if("undefined"===typeof b||""===b)b=c.filter.getOptionSource(d,a,f);if(k.isArray(b)){for(d=0;d'+h+"":"";b=[]}g=(g.$filters?g.$filters:g.$table.children("thead")).find("."+c.css.filter);n.filter_$externalFilters&&(g=g&&g.length?g.add(n.filter_$externalFilters):n.filter_$externalFilters);a=g.filter('select[data-column="'+a+'"]');a.length&&(a[e?"html":"append"](l),k.isArray(b)||a.append(b).val(r),a.val(r))}},buildDefault:function(d,a){var b,e,f,h=d.config,g=h.widgetOptions,k=h.columns;for(b=0;bc.top&&dMath.abs(r.parent().width()-r.width()),w=function(a){if(0!==p&&s){var b=a.pageX-p,c=s.width();s.width(c+b);s.width()!==c&&x&&t.width(t.width()-b);p=a.pageX}},v=function(){c.storage&& s&&t&&(l={},l[s.index()]=s.width(),l[t.index()]=t.width(),s.width(l[s.index()]),t.width(l[t.index()]),!1!==b.resizable&&c.storage(d,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));p=0;s=t=null;k(window).trigger("resize")};if(l=c.storage&&!1!==b.resizable?c.storage(d,"tablesorter-resizable"):{})for(g in l)!isNaN(g)&&g');b.resizable_addLastColumn||(h=h.slice(0,-1));f=f?f.add(h):h});f.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10; a.find("."+c.css.wrapper).append('
')}).find("."+c.css.resizer).bind("mousedown",function(b){s=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+s.attr("data-column")+'"]');1'), a.cssIcon&&m.find("."+e.css.icon).removeClass(c.icons+" "+h).addClass(p.icons),d.hasClass("hasFilters")&&d.children("thead").children("."+e.css.filterRow).removeClass(c.filterRow).addClass(p.filterRow),a.appliedTheme=a.theme);for(d=0;d=]/g,query:"(q|query)"},types:{regex:function(c,a){if(e.filter.regex.regex.test(a.iFilter)){var b,d=e.filter.regex.regex.exec(a.iFilter);try{b=(new RegExp(d[1],d[2])).test(a.iExact)}catch(f){b=!1}return b}return null},operators:function(c,a){if(/^[<>]=?/.test(a.iFilter)){var b,d;b=c.table;var f=a.index,h=a.parsed[f],g=e.formatFloat(a.iFilter.replace(e.filter.regex.operators,""),b),m= c.parsers[f],n=g;if(h||"numeric"===m.type)d=e.filter.parseFilter(c,k.trim(""+a.iFilter.replace(e.filter.regex.operators,"")),f,h,!0),g="number"!==typeof d||""===d||isNaN(d)?g:d;b=!h&&"numeric"!==m.type||isNaN(g)||"undefined"===typeof a.cache?isNaN(a.iExact)?e.formatFloat(a.iExact.replace(e.filter.regex.nondigit,""),b):e.formatFloat(a.iExact,b):a.cache;/>/.test(a.iFilter)&&(d=/>=/.test(a.iFilter)?b>=g:b>g);/n&&(d=k,k=n,n=d);return b>=k&&b<=n||""===k||""===n}return null},wild:function(c,a){if(/[\?\*\|]/.test(a.iFilter)||e.filter.regex.orReplace.test(a.filter)){var b=a.index,d=a.parsed[b],d=e.filter.parseFilter(c,a.iFilter.replace(e.filter.regex.orReplace,"|"),b,d);!c.$headers.filter('[data-column="'+b+'"]:last').hasClass("filter-match")&&/\|/.test(d)&&("|"===d[d.length-1]&&(d+="*"),d=a.anyMatch&&k.isArray(a.rowArray)?"("+d+")":"^("+d+")$");return(new RegExp(d.replace(/\?/g,"\\S{1}").replace(/\*/g, "\\S*"))).test(a.iExact)}return null},fuzzy:function(c,a){if(/^~/.test(a.iFilter)){var b,d=0,f=a.iExact.length,h=e.filter.parseFilter(c,a.iFilter.slice(1),a.index,a.parsed[a.index]);for(b=0;b'+(g.data("placeholder")||g.attr("data-placeholder")||b.filter_placeholder.select||"")+"":"",h=p=f,0<=f.indexOf(b.filter_selectSourceSeparator)&&(p=f.split(b.filter_selectSourceSeparator),h=p[1],p=p[0]),d+="");a.$table.find("thead").find("select."+ e.css.filter+'[data-column="'+m+'"]').append(d)}e.filter.buildDefault(c,!0);e.filter.bindSearch(c,a.$table.find("."+e.css.filter),!0);b.filter_external&&e.filter.bindSearch(c,b.filter_external);b.filter_hideFilters&&e.filter.hideFilters(c,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(b,d){g=d?a.$table.find("."+e.css.header).filter("[data-column]").filter(function(){return""!==d[k(this).data("column")]}):"";e.isProcessing(c,"filterStart"=== b.type,d?g:"")});a.filteredRows=a.totalRows;a.$table.bind("tablesorter-initialized pagerInitialized",function(){var b=this.config.widgetOptions;n=e.filter.setDefaults(c,a,b)||[];n.length&&(a.delayInit&&""===n.join("")||e.setFilters(c,n,!0));a.$table.trigger("filterFomatterUpdate");setTimeout(function(){b.filter_initialized||e.filter.filterInitComplete(a)},100)});a.pager&&a.pager.initialized&&!b.filter_initialized&&(a.$table.trigger("filterFomatterUpdate"),setTimeout(function(){e.filter.filterInitComplete(a)}, 100))},formatterUpdated:function(c,a){var b=c.closest("table")[0].config.widgetOptions;b.filter_initialized||(b.filter_formatterInit[a]=1)},filterInitComplete:function(c){var a=c.widgetOptions,b=0,d=function(){a.filter_initializing=!1;e.filter.findRows(c.table,c.$table.data("lastSearch"),null);a.filter_initialized=!0;c.$table.trigger("filterInit",c)};k.each(a.filter_formatterInit,function(a,c){1===c&&b++});clearTimeout(a.filter_initTimer);a.filter_initialized||b!==a.filter_formatterCount?a.filter_initialized|| (a.filter_initTimer=setTimeout(function(){d()},500)):d()},setDefaults:function(c,a,b){var d,f=e.getFilters(c)||[];b.filter_saveFilters&&e.storage&&(d=e.storage(c,"tablesorter-filters")||[],(c=k.isArray(d))&&""===d.join("")||!c||(f=d));if(""===f.join(""))for(c=0;c';for(f=0;f"):g+("");a.$filters=k(g+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(f=0;f").appendTo(a.$filters.eq(f)):((g=e.getColumnData(c,b.filter_formatter,f))?(b.filter_formatterCount++,(g=g(a.$filters.eq(f),f))&&0===g.length&&(g=a.$filters.eq(f).children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==a.$filters[f])&&a.$filters.eq(f).append(g)):g=k('').appendTo(a.$filters.eq(f)), g&&g.attr("placeholder",h.data("placeholder")||h.attr("data-placeholder")||b.filter_placeholder.search||"")),g&&(h=(k.isArray(b.filter_cssFilter)?"undefined"!==typeof b.filter_cssFilter[f]?b.filter_cssFilter[f]||"":"":b.filter_cssFilter)||"",g.addClass(e.css.filter+" "+h).attr("data-column",f),d&&(g.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(c,a,b){c=k(c)[0];a=k(a);if(a.length){var d=c.config,f=d.widgetOptions,h=f.filter_$externalFilters;!0!==b&&(f.filter_$anyMatch= a.filter(f.filter_anyColumnSelector+","+f.filter_multipleColumnSelector),f.filter_$externalFilters=h&&h.length?f.filter_$externalFilters.add(a):a,e.setFilters(c,d.$table.data("lastSearch")||[],!1===b));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keypress","keyup","search","change",""].join(d.namespace+"filter ")).bind("keyup"+d.namespace+"filter",function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if(!1===f.filter_liveSearch||""!== this.value&&("number"===typeof f.filter_liveSearch&&this.value.lengtha.which||37<=a.which&&40>=a.which)))return;e.filter.searching(c,!0,!0)}).bind(["search","change","keypress",""].join(d.namespace+"filter "),function(a){var b=k(this).data("column");if(13===a.which||"search"===a.type||"change"===a.type&&this.value!==d.lastSearch[b])a.preventDefault(),k(this).attr("data-lastSearchTime",(new Date).getTime()),e.filter.searching(c,!1,!0)})}},searching:function(c, a,b){var d=c.config.widgetOptions;clearTimeout(d.searchTimer);"undefined"===typeof a||!0===a?d.searchTimer=setTimeout(function(){e.filter.checkFilters(c,a,b)},d.filter_liveSearch?d.filter_searchDelay:10):e.filter.checkFilters(c,a,b)},checkFilters:function(c,a,b){var d=c.config,f=d.widgetOptions,h=k.isArray(a),g=h?a:e.getFilters(c,!0),m=(g||[]).join("");if(k.isEmptyObject(d.cache))d.delayInit&&d.pager&&d.pager.initialized&&d.$table.trigger("updateCache",[function(){e.filter.checkFilters(c,!1,b)}]); else if(h&&(e.setFilters(c,g,!1,!0!==b),f.filter_initialized||(d.lastCombinedFilter="")),f.filter_hideFilters&&d.$table.find("."+e.css.filterRow).trigger(""===m?"mouseleave":"mouseenter"),d.lastCombinedFilter!==m||!1===a)if(!1===a&&(d.lastCombinedFilter=null,d.lastSearch=[]),f.filter_initialized&&d.$table.trigger("filterStart",[g]),d.showProcessing)setTimeout(function(){e.filter.findRows(c,g,m);return!1},30);else return e.filter.findRows(c,g,m),!1},hideFilters:function(c,a){var b,d,f;k(c).find("."+ e.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(c){b=k(this);clearTimeout(f);f=setTimeout(function(){/enter|over/.test(c.type)?b.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==b[0]&&""===a.lastCombinedFilter&&b.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(b){d=k(this).closest("tr");clearTimeout(f);f=setTimeout(function(){if(""===e.getFilters(a.$table).join(""))d["focus"===b.type?"removeClass":"addClass"]("hideme")},200)})}, defaultFilter:function(c,a){if(""===c)return c;var b=e.filter.regex.iQuery,d=a.match(e.filter.regex.igQuery).length,f=1h&&1f&&(d=e,e=f,f=d);for(f>=c.columns&&(f=c.columns-1);e<=f;e++)h.push(e);g=g.replace(b,"")}));f&&/,/.test(g)&&(b=g.split(/\s*,\s*/),k.each(b,function(a,b){""!==b&&(d=parseInt(b,10),d=?\s*-\d)/.test(y)||/(<=?\s*\d)/.test(y))&&!(""!==y&&q.$filters&&q.$filters.eq(n).find("select").length&&!q.$headers.filter('[data-column="'+n+'"]:last').hasClass("filter-match"));y=f.not("."+u.filter_filteredRow).length;A&&0===y&&(A=!1);q.debug&&e.log("Searching through "+(A&&yk.inArray(a,I)&&(s=b(q,l),null!==s))return B=s,!1});if(null!==B)x=B;else if(u.filter_startsWith)for(x=!1,r=q.columns;!x&&0k.inArray(a,F)&&(s=b(q,l),null!==s))return B=s,!1}),null!==B?t=B:(l.exact=(l.iExact+l.childRowText).indexOf(e.filter.parseFilter(q,l.iFilter,r,l.parsed[r])),t=!u.filter_startsWith&&0<=l.exact||u.filter_startsWith&&0===l.exact)),x=t?x:!1);f.eq(h).toggle(x).toggleClass(u.filter_filteredRow, !x);v.length&&v.toggleClass(u.filter_filteredRow,!x)}}q.filteredRows+=f.not("."+u.filter_filteredRow).length;q.totalRows+=f.length;e.processTbody(c,m,!1)}q.lastCombinedFilter=b;q.lastSearch=a;q.$table.data("lastSearch",a);u.filter_saveFilters&&e.storage&&e.storage(c,"tablesorter-filters",a);q.debug&&e.benchmark("Completed filter widget search",z);u.filter_initialized&&q.$table.trigger("filterEnd",q);setTimeout(function(){q.$table.trigger("applyWidgets")},0)}},getOptionSource:function(c,a,b){var d, f=c.config,h=[],g=!1,m=f.widgetOptions.filter_selectSource,n=f.$table.data("lastSearch")||[],p=k.isFunction(m)?!0:e.getColumnData(c,m,a);b&&""!==n[a]&&(b=!1);if(!0===p)g=m(c,a,b);else{if(p instanceof k||"string"===k.type(p)&&0<=p.indexOf(""))return p;k.isArray(p)?g=p:"object"===k.type(m)&&p&&(g=p(c,a,b))}!1===g&&(g=e.filter.getOptions(c,a,b));g=k.grep(g,function(a,b){return k.inArray(a,g)===b});f.$headers.filter('[data-column="'+a+'"]:last').hasClass("filter-select-nosort")||(k.each(g,function(b, d){h.push({t:d,p:f.parsers&&f.parsers[a].format(d,c,[],a)})}),d=f.textSorter||"",h.sort(function(b,f){var g=b.p.toString(),h=f.p.toString();return k.isFunction(d)?d(g,h,!0,a,c):"object"===typeof d&&d.hasOwnProperty(a)?d[a](g,h,!0,a,c):e.sortNatural?e.sortNatural(g,h):!0}),g=[],k.each(h,function(a,b){g.push(b.t)}));return g},getOptions:function(c,a,b){var d,e,h,g,m=c.config,n=m.widgetOptions,p=m.$table.children("tbody"),r=[];for(d=0;d'+(n.data("placeholder")||n.attr("data-placeholder")||m.filter_placeholder.select||"")+"",p=g.$table.find("thead").find("select."+e.css.filter+'[data-column="'+a+'"]').val();if("undefined"===typeof b||""===b)b=e.filter.getOptionSource(c,a,f);if(k.isArray(b)){for(c=0;c'+h+"":"";b=[]}g=(g.$filters?g.$filters:g.$table.children("thead")).find("."+e.css.filter);m.filter_$externalFilters&&(g=g&&g.length?g.add(m.filter_$externalFilters):m.filter_$externalFilters);a=g.filter('select[data-column="'+a+'"]');a.length&&(a[d?"html":"append"](n),k.isArray(b)||a.append(b).val(p),a.val(p))}},buildDefault:function(c,a){var b,d,f,h=c.config,g=h.widgetOptions,k=h.columns;for(b= 0;b'),x=t.parent().css({position:f.length? "absolute":"fixed",margin:0,top:v+s,left:0,visibility:"hidden",zIndex:b.stickyHeaders_zIndex||2}),D=t.children("thead:first"),y,A="",B=0,F=function(a,b){a.filter(":visible").each(function(a){var d;a=b.filter(":visible").eq(a);var c=k(this);"border-box"===c.css("box-sizing")?d=c.outerWidth():"collapse"===a.css("border-collapse")?z.getComputedStyle?d=parseFloat(z.getComputedStyle(this,null).width):(d=parseFloat(c.css("border-width")),d=c.outerWidth()-parseFloat(c.css("padding-left"))-parseFloat(c.css("padding-right"))- d):d=c.width();a.css({"min-width":d,"max-width":d})})},C=function(){v=r.length?r.height()||0:parseInt(b.stickyHeaders_offset,10)||0;B=0;x.css({left:f.length?parseInt(f.css("padding-left"),10)||0:d.offset().left-parseInt(d.css("margin-left"),10)-m.scrollLeft()-B,width:d.outerWidth()});F(d,t);F(n,y)};t.attr("id")&&(t[0].id+=b.stickyHeaders_cloneId);t.find("thead:gt(0), tr.sticky-false").hide();t.find("tbody, tfoot").remove();b.stickyHeaders_includeCaption||t.find("caption").remove();y=D.children().children(); t.css({height:0,width:0,margin:0});y.find("."+e.css.resizer).remove();d.addClass("hasStickyHeaders").bind("pagerComplete"+h,function(){C()});e.bindEvents(c,D.children().children(".tablesorter-header"));d.after(x);a.onRenderHeader&&D.children("tr").children().each(function(b){a.onRenderHeader.apply(k(this),[b,a,t])});m.add(g).unbind(["scroll","resize",""].join(h)).bind(["scroll","resize",""].join(h),function(a){if(d.is(":visible")){s=w.length?w.offset().top-g.scrollTop()+w.height():0;var b=d.offset(), c=k.isWindow(g[0]),e=k.isWindow(m[0]),h=(f.length?c?g.scrollTop():g.offset().top:g.scrollTop())+v+s,l=d.height()-(x.height()+(p.height()||0)),b=h>b.top&&hMath.abs(p.parent().width()-p.width()),D=function(a){if(0!==w&&s){var b=a.pageX-w,c=s.width();s.width(c+b);s.width()!==c&&x?t.width(t.width()-b):v&&(p.width(function(a,c){return c+b}),t.length||(r[0].scrollLeft=p.width()));w=a.pageX}},y=function(){e.storage&& s&&t&&(n={},n[s.index()]=s.width(),n[t.index()]=t.width(),s.width(n[s.index()]),t.width(n[t.index()]),!1!==b.resizable&&e.storage(c,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));w=0;s=t=null;k(z).trigger("resize")};if(n=e.storage&&!1!==b.resizable?e.storage(c,"tablesorter-resizable"):{})for(g in n)!isNaN(g)&&g');b.resizable_addLastColumn||(h=h.slice(0,-1));f=f?f.add(h):h});f.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10; a.find("."+e.css.wrapper).append('
')}).find("."+e.css.resizer).bind("mousedown",function(b){s=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+s.attr("data-column")+'"]');1