From 08bf513acda19f381716b208d5dc1d2974abd58a Mon Sep 17 00:00:00 2001 From: Mottie Date: Mon, 15 Sep 2014 19:44:03 -0500 Subject: [PATCH] version bump --- README.md | 109 ++++++++----------- addons/pager/jquery.tablesorter.pager.js | 2 +- addons/pager/jquery.tablesorter.pager.min.js | 4 +- beta-testing/pager-custom-controls.js | 2 +- bower.json | 2 +- js/jquery.tablesorter.js | 6 +- js/jquery.tablesorter.min.js | 4 +- js/jquery.tablesorter.widgets.js | 2 +- js/jquery.tablesorter.widgets.min.js | 26 ++--- js/parsers/parser-ignore-articles.js | 4 +- js/parsers/parser-input-select.js | 2 +- js/widgets/widget-editable.js | 2 +- js/widgets/widget-pager.js | 2 +- package.json | 2 +- tablesorter.jquery.json | 2 +- 15 files changed, 76 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index b5984de2..9a2b652a 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,51 @@ 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.17.8 (9/15/2014) + +* Core + * Fix `widthFixed` option to ignore info block tbodies. + * Make `emptyTo` & `stringTo` settings case insensitive. + * An empty string `headerTemplate` option will now prevent adding an inner div to the header. +* Docs + * Fix setting active accordion from hash script. + * Add `emptyTo` clarification. + * Main readme: Add related projects section. +* Editable + * Autoresort true no longer breaks the table. + * Update demo to use row id instead of index. + * Update validate function to allow setting it per column. + * Add `editable_focus`, `editable_blur` and `editable_selectAll` options. See [issue #708](//github.com/Mottie/tablesorter/issues/708). + * Add `editable_wrapContent` option. + * Add `editable_trimContent` option. + * Validate function now includes a contenteditable element parameter. + * All text callback parameters are now trimmed. + * Trim everything & revert widget changes. + * Refocus edited element after resort only. + * Switch form focus to focusout. +* Filter + * Add `filter_defaultFilter` option. + * fix issue with using class selectors. + * Make happy with spaces within the query. + * Will override exact/partial select filters. Fixes [issue #721](//github.com/Mottie/tablesorter/issues/721). + * Fixes [issue #704](//github.com/Mottie/tablesorter/issues/704). + * Add `filter_excludeFilter` option; add multiple exclusions separated by spaces, not commas. + * Prevent multiple searches during initialization. + * Ensure initial filter settings get applied. + * Selects will exactly match the selected option unless "filter-match" class is set. Fixes [issue #721](//github.com/Mottie/tablesorter/issues/721). +* Pager + * Update cache & rows copy. Fixes [issue #703](//github.com/Mottie/tablesorter/issues/703). + * Use native javascript to populate & set the goto select. Fixes [issue #711](//github.com/Mottie/tablesorter/issues/711). + * Custom pager controls. Fix control updates for multiple tables. + * Fix pager widget to be properly applied after a page move. +* StickyHeaders: Fix issue so it works with jQuery v1.2.6 again. +* Zebra: Apply style to one row. Fixes [issue #715](//github.com/Mottie/tablesorter/issues/715). +* Parser + * Duration parser - added with [demo](//mottie.github.io/tablesorter/docs/example-parsers-duration.html). + * Select parser - Fix for IE10+ not allowing select options to be clicked. + * IgnoreArticles parser - Added `ignoreArticlesExcept` option. + * url parser - ensure it is used by the filter widget. + #### Version 2.17.7 (8/9/2014) * Core: Do not detach rows before appending to prevent ajax rows from disappearing. Fixes [issue #701](//github.com/Mottie/tablesorter/issues/701). @@ -111,67 +156,3 @@ View the [complete listing here](//github.com/Mottie/tablesorter/wiki/Changes). * 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). - -#### Version 2.17.5 (7/17/2014) - -* Core - * Update `config.totalRows` variable before initialization. Fixes [issue #670](//github.com/Mottie/tablesorter/issues/670). - * Add `config.table` variable; useful for functions that only pass the `config`. - * Ensure widget init functions are only called once; and set indicator for all widgets, not just ones with options (for `hasWidget`). - -* Docs - * Add [custom filter widget search types demo](//mottie.github.io/tablesorter/docs/example-filter-custom-search.html). - * Add `imgAttr` parser "utility option" instructions. - -* Filter - * Force cache build on initial search when `delayInit` is `true`. Fixes [issue #678](//github.com/Mottie/tablesorter/issues/678). - * Make `config.filteredRows` count available within `filterInit` event. Fixes [issue #670](//github.com/Mottie/tablesorter/issues/670). - * Selects now obtain parsed data when it is set for a particular column. Fixes [issue #684](//github.com/Mottie/tablesorter/issues/684). - * Ignore change event if input value hasn't changed, otherwise it interferes with other events within the table. Fixes [issue #685](//github.com/Mottie/tablesorter/issues/685). - * Ensure search query is parsed for both specific filter types and non-filter type searches, if the column is set to use parsed data. - * Filter initialization ("filterInit") event is now delayed to prevent filterStart & filterEnd event spamming. Fixes [issue #668](//github.com/Mottie/tablesorter/issues/668). - * Filter formatter functions are now required to call a function after initialization to delay "filterInit" event. Fixes [issue #668](//github.com/Mottie/tablesorter/issues/668). - -* Output - * Update download method which allows downloading files without modifying the server htaccess. Fixes [issue #681](//github.com/Mottie/tablesorter/issues/681). - -* Pager - * Initialize without building cache when `delayInit` is `true`. Fixes [issue #678](//github.com/Mottie/tablesorter/issues/678). - -* Parsers - * Update input/select element binding - * Add image alt parser; set `config.imgAttr` with attribute to target (default is `"alt"`). - * Add `select-text` parser which grabs the currently selected option text instead of the select value. - -* Resizable - * Remove unused grip code - -#### Version 2.17.4 (7/4/2014) - -* Docs - * Copied the tablesorter `initialized` option from the event section into the configuration; renamed the event appropriately (`tablesorter-initialized` event) - * Added notes about how to bind to "init" events; they should be bound before initializing tablesorter because in most cases, the events fire before the binding occurs. - -* Core - * Add `$.tablesorter.hasWidget(table, 'widgetId')` function. It returns a boolean value of `true` when the named widget is actively applied to the table. - -* Filter - * Add `filter_searchFiltered` option to allow disabling the search of already filtered rows. - * The `filter_initialized` flag now gets set appropriately. Fixes [issue #668](//github.com/Mottie/tablesorter/issues/668). - * Include any column filter in determination of searching already filtered rows. Fixes [issue #669](//github.com/Mottie/tablesorter/issues/669). - * Add internal `config.filteredRows` variable. Provides a value of the number of currently filtered (visible) rows. Fixes [issue #670](//github.com/Mottie/tablesorter/issues/670). - * Add internal `config.totalRows` variable. Provides a value of the total number of rows in the current table, not including info-tbody rows. - * Fix change/search event being ignored for selects & filterFormatter extensions. - * `filterInit` and `filterEnd` events now pass `config` as a parameter. - -* Pager - * Removed from beta status - * Filtered rows now equals the total rows when `ajaxProcessing` returns an array. Fixes [issue #667](//github.com/Mottie/tablesorter/issues/667). - * Update the `config.filteredRows` when using ajax to match the internal `config.pager.filteredRows`. See [issue #670](//github.com/Mottie/tablesorter/issues/670). - * Widget only: ensure `pagerComplete` event fires on initialization. - -* Resizable - * Bind mousemove to document instead of table header. Makes resizable handle use consistent with other resizing libraries, as the user would expect. Fixes [issue #665](//github.com/Mottie/tablesorter/issues/665). - * Add `resizable_throttle` option to allow throttling of the mousemove/resize event. Set this option to `true` or a number between 1 and 10 to add a throttling delay. Fixes [issue #662](//github.com/Mottie/tablesorter/issues/662). - -* UITheme: non-existent columns no longer cause a js error. Fixes [issue #672](//github.com/Mottie/tablesorter/issues/672). diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 1020c898..a3c54cc1 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -1,6 +1,6 @@ /*! * tablesorter pager plugin - * updated 8/1/2014 (v2.17.6) + * updated 9/15/2014 (v2.17.8) */ /*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 7e32c30e..ef9a49b9 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 8/1/2014 (v2.17.6) */ -;(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,e=!!a,g=e||0===b.page,f=Math.min(b.totalPages,b.filteredPages),e=e||b.page===f-1||0===f;b.updateArrows&&(b.$container.find(b.cssFirst+","+b.cssPrev)[g?"addClass":"removeClass"](d).attr("aria-disabled", g),b.$container.find(b.cssNext+","+b.cssLast)[e?"addClass":"removeClass"](d).attr("aria-disabled",e))},t=function(b,a,d){var e,g,f,l,c=b.config;l=c.$table.hasClass("hasFilters");f=[];e=a.size||10;f=[c.widgetOptions&&c.widgetOptions.filter_filteredRow||"filtered",c.selectorRemove.replace(/^(\w+\.)/g,"")];a.countChildRows&&f.push(c.cssChildRow);f.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(d,b){a.filteredRows+=a.regexRows.test(b[c.columns].$row[0].className)?0:1})):l||(a.filteredRows=a.totalRows);a.totalPages=Math.ceil(a.totalRows/e);c.totalRows=a.totalRows;c.filteredRows=a.filteredRows;a.filteredPages=Math.ceil(a.filteredRows/e)||0;if(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)),l=a.$container.find(a.cssPageDisplay),f=(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"+e+"";a.$goto.html(f).val(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,e=b.config,g=e.$tbodies.eq(0);a.fixedHeight&&(g.find("tr.pagerSavedHeightSpacer").remove(),d=h.data(b,"pagerSavedHeight"))&&(d-=g.height(),5'))}, z=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,e=0,g=b.config,f=g.$tbodies.eq(0).children("tr"),h=f.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"+e[f][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),e=h(document),g,f=b.config;""!==d&&(f.showProcessing&&k.isProcessing(b,!0),e.bind("ajaxError.pager",function(d,c,f,g){B(null,b,a,c,g);e.unbind("ajaxError.pager")}),g=++a.ajaxCounter,a.ajaxObject.url=d,a.ajaxObject.success= function(d,c,f){g(a&&a.length||0))e.debug&&k.log("Pager: no rows for pager to render");else{d.page>=d.totalPages&&C(b,d);d.isDisabled=!1;d.initialized&&c.trigger("pagerChange",d);if(d.removeRows){k.clearTableBody(b);e=k.processTbody(b,e.$tbodies.eq(0),!0);g=m?0:n;f=m?0:n;for(l=0;ln&&l<=s&&(l++,e.append(a[g]))),g++;k.processTbody(b,e,!1)}else v(b,d);t(b,d);d.isDisabled||u(b,d);c.trigger("applyWidgets");b.isUpdating&&c.trigger("updateComplete", b)}},D=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),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})},E=function(b){var a= b.config,d=a.pager;a.$table.trigger("updateCache",[function(){var e,g=[],f=b.config.cache[0].normalized;d.totalRows=f.length;for(e=0;ea.page&&(a.page=0);a.page>l-1&&0!==l&&(a.page=l-1);f.currentFilters=""===(f.currentFilters||[]).join("")?[]:f.currentFilters; a.currentFilters=""===(a.currentFilters||[]).join("")?[]:a.currentFilters;if(f.page!==a.page||f.size!==a.size||f.totalRows!==a.totalRows||(f.currentFilters||[]).join(",")!==(a.currentFilters||[]).join(",")||f.sortList!==(e.sortList||[]).join(","))e.debug&&k.log("Pager changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(e.sortList||[]).join(","),totalRows:a.totalRows,currentFilters:a.currentFilters||[]},a.ajax?H(b,a):a.ajax||x(b,e.rowsCopy,a),h.data(b,"pagerLastPage",a.page),a.initialized&& !1!==d&&(g.trigger("pageMoved",a).trigger("applyWidgets"),b.isUpdating&&g.trigger("updateComplete"))}},y=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)},C=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 e,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&&(e=b.id+"_pager_info",a.$container.find(a.cssPageDisplay).attr("id",e),g.$table.attr("aria-describedby",e));d&&(g.$table.trigger("updateRows"),y(b,a.size,a),A(b,a),u(b,a),g.debug&&k.log("pager enabled"))};w.appender=function(b,a){var d=b.config,e=d.pager;e.ajax||(d.rowsCopy=a,e.totalRows=e.countChildRows?d.$tbodies.eq(0).children("tr").length:a.length,e.size=h.data(b,"pagerLastSize")||e.size||10,e.totalPages=Math.ceil(e.totalRows/e.size),x(b,a,e),t(b,e,!1))};w.construct= function(b){return this.each(function(){if(this.config&&this.hasInitialized){var a,d,e,g=this,f=g.config,l=f.widgetOptions,c=f.pager=h.extend(!0,{},h.tablesorterPager.defaults,b),m=f.$table,n=c.$container=h(c.container).addClass("tablesorter-pager").show();f.debug&&k.log("Pager initializing");c.oldAjaxSuccess=c.oldAjaxSuccess||c.ajaxObject.success;f.appender=w.appender;k.filter&&0<=h.inArray("filter",f.widgets)&&(c.currentFilters=f.$table.data("lastSearch")||k.filter.setDefaults(g,f,f.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")+"|"+f.selectorRemove.replace(/^(\w+\.)/g,"")+"|"+f.cssChildRow+")");m.unbind("filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize ".split(" ").join(".pager ")).bind("filterStart.pager",function(a, b){c.currentFilters=b;!1!==c.pageReset&&(f.lastCombinedFilter||"")!==(b||[]).join("")&&(c.page=c.pageReset)}).bind("filterEnd.pager sortEnd.pager",function(){c.initialized&&(f.delayInit&&f.rowsCopy&&0===f.rowsCopy.length&&E(g),t(g,c,!1),q(g,c,!1),u(g,c))}).bind("disable.pager",function(a){a.stopPropagation();D(g,c)}).bind("enable.pager",function(a){a.stopPropagation();F(g,c,!0)}).bind("destroy.pager",function(a){a.stopPropagation();D(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("update.pager updateRows.pager updateAll.pager addRows.pager ",function(a){a.stopPropagation();u(g,c);a=f.$tbodies.eq(0).children("tr");c.totalRows=a.length-(c.countChildRows?0:a.filter("."+f.cssChildRow).length);c.totalPages=Math.ceil(c.totalRows/c.size);t(g,c);v(g,c)}).bind("pageSize.pager",function(a,b){a.stopPropagation();y(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];e=[I,K,J,C];n.find(d.join(",")).attr("tabindex",0).unbind("click.pager").bind("click.pager",function(a){a.stopPropagation();var b=h(this),f=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 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); diff --git a/beta-testing/pager-custom-controls.js b/beta-testing/pager-custom-controls.js index 694c9efc..1b984e8f 100644 --- a/beta-testing/pager-custom-controls.js +++ b/beta-testing/pager-custom-controls.js @@ -1,5 +1,5 @@ /*! - * custom pager controls (beta) for TableSorter 9/12/2014 (v2.17.8) + * custom pager controls (beta) for TableSorter 9/15/2014 (v2.17.8) initialize custom pager script BEFORE initializing tablesorter/tablesorter pager custom pager looks like this: 1 | 2 … 5 | 6 | 7 … 99 | 100 diff --git a/bower.json b/bower.json index c3fe302f..f020ca0e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tablesorter", - "version": "2.17.7", + "version": "2.17.8", "dependencies": { "jquery": ">=1.2.6" }, diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index f7861c08..896315be 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,5 +1,5 @@ /**! -* TableSorter 2.17.7 - Client-side table sorting with ease! +* TableSorter 2.17.8 - 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.7"; + ts.version = "2.17.8"; ts.parsers = []; ts.widgets = []; @@ -1861,7 +1861,7 @@ id: "zebra", priority: 90, format: function(table, c, wo) { - var $tb, $tv, $tr, row, even, time, k, l, + var $tb, $tv, $tr, row, even, time, k, child = new RegExp(c.cssChildRow, 'i'), b = c.$tbodies; if (c.debug) { diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index a55fb2fb..e20f0114 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.17.7 min - Client-side table sorting with ease! +* TableSorter 2.17.8 min - Client-side table sorting with ease! * Copyright (c) 2007 Christian Bach */ -!function(h){h.extend({tablesorter:new function(){function d(){var a=arguments[0],b=1':"";p.$headers=h(a).find(p.selectorHeaders).each(function(k){c=h(this);b=f.getColumnData(a,p.headers,k,!0);p.headerContent[k]=h(this).html();l=p.headerTemplate.replace(/\{content\}/g,h(this).html()).replace(/\{icon\}/g,e);p.onRenderTemplate&&(g=p.onRenderTemplate.apply(c, [k,l]))&&"string"===typeof g&&(l=g);h(this).html('
'+l+"
");p.onRenderHeader&&p.onRenderHeader.apply(c,[k]);this.column=parseInt(h(this).attr("data-column"),10);this.order=D(f.getData(c,b,"sortInitialOrder")||p.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;x=f.getData(c,b,"lockedOrder")||!1;"undefined"!==typeof x&&!1!==x&&(this.order=this.lockedOrder=D(x)?[1,1,1]:[0,0,0]);c.addClass(f.css.header+" "+p.cssHeader);p.headerList[k]=this;c.parent().addClass(f.css.headerRow+ " "+p.cssHeaderRow).attr("role","row");p.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});C(a);p.debug&&(q("Built headers:",k),d(p.$headers))}function F(a,b,c){var g=a.config;g.$table.find(g.selectorRemove).remove();v(a);w(a);I(g.$table,b,c)}function C(a){var b,c,g,e=a.config;e.$headers.each(function(l,d){c=h(d);g=f.getColumnData(a,e.headers,l,!0);b="false"===f.getData(d,g,"sorter")||"false"===f.getData(d,g,"parser");d.sortDisabled=b;c[b?"addClass":"removeClass"]("sorter-false").attr("aria-disabled", ""+b);a.id&&(b?c.removeAttr("aria-controls"):c.attr("aria-controls",a.id))})}function G(a){var b,c,g=a.config,e=g.sortList,l=e.length,d=f.css.sortNone+" "+g.cssNone,k=[f.css.sortAsc+" "+g.cssAsc,f.css.sortDesc+" "+g.cssDesc],p=["ascending","descending"],m=h(a).find("tfoot tr").children().add(g.$extraHeaders).removeClass(k.join(" "));g.$headers.removeClass(k.join(" ")).addClass(d).attr("aria-sort","none");for(b=0;b"),c=h(a).width();h(a.tBodies[0]).find("tr:first").children(":visible").each(function(){b.append(h("").css("width",parseInt(h(this).width()/c*1E3,10)/10+"%"))});h(a).prepend(b)}}function P(a,b){var c,g,e,l,f,k=a.config,d=b||k.sortList;k.sortList=[];h.each(d,function(a,b){l=parseInt(b[0],10);if(e=k.$headers.filter('[data-column="'+l+'"]:last')[0]){g=(g=(""+b[1]).match(/^(1|d|s|o|n)/))? g[0]:"";switch(g){case "1":case "d":g=1;break;case "s":g=f||0;break;case "o":c=e.order[(f||0)%(k.sortReset?3:2)];g=0===c?1:1===c?0:2;break;case "n":e.count+=1;g=e.order[e.count%(k.sortReset?3:2)];break;default:g=0}f=0===a?g:f;c=[l,parseInt(g,10)||0];k.sortList.push(c);g=h.inArray(c[1],e.order);e.count=0<=g?g:c[1]%(k.sortReset?3:2)}})}function Q(a,b){return a&&a[b]?a[b].type||"":""}function L(a,b,c){if(a.isUpdating)return setTimeout(function(){L(a,b,c)},50);var g,e,l,d,k=a.config,p=!c[k.sortMultiSortKey], m=k.$table;m.trigger("sortStart",a);b.count=c[k.sortResetKey]?2:(b.count+1)%(k.sortReset?3:2);k.sortRestart&&(e=b,k.$headers.each(function(){this===e||!p&&h(this).is("."+f.css.sortDesc+",."+f.css.sortAsc)||(this.count=-1)}));e=b.column;if(p){k.sortList=[];if(null!==k.sortForce)for(g=k.sortForce,l=0;lg&&(k.sortList.push([e,g]),1g&&(k.sortList.push([e,g]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me", debug:!1,headerList:[],empties:{},strings:{},parsers:[]};f.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"};f.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"};f.log=d;f.benchmark=q;f.construct=function(a){return this.each(function(){var b=h.extend(!0,{},f.defaults,a);b.originalSettings=a;!this.hasInitialized&&f.buildTable&&"TABLE"!==this.tagName?f.buildTable(this,b):f.setup(this,b)})};f.setup=function(a,b){if(!a||!a.tHead||0===a.tBodies.length||!0===a.hasInitialized)return b.debug?d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"): "";var c="",g=h(a),e=h.metadata;a.hasInitialized=!1;a.isProcessing=!0;a.config=b;h.data(a,"tablesorter",b);b.debug&&h.data(a,"startoveralltimer",new Date);b.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1'),c=h.fn.detach?b.detach():b.remove();c=h(a).find("span.tablesorter-savemyplace");b.insertAfter(c);c.remove();a.isProcessing=!1};f.clearTableBody=function(a){h(a)[0].config.$tbodies.children().detach()};f.bindEvents=function(a,b,c){a=h(a)[0];var g,e=a.config;!0!==c&&(e.$extraHeaders=e.$extraHeaders?e.$extraHeaders.add(b):b);b.find(e.selectorSort).add(b.filter(e.selectorSort)).unbind(["mousedown","mouseup", "sort","keyup",""].join(e.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" "),function(c,d){var f;f=c.type;if(!(1!==(c.which||c.button)&&!/sort|keyup/.test(f)||"keyup"===f&&13!==c.which||"mouseup"===f&&!0!==d&&250<(new Date).getTime()-g)){if("mousedown"===f)return g=(new Date).getTime(),/(input|select|button|textarea)/i.test(c.target.tagName)?"":!e.cancelSelection;e.delayInit&&n(e.cache)&&w(a);f=h.fn.closest?h(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)? this:h(this).parents("th, td")[0];f=e.$headers[b.index(f)];f.sortDisabled||L(a,f,c)}});e.cancelSelection&&b.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};f.restoreHeaders=function(a){var b=h(a)[0].config;b.$table.find(b.selectorHeaders).each(function(a){h(this).find("."+f.css.headerIn).length&&h(this).html(b.headerContent[a])})};f.destroy=function(a,b,c){a=h(a)[0];if(a.hasInitialized){f.refreshWidgets(a,!0,!0);var g=h(a),e=a.config,d=g.find("thead:first"), q=d.find("tr."+f.css.headerRow).removeClass(f.css.headerRow+" "+e.cssHeaderRow),k=g.find("tfoot:first > tr").children("th, td");!1===b&&0<=h.inArray("uitheme",e.widgets)&&(g.trigger("applyWidgetId",["uitheme"]),g.trigger("applyWidgetId",["zebra"]));d.find("tr").not(q).remove();g.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([f.css.header,e.cssHeader,e.cssAsc,e.cssDesc,f.css.sortAsc,f.css.sortDesc,f.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");q.find(e.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(e.namespace+" "));f.restoreHeaders(a);g.toggleClass(f.css.table+" "+e.tableClass+" tablesorter-"+e.theme,!1===b);a.hasInitialized=!1;delete a.config.cache;"function"===typeof c&&c(a)}};f.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};f.sortNatural=function(a,b){if(a===b)return 0;var c,g,e,d,h,k;g=f.regex;if(g.hex.test(b)){c=parseInt(a.match(g.hex),16);e=parseInt(b.match(g.hex),16);if(ce)return 1}c=a.replace(g.chunk,"\\0$1\\0").replace(g.chunks,"").split("\\0");g=b.replace(g.chunk,"\\0$1\\0").replace(g.chunks,"").split("\\0");k=Math.max(c.length,g.length);for(h=0;hd)return 1}return 0};f.sortNaturalAsc=function(a,b,c,g,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:c||1:f.sortNatural(a,b)};f.sortNaturalDesc=function(a,b,c,g,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===b&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:f.sortNatural(b,a)};f.sortText=function(a,b){return a>b?1:ah.inArray(q[g].id,l))&&(e.debug&&d('Refeshing widgets: Removing "'+q[g].id+'"'),q[g].hasOwnProperty("remove")&&e.widgetInit[q[g].id]&&(q[g].remove(a, e,e.widgetOptions),e.widgetInit[q[g].id]=!1));!0!==c&&f.applyWidget(a,b)};f.getData=function(a,b,c){var d="";a=h(a);var e,f;if(!a.length)return"";e=h.metadata?a.metadata():!1;f=" "+(a.attr("class")||"");"undefined"!==typeof a.data(c)||"undefined"!==typeof a.data(c.toLowerCase())?d+=a.data(c)||a.data(c.toLowerCase()):e&&"undefined"!==typeof e[c]?d+=e[c]:b&&"undefined"!==typeof b[c]?d+=b[c]:" "!==f&&f.match(" "+c+"-")&&(d=f.match(new RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return h.trim(d)};f.formatFloat= function(a,b){if("string"!==typeof a||""===a)return a;var c;a=(b&&b.config?!1!==b.config.usNumberFormat:"undefined"!==typeof b?b:1)?a.replace(/,/g,""):a.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(a)&&(a=a.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(a);return isNaN(c)?h.trim(a):c};f.isDigit=function(a){return isNaN(a)?/^[\-+(]?\d+[)]?$/.test(a.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 n=q.config;d&&(d=h.trim(n.ignoreCase?d.toLocaleLowerCase():d),d=n.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 n=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof n?n: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 n=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof n?n: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 n,y=d?d.split("."):"",v="",w=y.length; for(n=0;nd.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,n,y){if(d){n=h.config;var v=n.$headers.filter("[data-column="+y+"]:last");y=v.length&&v[0].dateFormat||r.getData(v,r.getColumnData(h,n.headers,y),"dateFormat")||n.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,n){d=q.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return h(n).metadata()[d]}, type:"numeric"});r.addWidget({id:"zebra",priority:90,format:function(d,q,n){var y,v,w,z,D,E,F=new RegExp(q.cssChildRow,"i"),C=q.$tbodies;q.debug&&(D=new Date);for(d=0;d':"";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'),a.cssIcon&&f.find("."+c.css.icon).addClass(m.icons),h.hasClass("hasFilters")&&f.find("."+c.css.filterRow).addClass(m.filterRow));for(h=0;h=]/g},types:{regex:function(b,a,d,h){if(c.filter.regex.regex.test(a)){var g;b=c.filter.regex.regex.exec(a);try{g=(new RegExp(b[1],b[2])).test(h)}catch(f){g=!1}return g}return null},operators:function(b,a,d,h,g,f,e,l,m){if(/^[<>]=?/.test(a)){var n;d=e.config;b=c.formatFloat(a.replace(c.filter.regex.operators,""),e);l=d.parsers[f];d=b;if(m[f]||"numeric"=== l.type)n=c.filter.parseFilter(e,k.trim(""+a.replace(c.filter.regex.operators,"")),f,m[f],!0),b="number"!==typeof n||""===n||isNaN(n)?b:n;h=!m[f]&&"numeric"!==l.type||isNaN(b)||"undefined"===typeof g?isNaN(h)?c.formatFloat(h.replace(c.filter.regex.nondigit,""),e):c.formatFloat(h,e):g;/>/.test(a)&&(n=/>=/.test(a)?h>=b:h>b);/k&&(h=d,d=k,k=h);return a>=d&&a<=k||""===d||""===k}return null},wild:function(b,a,d,h,g,f,e,l,m,n){return/[\?|\*]/.test(a)||c.filter.regex.orReplace.test(b)?(b=e.config,a=c.filter.parseFilter(e,a.replace(c.filter.regex.orReplace,"|"),f,m[f]),!b.$headers.filter('[data-column="'+ f+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(n)?"("+a+")":"^("+a+")$"),(new RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*"))).test(h)):null},fuzzy:function(b,a,d,h,g,f,e,k,m){if(/^~/.test(a)){b=0;d=h.length;f=c.filter.parseFilter(e,a.slice(1),f,m[f]);for(a=0;a'+(e.data("placeholder")||e.attr("data-placeholder")||d.filter_placeholder.select||"")+"":"",f=n=g,0<=g.indexOf(d.filter_selectSourceSeparator)&&(n=g.split(d.filter_selectSourceSeparator),f=n[1],n=n[0]),h+="");a.$table.find("thead").find("select."+c.css.filter+'[data-column="'+l+'"]').append(h)}c.filter.buildDefault(b, !0);c.filter.bindSearch(b,a.$table.find("."+c.css.filter),!0);d.filter_external&&c.filter.bindSearch(b,d.filter_external);d.filter_hideFilters&&c.filter.hideFilters(b,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(d,f){e=f?a.$table.find("."+c.css.header).filter("[data-column]").filter(function(){return""!==f[k(this).data("column")]}):"";c.isProcessing(b,"filterStart"===d.type,f?e:"")});a.filteredRows=a.totalRows;a.debug&&c.benchmark("Applying Filter widget", p);a.$table.bind("tablesorter-initialized pagerInitialized",function(){var d=this.config.widgetOptions;m=c.filter.setDefaults(b,a,d)||[];m.length&&(a.delayInit&&""===m.join("")||c.setFilters(b,m,!0));a.$table.trigger("filterFomatterUpdate");setTimeout(function(){d.filter_initialized||c.filter.filterInitComplete(a)},100)});a.pager&&a.pager.initialized&&!d.filter_initialized&&(a.$table.trigger("filterFomatterUpdate"),setTimeout(function(){c.filter.filterInitComplete(a)},100))},formatterUpdated:function(b, a){var d=b.closest("table")[0].config.widgetOptions;d.filter_initialized||(d.filter_formatterInit[a]=1)},filterInitComplete:function(b){var a=b.widgetOptions,d=0;k.each(a.filter_formatterInit,function(a,b){1===b&&d++});clearTimeout(a.filter_initTimer);a.filter_initialized||d!==a.filter_formatterCount?a.filter_initialized||(a.filter_initTimer=setTimeout(function(){a.filter_initialized=!0;b.$table.trigger("filterInit",b)},500)):(a.filter_initialized=!0,b.$table.trigger("filterInit",b))},setDefaults:function(b, a,d){var h,g=c.getFilters(b)||[];d.filter_saveFilters&&c.storage&&(h=c.storage(b,"tablesorter-filters")||[],(b=k.isArray(h))&&""===h.join("")||!b||(g=h));if(""===g.join(""))for(b=0;b';for(g=0;g";a.$filters=k(e+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(g=0;g").appendTo(a.$filters.eq(g)):((e=c.getColumnData(b,d.filter_formatter,g))?(d.filter_formatterCount++, (e=e(a.$filters.eq(g),g))&&0===e.length&&(e=a.$filters.eq(g).children("input")),e&&(0===e.parent().length||e.parent().length&&e.parent()[0]!==a.$filters[g])&&a.$filters.eq(g).append(e)):e=k('').appendTo(a.$filters.eq(g)),e&&e.attr("placeholder",f.data("placeholder")||f.attr("data-placeholder")||d.filter_placeholder.search||"")),e&&(f=(k.isArray(d.filter_cssFilter)?"undefined"!==typeof d.filter_cssFilter[g]?d.filter_cssFilter[g]||"":"":d.filter_cssFilter)||"",e.addClass(c.css.filter+ " "+f).attr("data-column",g),h&&(e.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(b,a,d){b=k(b)[0];a=k(a);if(a.length){var h=b.config,g=h.widgetOptions,f=g.filter_$externalFilters;!0!==d&&(g.filter_$anyMatch=a.filter('[data-column="all"]'),g.filter_$externalFilters=f&&f.length?g.filter_$externalFilters.add(a):a,c.setFilters(b,h.$table.data("lastSearch")||[],!1===d));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keypress","keyup","search","change",""].join(h.namespace+ "filter ")).bind("keyup"+h.namespace+"filter",function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if(!1===g.filter_liveSearch||""!==this.value&&("number"===typeof g.filter_liveSearch&&this.value.lengtha.which||37<=a.which&&40>=a.which)))return;c.filter.searching(b,!0,!0)}).bind(["search","change","keypress",""].join(h.namespace+"filter "),function(a){var d=k(this).data("column");if(13===a.which|| "search"===a.type||"change"===a.type&&this.value!==h.lastSearch[d])a.preventDefault(),k(this).attr("data-lastSearchTime",(new Date).getTime()),c.filter.searching(b,!1,!0)})}},searching:function(b,a,d){var h=b.config.widgetOptions;clearTimeout(h.searchTimer);"undefined"===typeof a||!0===a?h.searchTimer=setTimeout(function(){c.filter.checkFilters(b,a,d)},h.filter_liveSearch?h.filter_searchDelay:10):c.filter.checkFilters(b,a,d)},checkFilters:function(b,a,d){var h=b.config,g=h.widgetOptions,f=k.isArray(a), e=f?a:c.getFilters(b,!0),l=(e||[]).join("");if(k.isEmptyObject(h.cache))h.delayInit&&h.pager&&h.pager.initialized&&h.$table.trigger("updateCache",[function(){c.filter.checkFilters(b,!1,d)}]);else if(f&&(c.setFilters(b,e,!1,!0!==d),g.filter_initialized||(h.lastCombinedFilter="")),g.filter_hideFilters&&h.$table.find("."+c.css.filterRow).trigger(""===l?"mouseleave":"mouseenter"),h.lastCombinedFilter!==l||!1===a)if(!1===a&&(h.lastCombinedFilter=null,h.lastSearch=[]),g.filter_initialized&&h.$table.trigger("filterStart", [e]),h.showProcessing)setTimeout(function(){c.filter.findRows(b,e,l);return!1},30);else return c.filter.findRows(b,e,l),!1},hideFilters:function(b,a){var d,h,g;k(b).find("."+c.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(b){d=k(this);clearTimeout(g);g=setTimeout(function(){/enter|over/.test(b.type)?d.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==d[0]&&""===a.lastCombinedFilter&&d.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(b){h= k(this).closest("tr");clearTimeout(g);g=setTimeout(function(){if(""===c.getFilters(a.$table).join(""))h["focus"===b.type?"removeClass":"addClass"]("hideme")},200)})},findRows:function(b,a,d){if(b.config.lastCombinedFilter!==d){var h,g,f,e,l,m,n,p,s,r,t,v,w,x,A,z,B,y,N,C,F,G,I,J,O,D,K,H=c.filter.regex,q=b.config,u=q.widgetOptions,L=q.columns,M=q.$table.children("tbody"),P=["range","notMatch","operators"],E=q.$headers.map(function(a){return q.parsers&&q.parsers[a]&&q.parsers[a].parsed||c.getData&&"parsed"=== c.getData(q.$headers.filter('[data-column="'+a+'"]:last'),c.getColumnData(b,q.headers,a),"filter")||k(this).hasClass("filter-parsed")}).get();q.debug&&(N=new Date);q.filteredRows=0;for(l=q.totalRows=0;l=?\s*-\d)/.test(s)||/(<=?\s*\d)/.test(s))&&!(""!==s&&q.$filters&&q.$filters.eq(r).find("select").length&&!q.$headers.filter('[data-column="'+r+'"]:last').hasClass("filter-match"));n=f.not("."+u.filter_filteredRow).length;z&&0===n&&(z=!1);q.debug&&c.log("Searching through "+ (z&&nk.inArray(a,P)&&(x=d(C,F,I,J,O,L,b,u,E,G),null!==x))return B=x,!1}),null!==B)y=B;else if(u.filter_startsWith)for(y=!1,p=L;!y&&0"))return n;k.isArray(n)?e=n:"object"===k.type(l)&&n&&(e=n(b,a,d))}!1===e&&(e=c.filter.getOptions(b,a,d));e=k.grep(e,function(a,b){return k.inArray(a,e)===b});g.$headers.filter('[data-column="'+a+'"]:last').hasClass("filter-select-nosort")||(k.each(e,function(d,c){f.push({t:c,p:g.parsers&&g.parsers[a].format(c, b,[],a)})}),h=g.textSorter||"",f.sort(function(d,e){var f=d.p.toString(),g=e.p.toString();return k.isFunction(h)?h(f,g,!0,a,b):"object"===typeof h&&h.hasOwnProperty(a)?h[a](f,g,!0,a,b):c.sortNatural?c.sortNatural(f,g):!0}),e=[],k.each(f,function(a,b){e.push(b.t)}));return e},getOptions:function(b,a,d){var c,g,f,e,l=b.config,m=l.widgetOptions,n=l.$table.children("tbody"),p=[];for(c=0;c",n=e.$table.find("thead").find("select."+c.css.filter+'[data-column="'+a+'"]').val();if("undefined"===typeof d||""===d)d=c.filter.getOptionSource(b,a,g);if(k.isArray(d)){for(b=0;b'+f+"":"";d=[]}e=(e.$filters?e.$filters:e.$table.children("thead")).find("."+c.css.filter);l.filter_$externalFilters&&(e=e&&e.length?e.add(l.filter_$externalFilters):l.filter_$externalFilters);a=e.filter('select[data-column="'+a+'"]');a.length&&(a[h?"html":"append"](m),k.isArray(d)||a.append(d).val(n),a.val(n))}},buildDefault:function(b,a){var d,h,g,f=b.config,e=f.widgetOptions,k=f.columns;for(d=0;db.top&&cMath.abs(n.parent().width()-n.width()),v=function(a){if(0!==p&&s){var b=a.pageX-p,c=s.width();s.width(c+b);s.width()!==c&&t&&r.width(r.width()-b);p=a.pageX}},w=function(){c.storage&& s&&r&&(m={},m[s.index()]=s.width(),m[r.index()]=r.width(),s.width(m[s.index()]),r.width(m[r.index()]),!1!==d.resizable&&c.storage(b,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));p=0;s=r=null;k(window).trigger("resize")};if(m=c.storage&&!1!==d.resizable?c.storage(b,"tablesorter-resizable"):{})for(e in m)!isNaN(e)&&e');d.resizable_addLastColumn||(f=f.slice(0,-1));g=g?g.add(f):f});g.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&&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