From 8310e011973a7c57d2e725d864e5e30a8c040a44 Mon Sep 17 00:00:00 2001 From: Mottie Date: Fri, 18 Oct 2013 13:38:46 -0500 Subject: [PATCH] version bump --- README.md | 66 +++++++++++++++++--- addons/pager/jquery.tablesorter.pager.js | 5 +- addons/pager/jquery.tablesorter.pager.min.js | 4 +- component.json | 2 +- js/jquery.tablesorter.min.js | 4 +- js/jquery.tablesorter.widgets.min.js | 24 +++---- package.json | 2 +- tablesorter.jquery.json | 2 +- 8 files changed, 77 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 26ccb7d9..aedfd1c6 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,67 @@ tablesorter can successfully parse and sort many types of data including linked ### Special Thanks * Big shout-out to [Nick Craver](https://github.com/NickCraver) for getting rid of the `eval()` function that was previously needed for multi-column sorting. -* Also big thanks to [thezoggy](https://github.com/thezoggy) for helping with code, themes and providing valuable feedback. -* And, thanks to everyone else that has contributed, and continues to contribute to this forked project! +* Big thanks to [thezoggy](https://github.com/thezoggy) for helping with code, themes and providing valuable feedback. +* Big thanks to [ThsSin-](https://github.com/TheSin-) for taking over for a while and also providing valuable feedback. +* And, of course thanks to everyone else that has contributed, and continues to contribute to this forked project! ### Change Log View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change). +#### Version 2.12 (10/18/2013) + +**Core** +* Added `numberSorter` option allowing you to modify the overall numeric sorter. +* Updated the `textSorter` option to allow setting a text sorter for each column. + * The `textSorter` functon parameters have changed from `(a, b, table, column)` to `(a, b, direction, column, table)`. + * Restructured & combined sorting functions internally so that tablesorter will always sort empty cells no matter what sorting algorithm is used by the `textSorter`. + * Renamed `$.tablesorter.sortText()` to `$.tablesorter.sortNatural()` + * Added a new basic alphabetical sort algorithm `$.tablesorter.sortText = function(a, b) { return a > b ? 1 : (a < b ? -1 : 0); };` which can be set using the `textSorter` option. + * New examples can be found in the updated [custom sort demo](http://mottie.github.io/tablesorter/docs/example-option-custom-sort.html). + +* Added `fixedUrl` option for use with the `$.tablesorter.storage()` function. + * Setting this with a fixed name (it doesn't need to be a url) allows saving table data (`saveSort` widget, `savePages` in pager widget) for tables on multiple pages in a domain. + * Additional storage options are described below under "Storage". +* An accurate number of table columns is now contained within `table.config.columns`. This accounts for multiple header rows, tds, ths, etc. +* Replaced `.innerHTML` with jQuery's `.html()` to fix issues in IE8. Fixes [issue #385](https://github.com/Mottie/tablesorter/issues/385). +* Version numbers should now all be accurate, even in the comments.. at least this time ;). Fixes [issue #386](https://github.com/Mottie/tablesorter/issues/386). + +**Pager** +* In attempts to initialize the pager after the filter widget: + * Added a pager widget (still beta testing) to allow initializing the pager after certain widgets (filter widget). + * Updated tablesorter core (properly count table columns) & filter widget code to allow it to initialize on an empty table (thanks @stanislavprokopov!). + * Hopefully one or both of these changes fixes [issue #388](https://github.com/Mottie/tablesorter/issues/388). + * New pager widget demos: [basic](http://mottie.github.io/tablesorter/docs/example-widget-pager.html) & [ajax](http://mottie.github.io/tablesorter/docs/example-widget-pager-ajax.html). +* `savePages` option + * Should no longer cause an error if stored data is malformed or unrecognized. Fixes [issue #387](https://github.com/Mottie/tablesorter/issues/387). + * The stored size and page is now cleared if the table is destroyed. +* Fixed an error occuring in IE when trying to determine if a variable is an array (`toString` function call not recognized). Fixes [issue #390](https://github.com/Mottie/tablesorter/issues/390). +* Updated pager rendering to prevent multiple ajax calls. +* During this update, the pager page size would return as zero and set the totalPages value to inifinity. Yeah, it doesn't do that anymore; but you can still set the pager size to zero if you want! + +**Widgets** +* Filter widget: + * Should now properly initialize when the pager plugin/widget is used with ajax and/or the `filter_serversideFiltering` option is `true`. Fixes [issue #388](https://github.com/Mottie/tablesorter/issues/388). + * Please note that the select dropdowns still sort using the natural sort algorithm, but since it is using the function directly, empty cells will not sort based on the `emptyTo` option. If this is a big problem, let me know! +* Grouping widget: + * Added `group_callback` option - this sets a callback function which allows modification of each group header label - like adding a subtotal for each group, or something. See the [updated demo](http://mottie.github.io/tablesorter/docs/example-widget-grouping.html). + * Added `group_complete` option which is `"groupingComplete"` by default. This is the name of the event that is triggered once the grouping widget has completed updating. +* Updated the editable widget: + * Added `editable_editComplete` option which names the event that is triggered after tablesorter has completed updating the recent edit. + * You can also bind to the `change` event for that editable element, but it may occur before tablesorter has updated its internal data cache. +* Storage + * The `$.tablesorter.storage()` function now has options including the `fixedUrl` option described in the core section above. + * Also added storage options which can be used for custom widgets: `$.tablesorter.storage(table, key, value, { url : 'mydomain', id : 'table-group' })`. + * Additionally, for already build-in widgets, you can apply data-attributes to the table: `...
`. + * For more details, please see [issue #389](https://github.com/Mottie/tablesorter/issues/389). + +**Parsers** +* Added an IPv6 parser + * This parser will auto-detect (the `is` function checks for valid IPv6 addresses). + * Added a new [IPv6 parser demo](http://mottie.github.io/tablesorter/docs/example-parsers-ip-address.html). + * Included rather extensive unit tests for just this parser o.O. + #### Version 2.11.1 (10/11/2013) * Fixed an updating bug: @@ -165,11 +219,3 @@ View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Chan * [External filters using Select2 plugin](http://mottie.github.io/tablesorter/beta-testing/example-external-filters-using-select2.html) - should be working properly. * [Column reorder widget](http://mottie.github.io/tablesorter/beta-testing/example-widget-column-reorder.html) - not working 100% with sticky headers. * [Column sum widget](http://mottie.github.io/tablesorter/beta-testing/example-widget-sum-columns.html) - still needs LOTS of work! - -#### Version 2.10.6 (5/30/2013) - -* Added `skipTest` options to the HTML5 filter formatter functions. Fixes [issue #307](https://github.com/Mottie/tablesorter/issues/307). - -#### Version 2.10.5 (5/30/2013) - -* Filter formatter functions now works properly within sticky headers. Fixes issues [#290](https://github.com/Mottie/tablesorter/issues/290) & [#317](https://github.com/Mottie/tablesorter/issues/317). diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 0bc80672..4884f1ec 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -3,7 +3,6 @@ * updated 10/18/2013 */ /*jshint browser:true, jquery:true, unused:false */ -/*global toString:true */ ;(function($) { "use strict"; /*jshint supernew:true */ @@ -386,7 +385,7 @@ }, renderTable = function(table, rows, p) { - var i, j, o, $tb, + var i, $tb, l = rows && rows.length || 0, // rows may be undefined s = ( p.page * p.size ), e = ( s + p.size ); @@ -632,7 +631,7 @@ .bind('change', function(){ p.page = $(this).val() - 1; moveToPage(table, p); - updatePageDisplay(table, p, false) + updatePageDisplay(table, p, false); }); } diff --git a/addons/pager/jquery.tablesorter.pager.min.js b/addons/pager/jquery.tablesorter.pager.min.js index f197dce1..d00d548b 100644 --- a/addons/pager/jquery.tablesorter.pager.min.js +++ b/addons/pager/jquery.tablesorter.pager.min.js @@ -1,2 +1,2 @@ -/*! tablesorter pager plugin minified - updated 10/11/2013 */ -;(function(g){var m=g.tablesorter;g.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(b,a){return a},ajaxObject:{dataType:"json"},ajaxProcessing:function(b){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,size:10,savePages:!0,fixedHeight:!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};var w=this,x=function(b,a){var c=b.cssDisabled,f=!!a,e=Math.min(b.totalPages,b.filteredPages);b.updateArrows&&(b.$container.find(b.cssFirst+","+b.cssPrev)[f||0===b.page?"addClass":"removeClass"](c),b.$container.find(b.cssNext+","+b.cssLast)[f||b.page===e-1?"addClass":"removeClass"](c))},s=function(b,a,c){var f,e,h,d=b.config;f=d.$table.hasClass("hasFilters")&&!a.ajaxUrl;h=(d.widgetOptions&&d.widgetOptions.filter_filteredRow|| "filtered")+","+d.selectorRemove;a.totalPages=Math.ceil(a.totalRows/a.size);a.filteredRows=f?d.$tbodies.eq(0).children("tr:not(."+h+")").length:a.totalRows;a.filteredPages=f?Math.ceil(a.filteredRows/a.size)||1:a.totalPages;if(0<=Math.min(a.totalPages,a.filteredPages)&&(h=a.size*a.page>a.filteredRows,a.startRow=h?1:0===a.filteredRows?0:a.size*a.page+1,a.page=h?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),f=a.$container.find(a.cssPageDisplay),h=(a.ajaxData&&a.ajaxData.hasOwnProperty("output")? a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(b,c){return a.page+(c?parseInt(c,10):1)}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(b){b=b.replace(/[{}\s]/g,"");var c=b.split(":"),d=a.ajaxData;return 1"+f+"";a.$goto.html(h).val(a.page+1)}x(a);a.initialized&& !1!==c&&(d.$table.trigger("pagerComplete",a),a.savePages&&m.storage&&m.storage(b,"tablesorter-pager",{page:a.page,size:a.size}))},t=function(b,a){var c,f=b.config,e=f.$tbodies.eq(0);a.fixedHeight&&(e.find("tr.pagerSavedHeightSpacer").remove(),c=g.data(b,"pagerSavedHeight"))&&(c-=e.height(),5'))},A=function(b, a){var c=b.config.$tbodies.eq(0);c.find("tr.pagerSavedHeightSpacer").remove();g.data(b,"pagerSavedHeight",c.height());t(b,a);g.data(b,"pagerLastSize",a.size)},u=function(b,a){if(!a.ajaxUrl){var c,f=b.config,e=f.$tbodies.eq(0).children(),h=e.length,d=a.page*a.size,g=d+a.size,n=f.widgetOptions&&f.widgetOptions.filter_filteredRow||"filtered",l=0;for(c=0;c=d&&l'+(0===f.status?"Not connected, verify Network": 404===f.status?"Requested page not found [404]":500===f.status?"Internal Server Error [500]":"parsererror"===e?"Requested JSON parse failed":"timeout"===e?"Time out error":"abort"===e?"Ajax Request aborted":"Uncaught error: "+f.statusText+" ["+f.status+"]")+"").click(function(){g(this).remove()}).appendTo(p.find("thead:first")),k.$tbodies.eq(0).empty();else{"[object Array]"!==toString.call(h)?(c.ajaxData=h,c.totalRows=h.total,l=h.headers,f=h.rows):(f=isNaN(h[0])&&!isNaN(h[1]),e=h[f?1:0], c.totalRows=isNaN(e)?c.totalRows||0:e,f=h[f?0:1]||[],l=h[2]);v=f.length;if(f instanceof jQuery)k.$tbodies.eq(0).empty().append(f);else if(v){if(0";for(e=0;e"+f[h][e]+"";q+=""}k.$tbodies.eq(0).html(q)}l&&l.length===b&&(n=(d=p.hasClass("hasStickyHeaders"))?k.$sticky.children("thead:first").children().children():"",r=p.find("tfoot tr:first").children(),k.$headers.filter("th").each(function(a){var b=g(this),c;b.find("."+m.css.icon).length? (c=b.find("."+m.css.icon).clone(!0),b.find(".tablesorter-header-inner").html(l[a]).append(c),d&&n.length&&(c=n.eq(a).find("."+m.css.icon).clone(!0),n.eq(a).find(".tablesorter-header-inner").html(l[a]).append(c))):(b.find(".tablesorter-header-inner").html(l[a]),d&&n.length&&n.eq(a).find(".tablesorter-header-inner").html(l[a]));r.eq(a).html(l[a])}))}k.showProcessing&&m.isProcessing(a);c.totalPages=Math.ceil(c.totalRows/c.size);s(a,c);t(a,c);c.initialized?(p.trigger("pagerChange",c),p.trigger("updateComplete")): p.trigger("update")}c.initialized||(c.initialized=!0,g(a).trigger("pagerInitialized",c))},H=function(b,a){var c=G(b,a),f=g(document),e=b.config;""!==c&&(e.showProcessing&&m.isProcessing(b,!0),f.bind("ajaxError.pager",function(c,d,e,g){C(null,b,a,d,g);f.unbind("ajaxError.pager")}),a.ajaxObject.url=c,a.ajaxObject.success=function(c){C(c,b,a);f.unbind("ajaxError.pager");"function"===typeof a.oldAjaxSuccess&&a.oldAjaxSuccess(c)},g.ajax(a.ajaxObject))},G=function(b,a){var c=a.ajaxUrl?a.ajaxUrl.replace(/\{page([\-+]\d+)?\}/, function(c,b){return a.page+(b?parseInt(b,10):0)}).replace(/\{size\}/g,a.size):"",f=b.config.sortList,e=a.currentFilters||[],h=c.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),d=c.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),k=[];h&&(h=h[1],g.each(f,function(a,b){k.push(h+"["+b[0]+"]="+b[1])}),c=c.replace(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/g,k.length?k.join("&"):h),k=[]);d&&(d=d[1],g.each(e,function(a,b){b&&k.push(d+"["+a+"]="+encodeURIComponent(b))}),c=c.replace(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/g, k.length?k.join("&"):d));"function"===typeof a.customAjaxUrl&&(c=a.customAjaxUrl(b,c));return c},y=function(b,a,c){c.isDisabled=!1;var f,e;f=c.page*c.size;var h=f+c.size;if(!(1>a.length)){c.initialized&&g(b).trigger("pagerChange",c);if(c.removeRows){h>a.length&&(h=a.length);m.clearTableBody(b);for(e=m.processTbody(b,b.config.$tbodies.eq(0),!0);f=c.totalPages&&D(b,c);s(b,c);c.isDisabled||t(b,c);g(b).trigger("applyWidgets")}},E=function(b, a){a.ajax?x(a,!0):(a.isDisabled=!0,g.data(b,"pagerLastPage",a.page),g.data(b,"pagerLastSize",a.size),a.page=0,a.size=a.totalRows,a.totalPages=1,g(b).find("tr.pagerSavedHeightSpacer").remove(),y(b,b.config.rowsCopy,a));a.$size.add(a.$goto).each(function(){g(this).addClass(a.cssDisabled)[0].disabled=!0})},k=function(b,a,c){if(!a.isDisabled){var f=Math.min(a.totalPages,a.filteredPages);0>a.page&&(a.page=0);a.page>f-1&&0!==f&&(a.page=f-1);a.ajax?H(b,a):a.ajax||y(b,b.config.rowsCopy,a);g.data(b,"pagerLastPage", a.page);g.data(b,"pagerUpdateTriggered",!0);a.initialized&&!1!==c&&g(b).trigger("pageMoved",a)}},z=function(b,a,c){c.size=a;c.$size.val(a);g.data(b,"pagerLastPage",c.page);g.data(b,"pagerLastSize",c.size);c.totalPages=Math.ceil(c.totalRows/c.size);k(b,c)},I=function(b,a){a.page=0;k(b,a)},D=function(b,a){a.page=Math.min(a.totalPages,a.filteredPages)-1;k(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);k(b,a)},K=function(b, a){a.page--;0>=a.page&&(a.page=0);k(b,a)},F=function(b,a,c){var f=a.$size.removeClass(a.cssDisabled).removeAttr("disabled");a.$goto.removeClass(a.cssDisabled).removeAttr("disabled");a.isDisabled=!1;a.page=g.data(b,"pagerLastPage")||a.page||0;a.size=g.data(b,"pagerLastSize")||parseInt(f.find("option[selected]").val(),10)||a.size;f.val(a.size);a.totalPages=Math.ceil(Math.min(a.totalPages,a.filteredPages)/a.size);c&&(g(b).trigger("update"),z(b,a.size,a),B(b,a),t(b,a))};w.appender=function(b,a){var c= b.config.pager;c.ajax||(b.config.rowsCopy=a,c.totalRows=a.length,c.size=g.data(b,"pagerLastSize")||c.size,c.totalPages=Math.ceil(c.totalRows/c.size),y(b,a,c))};w.construct=function(b){return this.each(function(){if(this.config&&this.hasInitialized){var a,c,f,e=this,h=e.config,d=h.pager=g.extend({},g.tablesorterPager.defaults,b),r=h.$table,n=d.$container=g(d.container).addClass("tablesorter-pager").show();d.oldAjaxSuccess=d.oldAjaxSuccess||d.ajaxObject.success;h.appender=w.appender;d.savePages&&m.storage&& (a=m.storage(e,"tablesorter-pager"),d.page=isNaN(a.page)?d.page:a.page,d.size=isNaN(a.size)?d.size:a.size);r.unbind("filterStart.pager filterEnd.pager sortEnd.pager disable.pager enable.pager destroy.pager update.pager pageSize.pager").bind("filterStart.pager",function(a,b){g.data(e,"pagerUpdateTriggered",!1);d.currentFilters=b}).bind("filterEnd.pager sortEnd.pager",function(a){g.data(e,"pagerUpdateTriggered")?g.data(e,"pagerUpdateTriggered",!1):(("filterEnd"===a.type||"sortEnd"===a.type&&h.serverSideSorting)&& k(e,d,!1),s(e,d,!1),t(e,d))}).bind("disable.pager",function(a){a.stopPropagation();E(e,d)}).bind("enable.pager",function(a){a.stopPropagation();F(e,d,!0)}).bind("destroy.pager",function(a){a.stopPropagation();E(e,d);d.$container.hide();e.config.appender=null;g(e).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager")}).bind("update.pager",function(a){a.stopPropagation();u(e,d)}).bind("pageSize.pager",function(a,b){a.stopPropagation();z(e,parseInt(b,10)||10,d);u(e,d);s(e, 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);k(e,d);s(e,d,!1)});c=[d.cssFirst,d.cssPrev,d.cssNext,d.cssLast];f=[I,K,J,D];n.find(c.join(",")).unbind("click.pager").bind("click.pager",function(a){var b=g(this),h=c.length;if(!b.hasClass(d.cssDisabled))for(a=0;aa.filteredRows,a.startRow=h?1:0===a.filteredRows?0:a.size*a.page+1,a.page=h?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),f=a.$container.find(a.cssPageDisplay), h=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(b,c){return a.page+(c?parseInt(c,10):1)}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(b){b=b.replace(/[{}\s]/g,"");var c=b.split(":"),d=a.ajaxData;return 1"+f+"";a.$goto.html(h).val(a.page+ 1)}x(a);a.initialized&&!1!==c&&(d.$table.trigger("pagerComplete",a),a.savePages&&l.storage&&l.storage(b,"tablesorter-pager",{page:a.page,size:a.size}))},t=function(b,a){var c,f=b.config,e=f.$tbodies.eq(0);a.fixedHeight&&(e.find("tr.pagerSavedHeightSpacer").remove(),c=g.data(b,"pagerSavedHeight"))&&(c-=e.height(),5'))},A=function(b,a){var c=b.config.$tbodies.eq(0);c.find("tr.pagerSavedHeightSpacer").remove();g.data(b,"pagerSavedHeight",c.height());t(b,a);g.data(b,"pagerLastSize",a.size)},u=function(b,a){if(!a.ajaxUrl){var c,f=b.config,e=f.$tbodies.eq(0).children(),h=e.length,d=a.page*a.size,g=d+a.size,n=f.widgetOptions&&f.widgetOptions.filter_filteredRow||"filtered",m=0;for(c=0;c=d&&m'+(0===f.status?"Not connected, verify Network": 404===f.status?"Requested page not found [404]":500===f.status?"Internal Server Error [500]":"parsererror"===e?"Requested JSON parse failed":"timeout"===e?"Time out error":"abort"===e?"Ajax Request aborted":"Uncaught error: "+f.statusText+" ["+f.status+"]")+"").click(function(){g(this).remove()}).appendTo(p.find("thead:first")),k.$tbodies.eq(0).empty();else{g.isArray(h)?(f=isNaN(h[0])&&!isNaN(h[1]),e=h[f?1:0],c.totalRows=isNaN(e)?c.totalRows||0:e,f=h[f?0:1]||[],m=h[2]):(c.ajaxData=h,c.totalRows= h.total,m=h.headers,f=h.rows);v=f.length;if(f instanceof jQuery)k.$tbodies.eq(0).empty().append(f);else if(v){if(0";for(e=0;e"+f[h][e]+"";q+=""}k.$tbodies.eq(0).html(q)}m&&m.length===b&&(n=(d=p.hasClass("hasStickyHeaders"))?k.$sticky.children("thead:first").children().children():"",s=p.find("tfoot tr:first").children(),k.$headers.filter("th").each(function(a){var b=g(this),c;b.find("."+l.css.icon).length?(c=b.find("."+l.css.icon).clone(!0), b.find(".tablesorter-header-inner").html(m[a]).append(c),d&&n.length&&(c=n.eq(a).find("."+l.css.icon).clone(!0),n.eq(a).find(".tablesorter-header-inner").html(m[a]).append(c))):(b.find(".tablesorter-header-inner").html(m[a]),d&&n.length&&n.eq(a).find(".tablesorter-header-inner").html(m[a]));s.eq(a).html(m[a])}))}k.showProcessing&&l.isProcessing(a);c.totalPages=Math.ceil(c.totalRows/(c.size||10));r(a,c);t(a,c);c.initialized?(p.trigger("pagerChange",c),p.trigger("updateComplete")):p.trigger("update")}c.initialized|| (c.initialized=!0,g(a).trigger("pagerInitialized",c))},H=function(b,a){var c=G(b,a),f=g(document),e=b.config;""!==c&&(e.showProcessing&&l.isProcessing(b,!0),f.bind("ajaxError.pager",function(c,d,e,g){C(null,b,a,d,g);f.unbind("ajaxError.pager")}),a.ajaxObject.url=c,a.ajaxObject.success=function(c){C(c,b,a);f.unbind("ajaxError.pager");"function"===typeof a.oldAjaxSuccess&&a.oldAjaxSuccess(c)},g.ajax(a.ajaxObject))},G=function(b,a){var c=a.ajaxUrl?a.ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(c,b){return a.page+ (b?parseInt(b,10):0)}).replace(/\{size\}/g,a.size):"",f=b.config.sortList,e=a.currentFilters||[],h=c.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),d=c.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),k=[];h&&(h=h[1],g.each(f,function(a,b){k.push(h+"["+b[0]+"]="+b[1])}),c=c.replace(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/g,k.length?k.join("&"):h),k=[]);d&&(d=d[1],g.each(e,function(a,b){b&&k.push(d+"["+a+"]="+encodeURIComponent(b))}),c=c.replace(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/g,k.length?k.join("&"): d));"function"===typeof a.customAjaxUrl&&(c=a.customAjaxUrl(b,c));return c},y=function(b,a,c){var f,e;f=c.page*c.size;var h=f+c.size;if(!(1>(a&&a.length||0))){c.page>=c.totalPages&&D(b,c);c.isDisabled=!1;c.initialized&&g(b).trigger("pagerChange",c);if(c.removeRows){h>a.length&&(h=a.length);l.clearTableBody(b);for(e=l.processTbody(b,b.config.$tbodies.eq(0),!0);fa.page&&(a.page=0);a.page>e-1&&0!==e&&(a.page=e-1);if(f.page!==a.page||f.size!==a.size|| f.total!==a.totalPages||f.filters!==a.currentFilters)a.last={page:a.page,size:a.size,totalPages:a.totalPages,currentFilters:a.currentFilters},a.ajax?H(b,a):a.ajax||y(b,b.config.rowsCopy,a),g.data(b,"pagerLastPage",a.page),g.data(b,"pagerUpdateTriggered",!0),a.initialized&&!1!==c&&g(b).trigger("pageMoved",a)}},z=function(b,a,c){c.size=a;c.$size.val(a);g.data(b,"pagerLastPage",c.page);g.data(b,"pagerLastSize",c.size);c.totalPages=Math.ceil(c.totalRows/(c.size||10));k(b,c)},I=function(b,a){a.page=0; k(b,a)},D=function(b,a){a.page=Math.min(a.totalPages,a.filteredPages)-1;k(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);k(b,a)},K=function(b,a){a.page--;0>=a.page&&(a.page=0);k(b,a)},F=function(b,a,c){var f=a.$size.removeClass(a.cssDisabled).removeAttr("disabled");a.$goto.removeClass(a.cssDisabled).removeAttr("disabled");a.isDisabled=!1;a.page=g.data(b,"pagerLastPage")||a.page||0;a.size=g.data(b,"pagerLastSize")|| parseInt(f.find("option[selected]").val(),10)||a.size;f.val(a.size);a.totalPages=Math.ceil(Math.min(a.totalPages,a.filteredPages)/(a.size||10));c&&(g(b).trigger("update"),z(b,a.size,a),B(b,a),t(b,a))};w.appender=function(b,a){var c=b.config.pager;c.ajax||(b.config.rowsCopy=a,c.totalRows=a.length,c.size=g.data(b,"pagerLastSize")||c.size,c.totalPages=Math.ceil(c.totalRows/(c.size||10)),y(b,a,c))};w.construct=function(b){return this.each(function(){if(this.config&&this.hasInitialized){var a,c,f,e=this, h=e.config,d=h.pager=g.extend({},g.tablesorterPager.defaults,b),s=h.$table,n=d.$container=g(d.container).addClass("tablesorter-pager").show();d.oldAjaxSuccess=d.oldAjaxSuccess||d.ajaxObject.success;h.appender=w.appender;d.savePages&&l.storage&&(a=l.storage(e,"tablesorter-pager")||{},d.page=isNaN(a.page)?d.page:a.page,d.size=(isNaN(a.size)?d.size:a.size)||10);s.unbind("filterStart.pager filterEnd.pager sortEnd.pager disable.pager enable.pager destroy.pager update.pager pageSize.pager").bind("filterStart.pager", function(a,b){g.data(e,"pagerUpdateTriggered",!1);d.currentFilters=b}).bind("filterEnd.pager sortEnd.pager",function(a){g.data(e,"pagerUpdateTriggered")?g.data(e,"pagerUpdateTriggered",!1):(("filterEnd"===a.type||"sortEnd"===a.type&&h.serverSideSorting)&&k(e,d,!1),r(e,d,!1),t(e,d))}).bind("disable.pager",function(a){a.stopPropagation();E(e,d)}).bind("enable.pager",function(a){a.stopPropagation();F(e,d,!0)}).bind("destroy.pager",function(a){a.stopPropagation();E(e,d);d.$container.hide();e.config.appender= null;d.initialized=!1;g(e).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager");l.storage&&l.storage(e,"tablesorter-pager","")}).bind("update.pager",function(a){a.stopPropagation();u(e,d)}).bind("pageSize.pager",function(a,b){a.stopPropagation();z(e,parseInt(b,10)||10,d);u(e,d);r(e,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);k(e,d);r(e,d,!1)});c=[d.cssFirst, d.cssPrev,d.cssNext,d.cssLast];f=[I,K,J,D];n.find(c.join(",")).unbind("click.pager").bind("click.pager",function(a){var b=g(this),h=c.length;if(!b.hasClass(d.cssDisabled))for(a=0;a=1.2.6" } diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index 3227eb4d..46b747eb 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.11.0 min - Client-side table sorting with ease! +* TableSorter 2.12.0 min - Client-side table sorting with ease! * Copyright (c) 2007 Christian Bach */ -!(function(h){h.extend({tablesorter:new function(){function c(a){"undefined"!==typeof console&&"undefined"!==typeof console.log?console.log(a):alert(a)}function n(a,b){c(a+" ("+((new Date).getTime()-b.getTime())+"ms)")}function m(a){for(var b in a)return!1;return!0}function p(a,b,d){if(!b)return"";var e=a.config,f=e.textExtraction,g="",g="simple"===f?e.supportsTextContent?b.textContent:h(b).text():"function"===typeof f?f(b,a,d):"object"===typeof f&&f.hasOwnProperty(d)?f[d](b,a,d):e.supportsTextContent? b.textContent:h(b).text();return h.trim(g)}function r(a){var b=a.config,d=b.$tbodies=b.$table.children("tbody:not(."+b.cssInfoBlock+")"),e,w,g,l,q,h,k="";if(0===d.length)return b.debug?c("*Empty table!* Not building a parser cache"):"";d=d[0].rows;if(d[0])for(e=[],w=d[0].cells.length,g=0;g':"";k.$headers=h(a).find(k.selectorHeaders).each(function(a){e=h(this);d=k.headers[a];k.headerContent[a]=this.innerHTML;l=k.headerTemplate.replace(/\{content\}/g,this.innerHTML).replace(/\{icon\}/g,g);k.onRenderTemplate&&(w=k.onRenderTemplate.apply(e,[a,l]))&&"string"===typeof w&&(l=w);this.innerHTML='
'+l+"
";k.onRenderHeader&&k.onRenderHeader.apply(e,[a]); this.column=b[this.parentNode.rowIndex+"-"+this.cellIndex];var c=f.getData(e,d,"sortInitialOrder")||k.sortInitialOrder;this.order=/^d/i.test(c)||1===c?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;q=f.getData(e,d,"lockedOrder")||!1;"undefined"!==typeof q&&!1!==q&&(this.order=this.lockedOrder=/^d/i.test(q)||1===q?[1,1,1]:[0,0,0]);e.addClass(f.css.header+" "+k.cssHeader);k.headerList[a]=this;e.parent().addClass(f.css.headerRow+" "+k.cssHeaderRow);e.attr("tabindex",0)});B(a);k.debug&&(n("Built headers:", s),c(k.$headers))}function E(a,b,d){var e=a.config;e.$table.find(e.selectorRemove).remove();r(a);u(a);F(e.$table,b,d)}function B(a){var b,d=a.config;d.$headers.each(function(a,c){b="false"===f.getData(c,d.headers[a],"sorter");c.sortDisabled=b;h(c)[b?"addClass":"removeClass"]("sorter-false")})}function G(a){var b,d,e,c=a.config,g=c.sortList,l=[f.css.sortAsc+" "+c.cssAsc,f.css.sortDesc+" "+c.cssDesc],q=h(a).find("tfoot tr").children().removeClass(l.join(" "));c.$headers.removeClass(l.join(" "));e=g.length; for(b=0;b"),d=h(a).width();h(a.tBodies[0]).find("tr:first").children("td:visible").each(function(){b.append(h("").css("width",parseInt(1E3* (h(this).width()/d),10)/10+"%"))});h(a).prepend(b)}}function L(a,b){var d,e,c,g=a.config,f=b||g.sortList;g.sortList=[];h.each(f,function(a,b){d=[parseInt(b[0],10),parseInt(b[1],10)];if(c=g.headerList[d[0]])g.sortList.push(d),e=h.inArray(d[1],c.order),c.count=0<=e?e:d[1]%(g.sortReset?3:2)})}function M(a,b,d){var e,c,g=a.config,l=!d[g.sortMultiSortKey],q=h(a);q.trigger("sortStart",a);b.count=d[g.sortResetKey]?2:(b.count+1)%(g.sortReset?3:2);g.sortRestart&&(c=b,g.$headers.each(function(){this===c||!l&& h(this).is("."+f.css.sortDesc+",."+f.css.sortAsc)||(this.count=-1)}));c=b.column;if(l){g.sortList=[];if(null!==g.sortForce)for(e=g.sortForce,d=0;de&&(g.sortList.push([c,e]),1e&&(g.sortList.push([c,e]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};f.css={table:"tablesorter", childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc"};f.log=c;f.benchmark=n;f.construct=function(a){return this.each(function(){var b=h.extend(!0,{},f.defaults,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?c("stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var d="",e=h(a),w=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.supportsTextContent="x"===h("x")[0].textContent;b.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1'),d=h.fn.detach?b.detach():b.remove();d=h(a).find("span.tablesorter-savemyplace"); b.insertAfter(d);d.remove();a.isProcessing=!1};f.clearTableBody=function(a){h(a)[0].config.$tbodies.empty()};f.restoreHeaders=function(a){var b=a.config;b.$table.find(b.selectorHeaders).each(function(a){h(this).find(".tablesorter-header-inner").length&&h(this).html(b.headerContent[a])})};f.destroy=function(a,b,d){a=h(a)[0];if(a.hasInitialized){f.refreshWidgets(a,!0,!0);var e=h(a),c=a.config,g=e.find("thead:first"),l=g.find("tr."+f.css.headerRow).removeClass(f.css.headerRow+" "+c.cssHeaderRow),n=e.find("tfoot:first > tr").children("th, td"); g.find("tr").not(l).remove();e.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter "));c.$headers.add(n).removeClass([f.css.header,c.cssHeader,c.cssAsc,c.cssDesc,f.css.sortAsc,f.css.sortDesc].join(" ")).removeAttr("data-column");l.find(c.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter"); f.restoreHeaders(a);!1!==b&&e.removeClass(f.css.table+" "+c.tableClass+" tablesorter-"+c.theme);a.hasInitialized=!1;"function"===typeof d&&d(a)}};f.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,hex:/^0x[0-9a-f]+$/i};f.sortText=function(a,b,d,e){if(b===d)return 0;var c=a.config,g=c.string[c.empties[e]||c.emptyTo],h=f.regex;if(""===b&&0!==g)return"boolean"===typeof g?g?-1:1:-g||-1;if(""===d&&0!==g)return"boolean"===typeof g?g?1:-1:g||1;if("function"===typeof c.textSorter)return c.textSorter(b, d,a,e);if(e=parseInt(d.match(h.hex),16)){a=parseInt(b.match(h.hex),16);if(ae)return 1}b=b.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");d=d.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");c=Math.max(b.length,d.length);for(e=0;ea)return 1}return 0}; f.sortTextDesc=function(a,b,d,e){if(b===d)return 0;var c=a.config,g=c.string[c.empties[e]||c.emptyTo];return""===b&&0!==g?"boolean"===typeof g?g?-1:1:g||1:""===d&&0!==g?"boolean"===typeof g?g?1:-1:-g||-1:"function"===typeof c.textSorter?c.textSorter(d,b,a,e):f.sortText(a,d,b)};f.getTextValue=function(a,b,d){if(b){var e=a?a.length:0,c=b+d;for(b=0;bh.inArray(l[e].id,g))&&(n.debug&&c("Refeshing widgets: Removing "+l[e].id),l[e].hasOwnProperty("remove")&&(l[e].remove(a,n,n.widgetOptions),n.widgetInit[l[e].id]=!1));!0!==d&&f.applyWidget(a,b)};f.getData= function(a,b,d){var c="";a=h(a);var f,g;if(!a.length)return"";f=h.metadata?a.metadata():!1;g=" "+(a.attr("class")||"");"undefined"!==typeof a.data(d)||"undefined"!==typeof a.data(d.toLowerCase())?c+=a.data(d)||a.data(d.toLowerCase()):f&&"undefined"!==typeof f[d]?c+=f[d]:b&&"undefined"!==typeof b[d]?c+=b[d]:" "!==g&&g.match(" "+d+"-")&&(c=g.match(RegExp("\\s"+d+"-([\\w-]+)"))[1]||"");return h.trim(c)};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*\(/,"-").replace(/\)/,""));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 p=h.tablesorter;h.fn.extend({tablesorter:p.construct});p.addParser({id:"text",is:function(){return!0},format:function(c,n){var m=n.config;c&&(c=h.trim(m.ignoreCase?c.toLocaleLowerCase(): c),c=m.sortLocaleCompare?p.replaceAccents(c):c);return c},type:"text"});p.addParser({id:"digit",is:function(c){return p.isDigit(c)},format:function(c,n){var m=p.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),n);return c&&"number"===typeof m?m:c?h.trim(c&&n.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"});p.addParser({id:"currency",is:function(c){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((c||"").replace(/[,. ]/g,""))},format:function(c, n){var m=p.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),n);return c&&"number"===typeof m?m:c?h.trim(c&&n.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"});p.addParser({id:"ipAddress",is:function(c){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(c)},format:function(c,h){var m,t=c?c.split("."):"",r="",u=t.length;for(m=0;mc.length},format:function(c,h){return c?p.formatFloat(c.replace(/%/g,""),h):c},type:"numeric"});p.addParser({id:"usLongDate", is:function(c){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(c)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(c)},format:function(c,h){return c?p.formatFloat((new Date(c.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",h):c},type:"numeric"});p.addParser({id:"shortDate",is:function(c){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((c||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(c,h,m,t){if(c){m=h.config; var r=m.headerList[t];t=r.dateFormat||p.getData(r,m.headers[t],"dateFormat")||m.dateFormat;c=c.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===t?c=c.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===t?c=c.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===t&&(c=c.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return c?p.formatFloat((new Date(c)).getTime()||"",h):c},type:"numeric"});p.addParser({id:"time",is:function(c){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(c)}, format:function(c,h){return c?p.formatFloat((new Date("2000/01/01 "+c.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",h):c},type:"numeric"});p.addParser({id:"metadata",is:function(){return!1},format:function(c,n,m){c=n.config;c=c.parserMetadataName?c.parserMetadataName:"sortValue";return h(m).metadata()[c]},type:"numeric"});p.addWidget({id:"zebra",priority:90,format:function(c,n,m){var t,r,u,y,D,A,E=RegExp(n.cssChildRow,"i"),B=n.$tbodies;n.debug&&(D=new Date);for(c=0;c':"";n.$headers=g(a).find(n.selectorHeaders).each(function(a){h=g(this);d=n.headers[a];n.headerContent[a]=g(this).html();k=n.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,f);n.onRenderTemplate&&(y=n.onRenderTemplate.apply(h,[a,k]))&&"string"===typeof y&&(k=y);g(this).html('
'+k+"
");n.onRenderHeader&&n.onRenderHeader.apply(h,[a]); this.column=b[this.parentNode.rowIndex+"-"+this.cellIndex];var c=e.getData(h,d,"sortInitialOrder")||n.sortInitialOrder;this.order=/^d/i.test(c)||1===c?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;r=e.getData(h,d,"lockedOrder")||!1;"undefined"!==typeof r&&!1!==r&&(this.order=this.lockedOrder=/^d/i.test(r)||1===r?[1,1,1]:[0,0,0]);h.addClass(e.css.header+" "+n.cssHeader);n.headerList[a]=this;h.parent().addClass(e.css.headerRow+" "+n.cssHeaderRow);h.attr("tabindex",0)});D(a);n.debug&&(l("Built headers:", q),c(n.$headers))}function F(a,b,d){var h=a.config;h.$table.find(h.selectorRemove).remove();x(a);z(a);G(h.$table,b,d)}function D(a){var b,d=a.config;d.$headers.each(function(a,c){b="false"===e.getData(c,d.headers[a],"sorter");c.sortDisabled=b;g(c)[b?"addClass":"removeClass"]("sorter-false")})}function H(a){var b,d,h,c=a.config,f=c.sortList,k=[e.css.sortAsc+" "+c.cssAsc,e.css.sortDesc+" "+c.cssDesc],r=g(a).find("tfoot tr").children().removeClass(k.join(" "));c.$headers.removeClass(k.join(" "));h=f.length; for(b=0;b"),d=g(a).width();g(a.tBodies[0]).find("tr:first").children("td:visible").each(function(){b.append(g("").css("width",parseInt(g(this).width()/ d*1E3,10)/10+"%"))});g(a).prepend(b)}}function M(a,b){var d,h,c,f=a.config,e=b||f.sortList;f.sortList=[];g.each(e,function(a,b){d=[parseInt(b[0],10),parseInt(b[1],10)];if(c=f.headerList[d[0]])f.sortList.push(d),h=g.inArray(d[1],c.order),c.count=0<=h?h:d[1]%(f.sortReset?3:2)})}function N(a,b,d){var h,c,f=a.config,k=!d[f.sortMultiSortKey],r=g(a);r.trigger("sortStart",a);b.count=d[f.sortResetKey]?2:(b.count+1)%(f.sortReset?3:2);f.sortRestart&&(c=b,f.$headers.each(function(){this===c||!k&&g(this).is("."+ e.css.sortDesc+",."+e.css.sortAsc)||(this.count=-1)}));c=b.column;if(k){f.sortList=[];if(null!==f.sortForce)for(h=f.sortForce,d=0;dh&&(f.sortList.push([c,h]),1h&&(f.sortList.push([c,h]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};e.css={table:"tablesorter",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc"}; e.log=c;e.benchmark=l;e.construct=function(a){return this.each(function(){var b=g.extend(!0,{},e.defaults,a);!this.hasInitialized&&e.buildTable&&"TABLE"!==this.tagName&&e.buildTable(this,b);e.setup(this,b)})};e.setup=function(a,b){if(!a||!a.tHead||0===a.tBodies.length||!0===a.hasInitialized)return b.debug?c("stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var d="",h=g(a),l=g.metadata;a.hasInitialized=!1;a.isProcessing=!0;a.config=b;g.data(a,"tablesorter", b);b.debug&&g.data(a,"startoveralltimer",new Date);b.supportsTextContent="x"===g("x")[0].textContent;b.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1'),d=g.fn.detach?b.detach():b.remove();d=g(a).find("span.tablesorter-savemyplace");b.insertAfter(d);d.remove();a.isProcessing=!1};e.clearTableBody=function(a){g(a)[0].config.$tbodies.empty()};e.restoreHeaders=function(a){var b=a.config;b.$table.find(b.selectorHeaders).each(function(a){g(this).find(".tablesorter-header-inner").length&&g(this).html(b.headerContent[a])})}; e.destroy=function(a,b,d){a=g(a)[0];if(a.hasInitialized){e.refreshWidgets(a,!0,!0);var c=g(a),l=a.config,f=c.find("thead:first"),k=f.find("tr."+e.css.headerRow).removeClass(e.css.headerRow+" "+l.cssHeaderRow),m=c.find("tfoot:first > tr").children("th, td");f.find("tr").not(k).remove();c.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter ")); l.$headers.add(m).removeClass([e.css.header,l.cssHeader,l.cssAsc,l.cssDesc,e.css.sortAsc,e.css.sortDesc].join(" ")).removeAttr("data-column");k.find(l.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter");e.restoreHeaders(a);!1!==b&&c.removeClass(e.css.table+" "+l.tableClass+" tablesorter-"+l.theme);a.hasInitialized=!1;"function"===typeof d&&d(a)}};e.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,hex:/^0x[0-9a-f]+$/i};e.sortNatural= function(a,b){if(a===b)return 0;var d,c,g,f,k,l;c=e.regex;if(g=parseInt(b.match(c.hex),16)){d=parseInt(a.match(c.hex),16);if(dg)return 1}d=a.replace(c.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");c=b.replace(c.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");l=Math.max(d.length,c.length);for(k=0;kf)return 1}return 0};e.sortText=function(a,b){return a>b?1:ag.inArray(k[h].id,f))&&(l.debug&&c("Refeshing widgets: Removing "+k[h].id),k[h].hasOwnProperty("remove")&&(k[h].remove(a,l,l.widgetOptions),l.widgetInit[k[h].id]=!1));!0!==d&&e.applyWidget(a,b)};e.getData=function(a,b,d){var c="";a=g(a);var e,f;if(!a.length)return"";e=g.metadata?a.metadata():!1;f=" "+(a.attr("class")||"");"undefined"!==typeof a.data(d)|| "undefined"!==typeof a.data(d.toLowerCase())?c+=a.data(d)||a.data(d.toLowerCase()):e&&"undefined"!==typeof e[d]?c+=e[d]:b&&"undefined"!==typeof b[d]?c+=b[d]:" "!==f&&f.match(" "+d+"-")&&(c=f.match(RegExp("\\s"+d+"-([\\w-]+)"))[1]||"");return g.trim(c)};e.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*\(/, "-").replace(/\)/,""));c=parseFloat(a);return isNaN(c)?g.trim(a):c};e.isDigit=function(a){return isNaN(a)?/^[\-+(]?\d+[)]?$/.test(a.toString().replace(/[,.'"\s]/g,"")):!0}}});var p=g.tablesorter;g.fn.extend({tablesorter:p.construct});p.addParser({id:"text",is:function(){return!0},format:function(c,l){var m=l.config;c&&(c=g.trim(m.ignoreCase?c.toLocaleLowerCase():c),c=m.sortLocaleCompare?p.replaceAccents(c):c);return c},type:"text"});p.addParser({id:"digit",is:function(c){return p.isDigit(c)},format:function(c, l){var m=p.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),l);return c&&"number"===typeof m?m:c?g.trim(c&&l.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"});p.addParser({id:"currency",is:function(c){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((c||"").replace(/[,. ]/g,""))},format:function(c,l){var m=p.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),l);return c&&"number"===typeof m?m:c?g.trim(c&&l.config.ignoreCase?c.toLocaleLowerCase(): c):c},type:"numeric"});p.addParser({id:"ipAddress",is:function(c){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(c)},format:function(c,g){var m,u=c?c.split("."):"",x="",z=u.length;for(m=0;mc.length},format:function(c,g){return c?p.formatFloat(c.replace(/%/g,""),g):c},type:"numeric"});p.addParser({id:"usLongDate",is:function(c){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(c)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(c)},format:function(c,g){return c? p.formatFloat((new Date(c.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",g):c},type:"numeric"});p.addParser({id:"shortDate",is:function(c){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((c||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(c,g,m,u){if(c){m=g.config;var x=m.headerList[u];u=x.dateFormat||p.getData(x,m.headers[u],"dateFormat")||m.dateFormat;c=c.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===u?c=c.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/, "$3/$1/$2"):"ddmmyyyy"===u?c=c.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===u&&(c=c.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return c?p.formatFloat((new Date(c)).getTime()||"",g):c},type:"numeric"});p.addParser({id:"time",is:function(c){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(c)},format:function(c,g){return c?p.formatFloat((new Date("2000/01/01 "+c.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",g):c},type:"numeric"});p.addParser({id:"metadata", is:function(){return!1},format:function(c,l,m){c=l.config;c=c.parserMetadataName?c.parserMetadataName:"sortValue";return g(m).metadata()[c]},type:"numeric"});p.addWidget({id:"zebra",priority:90,format:function(c,l,m){var u,x,z,B,E,C,F=RegExp(l.cssChildRow,"i"),D=l.$tbodies;l.debug&&(E=new Date);for(c=0;c'),c.cssIcon&&n.find("."+d.css.icon).addClass(m.icons),q.hasClass("hasFilters")&& n.find(".tablesorter-filter-row").addClass(m.filterRow));g.each(n,function(a){h=g(this);k=d.css.icon?h.find("."+d.css.icon):h;this.sortDisabled?(h.removeClass(v),k.removeClass(v+" tablesorter-icon "+m.icons)):(l=q.hasClass("hasStickyHeaders")?q.find(B).find("th").eq(a).add(h):h,f=h.hasClass(d.css.sortAsc)?m.sortAsc:h.hasClass(d.css.sortDesc)?m.sortDesc:h.hasClass(d.css.header)?m.sortNone:"",h[f===m.sortNone?"removeClass":"addClass"](m.active),k.removeClass(v).addClass(f))});c.debug&&d.benchmark("Applying "+ u+" theme",a)},remove:function(e,c,b){e=c.$table;c="object"===typeof b.uitheme?"jui":b.uitheme||"jui";b="object"===typeof b.uitheme?b.uitheme:d.themes[d.themes.hasOwnProperty(c)?c:"jui"];var a=e.children("thead").children(),f=b.sortNone+" "+b.sortDesc+" "+b.sortAsc;e.removeClass("tablesorter-"+c+" "+b.table).find(d.css.header).removeClass(b.header);a.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(b.hover+" "+f+" "+b.active).find(".tablesorter-filter-row").removeClass(b.filterRow); a.find(".tablesorter-icon").removeClass(b.icons)}}); -d.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(e,c,b){var a,f,h,k,l,q,u,m,n,B=c.$table,v=c.$tbodies,s=c.sortList,x=s.length,r=c.widgetColumns&&c.widgetColumns.hasOwnProperty("css")?c.widgetColumns.css||r:b&&b.hasOwnProperty("columns")?b.columns||r:r;q=r.length-1;u=r.join(" ");c.debug&&(l=new Date);for(n=0;n=]/g}},format:function(e,c,b){if(c.parsers&&!c.$table.hasClass("hasFilters")){var a, f,h,k,l,q,u,m,n,B,v,s,x,r,w,t,p,E,A,F=d.formatFloat,N="",C=c.$headers,y=c.$table.addClass("hasFilters"),I=c.$tbodies,J=c.parsers.length,G,O,P,H=function(a){var f=g.isArray(a),h=f?a:d.getFilters(e),t=(h||[]).join("");f&&d.setFilters(y,h);b.filter_hideFilters&&y.find(".tablesorter-filter-row").trigger(""===t?"mouseleave":"mouseenter");if(N!==t||!1===a)if(y.trigger("filterStart",[h]),c.showProcessing)setTimeout(function(){Q(a,h,t);return!1},30);else return Q(a,h,t),!1},Q=function(K,k,q){var n,s,v,r, x,z,B,D,A,E;c.debug&&(B=new Date);for(h=0;h]=?/.test(l)){t=F(l.replace(b.filter_regex.nondigit,"").replace(b.filter_regex.operators,""),e);if(G[a]||"numeric"===c.parsers[a].type)w=c.parsers[a].format(""+l.replace(b.filter_regex.operators,""),e,C.eq(a),a),t=""===w||isNaN(w)?t:w;w=!G[a]&&"numeric"!==c.parsers[a].type||isNaN(t)||!c.cache[h].normalized[f]?isNaN(m)?F(m.replace(b.filter_regex.nondigit, ""),e):F(m,e):c.cache[h].normalized[f][a];/>/.test(l)&&(z=/>=/.test(l)?w>=t:w>t);/A&&(z=D,D=A,A=z);z=w>=D&&w<=A||""===D||""===A?!0:!1}else/[\?|\*]/.test(l)||/\s+OR\s+/.test(k[a])?(t=l.replace(/\s+OR\s+/gi,"|"),!C.filter('[data-column="'+a+'"]:last').hasClass("filter-match")&&/\|/.test(t)&&(t="^("+t+")$"),z=RegExp(t.replace(/\?/g, "\\S{1}").replace(/\*/g,"\\S*")).test(m)):(u=(m+p).indexOf(l),z=!b.filter_startsWith&&0<=u||b.filter_startsWith&&0===u);r=z?r?!0:!1:!1}n[f].style.display=r?"":"none";n.eq(f)[r?"removeClass":"addClass"](b.filter_filteredRow);if(v.length)v[r?"show":"hide"]()}d.processTbody(e,K,!1)}N=q;y.data("lastSearch",k);c.debug&&d.benchmark("Completed filter widget search",B);y.trigger("applyWidgets");y.trigger("filterEnd")},R=function(a,t,m){var p,l,n=[];a=parseInt(a,10);l=C.filter('[data-column="'+a+'"]:last'); p='";for(h=0;h"+n[h]+"":"";y.find("thead").find('select.tablesorter-filter[data-column="'+a+'"]')[t?"html":"append"](p)},L=function(c){for(a=0;a';for(a=0;a";c.$filters=g(p+="").appendTo(y.find("thead").eq(0)).find("td");for(a=0;a").appendTo(c.$filters.eq(a)):(b.filter_formatter&&g.isFunction(b.filter_formatter[a])? ((p=b.filter_formatter[a](c.$filters.eq(a),a))&&0===p.length&&(p=c.$filters.eq(a).children("input")),p&&(0===p.parent().length||p.parent().length&&p.parent()[0]!==c.$filters[a])&&c.$filters.eq(a).append(p)):p=g('').appendTo(c.$filters.eq(a)),p&&p.attr("placeholder",r.data("placeholder")||r.attr("data-placeholder")||"")),p&&(p.addClass("tablesorter-filter "+b.filter_cssFilter).attr("data-column",a),E&&(p.addClass("disabled")[0].disabled=!0))}y.bind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(".tsfilter "), function(a,b){/(search|filterReset|filterEnd)/.test(a.type)||(a.stopPropagation(),L(!0));"filterReset"===a.type&&M([]);"filterEnd"===a.type?L(!0):(b="search"===a.type?b:"updateComplete"===a.type?y.data("lastSearch"):"",M(b));return!1}).find("input.tablesorter-filter").bind("keyup search",function(a,c){if(27===a.which)this.value="";else if("number"===typeof b.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===b.filter_liveSearch&& 13!==a.which||37<=a.which&&40>=a.which||13!==a.which&&!1===b.filter_liveSearch))return;M(c)});G=C.map(function(a){return d.getData?"parsed"===d.getData(C.filter('[data-column="'+a+'"]:last'),c.headers[a],"filter"):g(this).hasClass("filter-parsed")}).get();b.filter_reset&&g(document).delegate(b.filter_reset,"click.tsfilter",function(){y.trigger("filterReset")});if(b.filter_functions)for(A in b.filter_functions)if(b.filter_functions.hasOwnProperty(A)&&"string"===typeof A)if(p=C.filter('[data-column="'+ A+'"]:last'),q="",!0===b.filter_functions[A]&&!p.hasClass("filter-false"))R(A);else if("string"===typeof A&&!p.hasClass("filter-false")){for(v in b.filter_functions[A])"string"===typeof v&&(q+=""===q?'":"",q+='");y.find("thead").find('select.tablesorter-filter[data-column="'+A+'"]').append(q)}L(!0);y.find("select.tablesorter-filter").bind("change search",function(a,b){H(b)});b.filter_hideFilters&& y.find(".tablesorter-filter-row").addClass("hideme").bind("mouseenter mouseleave",function(a){var b;s=g(this);clearTimeout(n);n=setTimeout(function(){/enter|over/.test(a.type)?s.removeClass("hideme"):g(document.activeElement).closest("tr")[0]!==s[0]&&(b=y.find(".tablesorter-filter").map(function(){return g(this).val()||""}).get().join(""),""===b&&s.addClass("hideme"))},200)}).find("input, select").bind("focus blur",function(a){x=g(this).closest("tr");clearTimeout(n);n=setTimeout(function(){if(""=== y.find(".tablesorter-filter").map(function(){return g(this).val()||""}).get().join(""))x["focus"===a.type?"removeClass":"addClass"]("hideme")},200)});c.showProcessing&&y.bind("filterStart.tsfilter filterEnd.tsfilter",function(a,b){var c=b?y.find("."+d.css.header).filter("[data-column]").filter(function(){return""!==b[g(this).data("column")]}):"";d.isProcessing(y[0],"filterStart"===a.type,b?c:"")});c.debug&&d.benchmark("Applying Filter widget",O);y.bind("tablesorter-initialized",function(){if(q=d.getFilters(e)){for(a= 0;a'), c.cssIcon&&p.find("."+d.css.icon).addClass(h.icons),q.hasClass("hasFilters")&&p.find(".tablesorter-filter-row").addClass(h.filterRow));g.each(p,function(a){l=g(this);k=d.css.icon?l.find("."+d.css.icon):l;this.sortDisabled?(l.removeClass(v),k.removeClass(v+" tablesorter-icon "+h.icons)):(m=q.hasClass("hasStickyHeaders")?q.find(B).find("th").eq(a).add(l):l,e=l.hasClass(d.css.sortAsc)?h.sortAsc:l.hasClass(d.css.sortDesc)?h.sortDesc:l.hasClass(d.css.header)?h.sortNone:"",l[e===h.sortNone?"removeClass": "addClass"](h.active),k.removeClass(v).addClass(e))});c.debug&&d.benchmark("Applying "+u+" theme",a)},remove:function(f,c,b){f=c.$table;c="object"===typeof b.uitheme?"jui":b.uitheme||"jui";b="object"===typeof b.uitheme?b.uitheme:d.themes[d.themes.hasOwnProperty(c)?c:"jui"];var a=f.children("thead").children(),e=b.sortNone+" "+b.sortDesc+" "+b.sortAsc;f.removeClass("tablesorter-"+c+" "+b.table).find(d.css.header).removeClass(b.header);a.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(b.hover+ " "+e+" "+b.active).find(".tablesorter-filter-row").removeClass(b.filterRow);a.find(".tablesorter-icon").removeClass(b.icons)}}); +d.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(f,c,b){var a,e,l,k,m,q,u,h,p,B=c.$table,v=c.$tbodies,t=c.sortList,x=t.length,r=c.widgetColumns&&c.widgetColumns.hasOwnProperty("css")?c.widgetColumns.css||r:b&&b.hasOwnProperty("columns")?b.columns||r:r;q=r.length-1;u=r.join(" ");c.debug&&(m=new Date);for(p=0;p=]/g}},format:function(f, c,b){if(!c.$table.hasClass("hasFilters")&&(c.parsers||!c.parsers&&b.filter_serversideFiltering)){var a,e,l,k,m,q,u,h,p,B,v,t,x,r,w,s,n,E,A,F=d.formatFloat,N="",C=c.$headers,y=c.$table.addClass("hasFilters"),I=c.$tbodies,J=c.columns||c.$headers.filter("th").length,G,O,P,H=function(a){var e=g.isArray(a),s=e?a:d.getFilters(f),l=(s||[]).join("");e&&d.setFilters(y,s);b.filter_hideFilters&&y.find(".tablesorter-filter-row").trigger(""===l?"mouseleave":"mouseenter");if(N!==l||!1===a)if(y.trigger("filterStart", [s]),c.showProcessing)setTimeout(function(){Q(a,s,l);return!1},30);else return Q(a,s,l),!1},Q=function(K,k,q){var p,t,v,r,x,z,B,D,A,E;c.debug&&(B=new Date);for(l=0;l]=?/.test(m)){s=F(m.replace(b.filter_regex.nondigit,"").replace(b.filter_regex.operators,""),f);if(G[a]||"numeric"===c.parsers[a].type)w=c.parsers[a].format(""+m.replace(b.filter_regex.operators,""),f, C.eq(a),a),s=""===w||isNaN(w)?s:w;w=!G[a]&&"numeric"!==c.parsers[a].type||isNaN(s)||!c.cache[l].normalized[e]?isNaN(h)?F(h.replace(b.filter_regex.nondigit,""),f):F(h,f):c.cache[l].normalized[e][a];/>/.test(m)&&(z=/>=/.test(m)?w>=s:w>s);/A&&(z=D,D=A,A=z);z=w>=D&&w<=A||""===D||""===A?!0:!1}else/[\?|\*]/.test(m)||/\s+OR\s+/.test(k[a])? (s=m.replace(/\s+OR\s+/gi,"|"),!C.filter('[data-column="'+a+'"]:last').hasClass("filter-match")&&/\|/.test(s)&&(s="^("+s+")$"),z=RegExp(s.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*")).test(h)):(u=(h+n).indexOf(m),z=!b.filter_startsWith&&0<=u||b.filter_startsWith&&0===u);r=z?r?!0:!1:!1}p[e].style.display=r?"":"none";p.eq(e)[r?"removeClass":"addClass"](b.filter_filteredRow);if(v.length)v[r?"show":"hide"]()}d.processTbody(f,K,!1)}N=q;y.data("lastSearch",k);c.debug&&d.benchmark("Completed filter widget search", B);y.trigger("applyWidgets");y.trigger("filterEnd")},R=function(a,f,s){var m,h,n=[];a=parseInt(a,10);h=C.filter('[data-column="'+a+'"]:last');m='";for(l=0;l"+n[l]+"":"";y.find("thead").find('select.tablesorter-filter[data-column="'+a+'"]')[f?"html":"append"](m)},L=function(c){for(a=0;a';for(a=0;a";c.$filters=g(n+="").appendTo(y.find("thead").eq(0)).find("td");for(a=0;a").appendTo(c.$filters.eq(a)):(b.filter_formatter&&g.isFunction(b.filter_formatter[a])?((n=b.filter_formatter[a](c.$filters.eq(a),a))&&0===n.length&&(n=c.$filters.eq(a).children("input")),n&&(0===n.parent().length||n.parent().length&&n.parent()[0]!==c.$filters[a])&&c.$filters.eq(a).append(n)):n=g('').appendTo(c.$filters.eq(a)),n&&n.attr("placeholder",r.data("placeholder")||r.attr("data-placeholder")||"")),n&&(n.addClass("tablesorter-filter "+ b.filter_cssFilter).attr("data-column",a),E&&(n.addClass("disabled")[0].disabled=!0))}y.bind("addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(".tsfilter "),function(a,b){/(search|filterReset|filterEnd)/.test(a.type)||(a.stopPropagation(),L(!0));"filterReset"===a.type&&M([]);"filterEnd"===a.type?L(!0):(b="search"===a.type?b:"updateComplete"===a.type?y.data("lastSearch"):"",M(b));return!1}).find("input.tablesorter-filter").bind("keyup search", function(a,c){if(27===a.which)this.value="";else if("number"===typeof b.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===b.filter_liveSearch&&13!==a.which||37<=a.which&&40>=a.which||13!==a.which&&!1===b.filter_liveSearch))return;M(c)});G=C.map(function(a){return d.getData?"parsed"===d.getData(C.filter('[data-column="'+a+'"]:last'),c.headers[a],"filter"):g(this).hasClass("filter-parsed")}).get();b.filter_reset&&g(document).delegate(b.filter_reset, "click.tsfilter",function(){y.trigger("filterReset")});if(b.filter_functions)for(A in b.filter_functions)if(b.filter_functions.hasOwnProperty(A)&&"string"===typeof A)if(n=C.filter('[data-column="'+A+'"]:last'),q="",!0===b.filter_functions[A]&&!n.hasClass("filter-false"))R(A);else if("string"===typeof A&&!n.hasClass("filter-false")){for(v in b.filter_functions[A])"string"===typeof v&&(q+=""===q?'":"",q+='");y.find("thead").find('select.tablesorter-filter[data-column="'+A+'"]').append(q)}L(!0);y.find("select.tablesorter-filter").bind("change search",function(a,b){H(b)});b.filter_hideFilters&&y.find(".tablesorter-filter-row").addClass("hideme").bind("mouseenter mouseleave",function(a){var b;t=g(this);clearTimeout(p);p=setTimeout(function(){/enter|over/.test(a.type)?t.removeClass("hideme"):g(document.activeElement).closest("tr")[0]!==t[0]&&(b=y.find(".tablesorter-filter").map(function(){return g(this).val()|| ""}).get().join(""),""===b&&t.addClass("hideme"))},200)}).find("input, select").bind("focus blur",function(a){x=g(this).closest("tr");clearTimeout(p);p=setTimeout(function(){if(""===y.find(".tablesorter-filter").map(function(){return g(this).val()||""}).get().join(""))x["focus"===a.type?"removeClass":"addClass"]("hideme")},200)});c.showProcessing&&y.bind("filterStart.tsfilter filterEnd.tsfilter",function(a,b){var c=b?y.find("."+d.css.header).filter("[data-column]").filter(function(){return""!==b[g(this).data("column")]}): "";d.isProcessing(y[0],"filterStart"===a.type,b?c:"")});c.debug&&d.benchmark("Applying Filter widget",O);y.bind("tablesorter-initialized",function(){if(q=d.getFilters(f)){for(a=0;ad.top&&ea.which&&8!==a.which||37<=a.which&&40>=a.which)){r=!0;a=g(this);var d=a.attr("data-column");c.$filters.find(".tablesorter-filter").eq(d).val(a.val()).trigger("search");setTimeout(function(){r=!1},b.filter_searchDelay)}});a.trigger("stickyHeadersInit")}},remove:function(e,c,b){c.$table.removeClass("hasStickyHeaders").unbind("sortEnd.tsSticky pagerComplete.tsSticky").find(".tablesorter-stickyHeader").remove();b.$sticky&&b.$sticky.length&&b.$sticky.remove();g(".hasStickyHeaders").length|| g(window).unbind("scroll.tsSticky resize.tsSticky");d.addHeaderResizeEvent(e,!1)}}); -d.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1},format:function(e,c,b){if(!c.$table.hasClass("hasResizable")){c.$table.addClass("hasResizable");var a,f,h,k,l={},q,u,m,n,B=c.$table,v=0,s=null,x=null,r=20>Math.abs(B.parent().width()-B.width()),w=function(){d.storage&&s&&(l[s.index()]=s.width(),l[x.index()]=x.width(),s.width(l[s.index()]),x.width(l[x.index()]),!1!==b.resizable&& d.storage(e,"tablesorter-resizable",l));v=0;s=x=null;g(window).trigger("resize")};if(l=d.storage&&!1!==b.resizable?d.storage(e,"tablesorter-resizable"):{})for(k in l)!isNaN(k)&&k');b.resizable_addLastColumn||(q=q.slice(0,-1));u=u?u.add(q):q});u.each(function(){a=g(this);k=parseInt(a.css("padding-right"),10)+10;f='
';a.find(".tablesorter-wrapper").append(f)}).bind("mousemove.tsresize",function(a){0!== v&&s&&(m=a.pageX-v,n=s.width(),s.width(n+m),s.width()!==n&&r&&x.width(x.width()-m),v=a.pageX)}).bind("mouseup.tsresize",function(){w()}).find(".tablesorter-resizer,.tablesorter-resizer-grip").bind("mousedown",function(a){s=g(a.target).closest("th");f=c.$headers.filter('[data-column="'+s.attr("data-column")+'"]');1d.top&&fa.which&&8!==a.which||37<=a.which&&40>=a.which)){r=!0;a=g(this);var d=a.attr("data-column");c.$filters.find(".tablesorter-filter").eq(d).val(a.val()).trigger("search");setTimeout(function(){r=!1},b.filter_searchDelay)}});a.trigger("stickyHeadersInit")}},remove:function(f,c,b){c.$table.removeClass("hasStickyHeaders").unbind("sortEnd.tsSticky pagerComplete.tsSticky").find(".tablesorter-stickyHeader").remove();b.$sticky&&b.$sticky.length&& b.$sticky.remove();g(".hasStickyHeaders").length||g(window).unbind("scroll.tsSticky resize.tsSticky");d.addHeaderResizeEvent(f,!1)}}); +d.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1},format:function(f,c,b){if(!c.$table.hasClass("hasResizable")){c.$table.addClass("hasResizable");var a,e,l,k,m={},q,u,h,p,B=c.$table,v=0,t=null,x=null,r=20>Math.abs(B.parent().width()-B.width()),w=function(){d.storage&&t&&(m[t.index()]=t.width(),m[x.index()]=x.width(),t.width(m[t.index()]), x.width(m[x.index()]),!1!==b.resizable&&d.storage(f,"tablesorter-resizable",m));v=0;t=x=null;g(window).trigger("resize")};if(m=d.storage&&!1!==b.resizable?d.storage(f,"tablesorter-resizable"):{})for(k in m)!isNaN(k)&&k');b.resizable_addLastColumn||(q=q.slice(0,-1));u=u?u.add(q):q});u.each(function(){a=g(this);k=parseInt(a.css("padding-right"),10)+10;e='
';a.find(".tablesorter-wrapper").append(e)}).bind("mousemove.tsresize", function(a){0!==v&&t&&(h=a.pageX-v,p=t.width(),t.width(p+h),t.width()!==p&&r&&x.width(x.width()-h),v=a.pageX)}).bind("mouseup.tsresize",function(){w()}).find(".tablesorter-resizer,.tablesorter-resizer-grip").bind("mousedown",function(a){t=g(a.target).closest("th");e=c.$headers.filter('[data-column="'+t.attr("data-column")+'"]');1