From 8bd77b02f62ccd78bd239d5c534a13d7dd46eace Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 20 Feb 2014 17:25:49 -0600 Subject: [PATCH] version bump --- README.md | 11 ++++++++++ bower.json | 2 +- js/jquery.tablesorter.js | 2 +- js/jquery.tablesorter.min.js | 4 ++-- js/jquery.tablesorter.widgets.js | 2 +- js/jquery.tablesorter.widgets.min.js | 33 ++++++++++++++-------------- package.json | 2 +- tablesorter.jquery.json | 2 +- 8 files changed, 34 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index e476bdf7..423fc478 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,17 @@ tablesorter can successfully parse and sort many types of data including linked View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change). +#### Version 2.15.2 (2/20/2014) + +* Filter widget + * Fix js error on empty tables & multiple rows in thead while managing `c.parsers`. Fixes [issue #507](https://github.com/Mottie/tablesorter/issues/507). + * `filter-onlyAvail` now updates all selects properly. Fixes [issue #473](https://github.com/Mottie/tablesorter/issues/473). + * Fix annoying filter search caret jumping to end while typing +* Doc updates + * Added `delayInit` demo ([pull #504](https://github.com/Mottie/tablesorter/issues/473)) - thanks [Infeligo](https://github.com/Infeligo)! + * Fixed some markup issues & rearranged some links + * Updated minified widget file date. Fixes [issue #505](https://github.com/Mottie/tablesorter/issues/505) + #### Version 2.15.1 (2/19/2014) * Filter widget diff --git a/bower.json b/bower.json index ca166e2d..cab0d445 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tablesorter", - "version": "2.15.1", + "version": "2.15.2", "dependencies": { "jquery": ">=1.2.6" } diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index e3b338eb..47a8bd7d 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,5 +1,5 @@ /**! -* TableSorter 2.15.1 - Client-side table sorting with ease! +* TableSorter 2.15.2 - Client-side table sorting with ease! * @requires jQuery v1.2.6+ * * Copyright (c) 2007 Christian Bach diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index e933ba40..de0353fa 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.15.1 min - Client-side table sorting with ease! +* TableSorter 2.15.2 min - Client-side table sorting with ease! * Copyright (c) 2007 Christian Bach */ -!(function(g){g.extend({tablesorter:new function(){function d(){var a=arguments[0],b=1':"";l.$headers=g(a).find(l.selectorHeaders).each(function(a){h=g(this);c=l.headers[a];l.headerContent[a]=g(this).html();k=l.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,w);l.onRenderTemplate&&(f=l.onRenderTemplate.apply(h,[a,k]))&&"string"===typeof f&&(k=f);g(this).html('
'+k+"
");l.onRenderHeader&&l.onRenderHeader.apply(h,[a]);this.column= b[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=C(e.getData(h,c,"sortInitialOrder")||l.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;n=e.getData(h,c,"lockedOrder")||!1;"undefined"!==typeof n&&!1!==n&&(this.order=this.lockedOrder=C(n)?[1,1,1]:[0,0,0]);h.addClass(e.css.header+" "+l.cssHeader);l.headerList[a]=this;h.parent().addClass(e.css.headerRow+" "+l.cssHeaderRow).attr("role","row");l.tabIndex&&h.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});G(a);l.debug&& (u("Built headers:",q),d(l.$headers))}function B(a,b,c){var h=a.config;h.$table.find(h.selectorRemove).remove();t(a);v(a);H(h.$table,b,c)}function G(a){var b,c,h=a.config;h.$headers.each(function(f,d){c=g(d);b="false"===e.getData(d,h.headers[f],"sorter");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 F(a){var b,c,h,f=a.config,d=f.sortList,k=e.css.sortNone+" "+f.cssNone,n=[e.css.sortAsc+ " "+f.cssAsc,e.css.sortDesc+" "+f.cssDesc],q=["ascending","descending"],l=g(a).find("tfoot tr").children().removeClass(n.join(" "));f.$headers.removeClass(n.join(" ")).addClass(k).attr("aria-sort","none");h=d.length;for(b=0;b"),c=g(a).width();g(a.tBodies[0]).find("tr:first").children("td:visible").each(function(){b.append(g("").css("width", parseInt(g(this).width()/c*1E3,10)/10+"%"))});g(a).prepend(b)}}function M(a,b){var c,h,f,e=a.config,d=b||e.sortList;e.sortList=[];g.each(d,function(a,b){c=[parseInt(b[0],10),parseInt(b[1],10)];if(f=e.$headers[c[0]])e.sortList.push(c),h=g.inArray(c[1],f.order),f.count=0<=h?h:c[1]%(e.sortReset?3:2)})}function N(a,b){return a&&a[b]?a[b].type||"":""}function O(a,b,c){var h,f,d,k=a.config,n=!c[k.sortMultiSortKey],q=g(a);q.trigger("sortStart",a);b.count=c[k.sortResetKey]?2:(b.count+1)%(k.sortReset?3:2); k.sortRestart&&(f=b,k.$headers.each(function(){this===f||!n&&g(this).is("."+e.css.sortDesc+",."+e.css.sortAsc)||(this.count=-1)}));f=b.column;if(n){k.sortList=[];if(null!==k.sortForce)for(h=k.sortForce,c=0;ch&&(k.sortList.push([f,h]),1h&&(k.sortList.push([f,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",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};e.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"};e.log=d;e.benchmark=u;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? d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var c="",h=g(a),f=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'),c=g.fn.detach?b.detach():b.remove();c=g(a).find("span.tablesorter-savemyplace");b.insertAfter(c);c.remove();a.isProcessing=!1};e.clearTableBody=function(a){g(a)[0].config.$tbodies.empty()};e.bindEvents=function(a,b){a=g(a)[0];var c,h=a.config;b.find(h.selectorSort).add(b.filter(h.selectorSort)).unbind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keyup.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keyup.tablesorter", function(b,d){var e;e=b.type;if(!(1!==(b.which||b.button)&&!/sort|keyup/.test(e)||"keyup"===e&&13!==b.which||"mouseup"===e&&!0!==d&&250<(new Date).getTime()-c)){if("mousedown"===e)return c=(new Date).getTime(),"INPUT"===b.target.tagName?"":!h.cancelSelection;h.delayInit&&m(h.cache)&&v(a);e=/TH|TD/.test(this.tagName)?this:g(this).parents("th, td")[0];e.sortDisabled||O(a,e,b)}});h.cancelSelection&&b.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};e.restoreHeaders= function(a){var b=g(a)[0].config;b.$table.find(b.selectorHeaders).each(function(a){g(this).find("."+e.css.headerIn).length&&g(this).html(b.headerContent[a])})};e.destroy=function(a,b,c){a=g(a)[0];if(a.hasInitialized){e.refreshWidgets(a,!0,!0);var h=g(a),f=a.config,d=h.find("thead:first"),k=d.find("tr."+e.css.headerRow).removeClass(e.css.headerRow+" "+f.cssHeaderRow),n=h.find("tfoot:first > tr").children("th, td");d.find("tr").not(k).remove();h.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter ")); f.$headers.add(n).removeClass([e.css.header,f.cssHeader,f.cssAsc,f.cssDesc,e.css.sortAsc,e.css.sortDesc,e.css.sortNone].join(" ")).removeAttr("data-column");k.find(f.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter");e.restoreHeaders(a);!1!==b&&h.removeClass(e.css.table+" "+f.tableClass+" tablesorter-"+f.theme);a.hasInitialized=!1;"function"===typeof c&&c(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 c,h,f,d,g,n;h=e.regex;if(h.hex.test(b)){c=parseInt(a.match(h.hex),16);f=parseInt(b.match(h.hex),16);if(cf)return 1}c=a.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");h=b.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");n=Math.max(c.length,h.length);for(g=0;gd)return 1}return 0};e.sortNaturalAsc=function(a,b,c,d,f){if(a===b)return 0;c=f.string[f.empties[c]||f.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:c||1:e.sortNatural(a,b)};e.sortNaturalDesc=function(a,b,c,d,f){if(a===b)return 0;c=f.string[f.empties[c]||f.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:-c||-1:e.sortNatural(b, a)};e.sortText=function(a,b){return a>b?1:ag.inArray(k[h].id,m))&&(f.debug&&d('Refeshing widgets: Removing "'+k[h].id+'"'),k[h].hasOwnProperty("remove")&&f.widgetInit[k[h].id]&&(k[h].remove(a,f,f.widgetOptions),f.widgetInit[k[h].id]=!1));!0!==c&&e.applyWidget(a,b)};e.getData=function(a,b,c){var d="";a=g(a);var f,e;if(!a.length)return"";f=g.metadata?a.metadata():!1;e=" "+(a.attr("class")||"");"undefined"!==typeof a.data(c)||"undefined"!==typeof a.data(c.toLowerCase())? d+=a.data(c)||a.data(c.toLowerCase()):f&&"undefined"!==typeof f[c]?d+=f[c]:b&&"undefined"!==typeof b[c]?d+=b[c]:" "!==e&&e.match(" "+c+"-")&&(d=e.match(RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return g.trim(d)};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*\(([.\d]+)\)/,"-$1"));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(d,u){var m=u.config;d&&(d=g.trim(m.ignoreCase?d.toLocaleLowerCase():d),d=m.sortLocaleCompare?p.replaceAccents(d):d);return d},type:"text"});p.addParser({id:"digit",is:function(d){return p.isDigit(d)},format:function(d,u){var m=p.formatFloat((d||"").replace(/[^\w,. \-()]/g, ""),u);return d&&"number"===typeof m?m:d?g.trim(d&&u.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});p.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,u){var m=p.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),u);return d&&"number"===typeof m?m:d?g.trim(d&&u.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});p.addParser({id:"ipAddress", is:function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},format:function(d,g){var m,s=d?d.split("."):"",t="",v=s.length;for(m=0;md.length},format:function(d,g){return d?p.formatFloat(d.replace(/%/g,""),g):d},type:"numeric"});p.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,g){return d?p.formatFloat((new Date(d.replace(/(\S)([AP]M)$/i, "$1 $2"))).getTime()||"",g):d},type:"numeric"});p.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,g,m,s){if(d){m=g.config;var t=m.$headers.filter("[data-column="+s+"]:last");s=t.length&&t[0].dateFormat||p.getData(t,m.headers[s],"dateFormat")||m.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===s?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/, "$3/$1/$2"):"ddmmyyyy"===s?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===s&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return d?p.formatFloat((new Date(d)).getTime()||"",g):d},type:"numeric"});p.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,g){return d?p.formatFloat((new Date("2000/01/01 "+d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",g):d},type:"numeric"});p.addParser({id:"metadata", is:function(){return!1},format:function(d,p,m){d=p.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return g(m).metadata()[d]},type:"numeric"});p.addWidget({id:"zebra",priority:90,format:function(d,u,m){var s,t,v,A,D,C,E=RegExp(u.cssChildRow,"i"),B=u.$tbodies;u.debug&&(D=new Date);for(d=0;d':"";l.$headers=g(a).find(l.selectorHeaders).each(function(a){h=g(this);c=l.headers[a];l.headerContent[a]=g(this).html();k=l.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,w);l.onRenderTemplate&&(f=l.onRenderTemplate.apply(h,[a,k]))&&"string"===typeof f&&(k=f);g(this).html('
'+k+"
");l.onRenderHeader&&l.onRenderHeader.apply(h,[a]);this.column= b[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=C(e.getData(h,c,"sortInitialOrder")||l.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;n=e.getData(h,c,"lockedOrder")||!1;"undefined"!==typeof n&&!1!==n&&(this.order=this.lockedOrder=C(n)?[1,1,1]:[0,0,0]);h.addClass(e.css.header+" "+l.cssHeader);l.headerList[a]=this;h.parent().addClass(e.css.headerRow+" "+l.cssHeaderRow).attr("role","row");l.tabIndex&&h.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});G(a);l.debug&& (u("Built headers:",q),d(l.$headers))}function B(a,b,c){var h=a.config;h.$table.find(h.selectorRemove).remove();t(a);v(a);H(h.$table,b,c)}function G(a){var b,c,h=a.config;h.$headers.each(function(f,d){c=g(d);b="false"===e.getData(d,h.headers[f],"sorter");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 F(a){var b,c,h,f=a.config,d=f.sortList,k=e.css.sortNone+" "+f.cssNone,n=[e.css.sortAsc+ " "+f.cssAsc,e.css.sortDesc+" "+f.cssDesc],q=["ascending","descending"],l=g(a).find("tfoot tr").children().removeClass(n.join(" "));f.$headers.removeClass(n.join(" ")).addClass(k).attr("aria-sort","none");h=d.length;for(b=0;b"),c=g(a).width();g(a.tBodies[0]).find("tr:first").children("td:visible").each(function(){b.append(g("").css("width", parseInt(g(this).width()/c*1E3,10)/10+"%"))});g(a).prepend(b)}}function M(a,b){var c,h,f,e=a.config,d=b||e.sortList;e.sortList=[];g.each(d,function(a,b){c=[parseInt(b[0],10),parseInt(b[1],10)];if(f=e.$headers[c[0]])e.sortList.push(c),h=g.inArray(c[1],f.order),f.count=0<=h?h:c[1]%(e.sortReset?3:2)})}function N(a,b){return a&&a[b]?a[b].type||"":""}function O(a,b,c){var h,f,d,k=a.config,n=!c[k.sortMultiSortKey],q=g(a);q.trigger("sortStart",a);b.count=c[k.sortResetKey]?2:(b.count+1)%(k.sortReset?3:2); k.sortRestart&&(f=b,k.$headers.each(function(){this===f||!n&&g(this).is("."+e.css.sortDesc+",."+e.css.sortAsc)||(this.count=-1)}));f=b.column;if(n){k.sortList=[];if(null!==k.sortForce)for(h=k.sortForce,c=0;ch&&(k.sortList.push([f,h]),1h&&(k.sortList.push([f,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",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};e.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"};e.log=d;e.benchmark=u;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? d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var c="",h=g(a),f=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'),c=g.fn.detach?b.detach():b.remove();c=g(a).find("span.tablesorter-savemyplace");b.insertAfter(c);c.remove();a.isProcessing=!1};e.clearTableBody=function(a){g(a)[0].config.$tbodies.empty()};e.bindEvents=function(a,b){a=g(a)[0];var c,h=a.config;b.find(h.selectorSort).add(b.filter(h.selectorSort)).unbind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keyup.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keyup.tablesorter", function(b,d){var e;e=b.type;if(!(1!==(b.which||b.button)&&!/sort|keyup/.test(e)||"keyup"===e&&13!==b.which||"mouseup"===e&&!0!==d&&250<(new Date).getTime()-c)){if("mousedown"===e)return c=(new Date).getTime(),"INPUT"===b.target.tagName?"":!h.cancelSelection;h.delayInit&&m(h.cache)&&v(a);e=/TH|TD/.test(this.tagName)?this:g(this).parents("th, td")[0];e.sortDisabled||O(a,e,b)}});h.cancelSelection&&b.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};e.restoreHeaders= function(a){var b=g(a)[0].config;b.$table.find(b.selectorHeaders).each(function(a){g(this).find("."+e.css.headerIn).length&&g(this).html(b.headerContent[a])})};e.destroy=function(a,b,c){a=g(a)[0];if(a.hasInitialized){e.refreshWidgets(a,!0,!0);var h=g(a),f=a.config,d=h.find("thead:first"),k=d.find("tr."+e.css.headerRow).removeClass(e.css.headerRow+" "+f.cssHeaderRow),n=h.find("tfoot:first > tr").children("th, td");d.find("tr").not(k).remove();h.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter ")); f.$headers.add(n).removeClass([e.css.header,f.cssHeader,f.cssAsc,f.cssDesc,e.css.sortAsc,e.css.sortDesc,e.css.sortNone].join(" ")).removeAttr("data-column");k.find(f.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter");e.restoreHeaders(a);!1!==b&&h.removeClass(e.css.table+" "+f.tableClass+" tablesorter-"+f.theme);a.hasInitialized=!1;"function"===typeof c&&c(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 c,h,f,d,g,n;h=e.regex;if(h.hex.test(b)){c=parseInt(a.match(h.hex),16);f=parseInt(b.match(h.hex),16);if(cf)return 1}c=a.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");h=b.replace(h.chunk,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");n=Math.max(c.length,h.length);for(g=0;gd)return 1}return 0};e.sortNaturalAsc=function(a,b,c,d,f){if(a===b)return 0;c=f.string[f.empties[c]||f.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:c||1:e.sortNatural(a,b)};e.sortNaturalDesc=function(a,b,c,d,f){if(a===b)return 0;c=f.string[f.empties[c]||f.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:-c||-1:e.sortNatural(b, a)};e.sortText=function(a,b){return a>b?1:ag.inArray(k[h].id,m))&&(f.debug&&d('Refeshing widgets: Removing "'+k[h].id+'"'),k[h].hasOwnProperty("remove")&&f.widgetInit[k[h].id]&&(k[h].remove(a,f,f.widgetOptions),f.widgetInit[k[h].id]=!1));!0!==c&&e.applyWidget(a,b)};e.getData=function(a,b,c){var d="";a=g(a);var f,e;if(!a.length)return"";f=g.metadata?a.metadata():!1;e=" "+(a.attr("class")||"");"undefined"!==typeof a.data(c)||"undefined"!==typeof a.data(c.toLowerCase())? d+=a.data(c)||a.data(c.toLowerCase()):f&&"undefined"!==typeof f[c]?d+=f[c]:b&&"undefined"!==typeof b[c]?d+=b[c]:" "!==e&&e.match(" "+c+"-")&&(d=e.match(RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return g.trim(d)};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*\(([.\d]+)\)/,"-$1"));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(d,u){var m=u.config;d&&(d=g.trim(m.ignoreCase?d.toLocaleLowerCase():d),d=m.sortLocaleCompare?p.replaceAccents(d):d);return d},type:"text"});p.addParser({id:"digit",is:function(d){return p.isDigit(d)},format:function(d,u){var m=p.formatFloat((d||"").replace(/[^\w,. \-()]/g, ""),u);return d&&"number"===typeof m?m:d?g.trim(d&&u.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});p.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,u){var m=p.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),u);return d&&"number"===typeof m?m:d?g.trim(d&&u.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});p.addParser({id:"ipAddress", is:function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},format:function(d,g){var m,s=d?d.split("."):"",t="",v=s.length;for(m=0;md.length},format:function(d,g){return d?p.formatFloat(d.replace(/%/g,""),g):d},type:"numeric"});p.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,g){return d?p.formatFloat((new Date(d.replace(/(\S)([AP]M)$/i, "$1 $2"))).getTime()||"",g):d},type:"numeric"});p.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,g,m,s){if(d){m=g.config;var t=m.$headers.filter("[data-column="+s+"]:last");s=t.length&&t[0].dateFormat||p.getData(t,m.headers[s],"dateFormat")||m.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===s?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/, "$3/$1/$2"):"ddmmyyyy"===s?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===s&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return d?p.formatFloat((new Date(d)).getTime()||"",g):d},type:"numeric"});p.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,g){return d?p.formatFloat((new Date("2000/01/01 "+d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||"",g):d},type:"numeric"});p.addParser({id:"metadata", is:function(){return!1},format:function(d,p,m){d=p.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return g(m).metadata()[d]},type:"numeric"});p.addWidget({id:"zebra",priority:90,format:function(d,u,m){var s,t,v,A,D,C,E=RegExp(u.cssChildRow,"i"),B=u.$tbodies;u.debug&&(D=new Date);for(d=0;d'),a.cssIcon&&n.find("."+c.css.icon).addClass(l.icons),q.hasClass("hasFilters")&&n.find("."+c.css.filterRow).addClass(l.filterRow));k.each(n,function(){f=k(this);h=c.css.icon?f.find("."+c.css.icon):f;this.sortDisabled?(f.removeClass(v),h.removeClass(v+" "+l.icons)):(e=f.hasClass(c.css.sortAsc)?l.sortAsc:f.hasClass(c.css.sortDesc)? l.sortDesc:f.hasClass(c.css.header)?l.sortNone:"",f[e===l.sortNone?"removeClass":"addClass"](l.active),h.removeClass(v).addClass(e))});a.debug&&c.benchmark("Applying "+p+" theme",g)},remove:function(b,a,d){b=a.$table;a=a.theme||"jui";d=c.themes[a]||c.themes.jui;var g=b.children("thead").children(),e=d.sortNone+" "+d.sortDesc+" "+d.sortAsc;b.removeClass("tablesorter-"+a+" "+d.table).find(c.css.header).removeClass(d.header);g.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(d.hover+" "+ e+" "+d.active).find("."+c.css.filterRow).removeClass(d.filterRow);g.find("."+c.css.icon).removeClass(d.icons)}}); -c.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(b,a,d){var g,e,f,h,m,q,n,p,l=a.$table,v=a.$tbodies,s=a.sortList,u=s.length,w=d&&d.columns||["primary","secondary","tertiary"],x=w.length-1;n=w.join(" ");a.debug&&(g=new Date);for(f=0;f=]/g},types:{regex:function(b,a,d,g){if(c.filter.regex.regex.test(a)){var e; b=c.filter.regex.regex.exec(a);try{e=RegExp(b[1],b[2]).test(g)}catch(f){e=!1}return e}return null},operators:function(b,a,d,g,e,f,h,k,q){if(/^[<>]=?/.test(a)){var n,p;n=h.config;b=c.formatFloat(a.replace(c.filter.regex.operators,""),h);d=n.parsers[f];k=b;if(q[f]||"numeric"===d.type)n=d.format(""+a.replace(c.filter.regex.operators,""),h,n.$headers.eq(f),f),b="number"!==typeof b||""===n||isNaN(n)?b:n;n=!q[f]&&"numeric"!==d.type||isNaN(b)||!e?isNaN(g)?c.formatFloat(g.replace(c.filter.regex.nondigit, ""),h):c.formatFloat(g,h):e;/>/.test(a)&&(p=/>=/.test(a)?n>=b:n>b);/k&&(g=d,d=k,k=g);return a>=d&&a<=k||""===d||""===k}return null},wild:function(b,a,c,g,e,f,h,m,q,n){return/[\?|\*]/.test(a)||/\s+OR\s+/i.test(b)?(b=h.config,a=a.replace(/\s+OR\s+/gi,"|"),!b.$headers.filter('[data-column="'+f+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(n)?"("+a+")":"^("+a+")$"),RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g, "\\S*")).test(g)):null},fuzzy:function(b,a,c,g){if(/^~/.test(a)){b=0;c=g.length;var e=a.slice(1);for(a=0;a'+(f.data("placeholder")|| f.attr("data-placeholder")||"")+"":"",g+='");a.$table.find("thead").find("select."+c.css.filter+'[data-column="'+h+'"]').append(g)}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.tsfilter filterEnd.tsfilter",function(d,e){f=e?a.$table.find("."+c.css.header).filter("[data-column]").filter(function(){return""!== e[k(this).data("column")]}):"";c.isProcessing(b,"filterStart"===d.type,e?f:"")});a.debug&&c.benchmark("Applying Filter widget",q);a.$table.bind("tablesorter-initialized pagerInitialized",function(){m=c.filter.setDefaults(b,a,d)||[];m.length&&c.setFilters(b,m,!0);a.$table.trigger("filterFomatterUpdate");c.filter.checkFilters(b,m)});d.filter_initialized=!0;a.$table.trigger("filterInit")},setDefaults:function(b,a,d){var g=c.getFilters(b);d.filter_saveFilters&&c.storage&&(d=c.storage(b,"tablesorter-filters")|| [],(b=k.isArray(d))&&""===d.join("")||!b||(g=d));a.$table.data("lastSearch",g);return g},buildRow:function(b,a,d){var g,e,f,h=a.columns;e='';for(b=0;b";a.$filters=k(e+"").appendTo(a.$table.find("thead").eq(0)).find("td");for(b=0;b").appendTo(a.$filters.eq(b)):(d.filter_formatter&&k.isFunction(d.filter_formatter[b])?((e=d.filter_formatter[b](a.$filters.eq(b),b))&&0===e.length&&(e=a.$filters.eq(b).children("input")),e&&(0===e.parent().length||e.parent().length&&e.parent()[0]!==a.$filters[b])&&a.$filters.eq(b).append(e)):e=k('').appendTo(a.$filters.eq(b)),e&&e.attr("placeholder", g.data("placeholder")||g.attr("data-placeholder")||"")),e&&(g=(k.isArray(d.filter_cssFilter)?"undefined"!==typeof d.filter_cssFilter[b]?d.filter_cssFilter[b]||"":"":d.filter_cssFilter)||"",e.addClass(c.css.filter+" "+g).attr("data-column",b),f&&(e.addClass("disabled")[0].disabled=!0))},bindSearch:function(b,a,d){b=k(b)[0];a=k(a);if(a.length){var g=b.config,e=g.widgetOptions,f=e.filter_$externalFilters;!0!==d&&(e.filter_$anyMatch=a.filter('[data-column="all"]'),e.filter_$externalFilters=f&&f.length? e.filter_$externalFilters.add(a):a,c.setFilters(b,g.$table.data("lastSearch")||[],!1===d));a.attr("data-lastSearchTime",(new Date).getTime()).unbind("keyup search change").bind("keyup search change",function(a,d){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if("number"===typeof e.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===e.filter_liveSearch&&13!==a.which||37<=a.which&&40>= a.which||13!==a.which&&!1===e.filter_liveSearch))return;c.filter.searching(b,d||c.getFilters(b,!0),!0)});g.$table.bind("filterReset",function(){a.val("")})}},checkFilters:function(b,a,d){var g=b.config,e=g.widgetOptions,f=k.isArray(a),h=f?a:c.getFilters(b),m=(h||[]).join("");f&&c.setFilters(b,h,!1,!0!==d);e.filter_hideFilters&&g.$table.find("."+c.css.filterRow).trigger(""===m?"mouseleave":"mouseenter");if(g.lastCombinedFilter!==m||!1===a)if(!1===a&&(g.lastCombinedFilter=null),g.$table.trigger("filterStart", [h]),g.showProcessing)setTimeout(function(){c.filter.findRows(b,h,m);return!1},30);else return c.filter.findRows(b,h,m),!1},hideFilters:function(b,a){var d,g,e;a.$table.find("."+c.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(a){d=k(this);clearTimeout(e);e=setTimeout(function(){/enter|over/.test(a.type)?d.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==d[0]&&""===c.getFilters(b).join("")&&d.addClass("hideme")},200)}).find("input, select").bind("focus blur", function(a){g=k(this).closest("tr");clearTimeout(e);e=setTimeout(function(){if(""===c.getFilters(b).join(""))g["focus"===a.type?"removeClass":"addClass"]("hideme")},200)})},findRows:function(b,a,d){if(b.config.lastCombinedFilter!==d){var g,e,f,h,m,q,n,p,l,v,s,u,w,x,B,z,y,D,C,A,L,E,G,H,I,J,M,r=b.config,t=r.widgetOptions,N=r.columns,K=r.$tbodies,O=["range","notMatch","operators"],F=r.$headers.map(function(a){return r.parsers&&r.parsers[a].parsed||(c.getData?"parsed"===c.getData(r.$headers.filter('[data-column="'+ a+'"]:last'),r.headers[a],"filter"):k(this).hasClass("filter-parsed"))}).get();r.debug&&(L=new Date);for(q=0;qk.inArray(a,O)&&(z=c(E,G,I,J,M,N,b,t,F,H),null!==z))return C=z,!1}),A=null!==C?C:0<=(J+s).indexOf(G));for(l=0;l'+(p.data("placeholder")|| p.attr("data-placeholder")||"")+"";for(f=0;f"+n[g]+"":"";b.$table.find("thead").find("select."+c.css.filter+'[data-column="'+a+'"]')[d?"html":"append"](l)},buildDefault:function(b,a){var d,g,e=b.config,f=e.widgetOptions,h=e.columns;for(d=0;db.top&&cMath.abs(q.parent().width()-q.width()),s=function(){c.storage&&p&&l&&(m={},m[p.index()]= p.width(),m[l.index()]=l.width(),p.width(m[p.index()]),l.width(m[l.index()]),!1!==d.resizable&&c.storage(b,"tablesorter-resizable",m));n=0;p=l=null;k(window).trigger("resize")};if(m=c.storage&&!1!==d.resizable?c.storage(b,"tablesorter-resizable"):{})for(h in m)!isNaN(h)&&h');d.resizable_addLastColumn||(f=f.slice(0,-1));e=e?e.add(f):f});e.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+c.css.wrapper).append('
')}).bind("mousemove.tsresize",function(a){if(0!==n&&p){var b=a.pageX-n,c=p.width();p.width(c+b);p.width()!==c&&v&&l.width(l.width()-b);n=a.pageX}}).bind("mouseup.tsresize",function(){s()}).find("."+c.css.resizer+",."+c.css.grip).bind("mousedown",function(b){p=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+p.attr("data-column")+'"]');1'),a.cssIcon&&n.find("."+c.css.icon).addClass(m.icons),q.hasClass("hasFilters")&&n.find("."+c.css.filterRow).addClass(m.filterRow));l.each(n,function(){f=l(this);h=c.css.icon?f.find("."+c.css.icon):f;this.sortDisabled?(f.removeClass(v),h.removeClass(v+" "+m.icons)):(e=f.hasClass(c.css.sortAsc)?m.sortAsc:f.hasClass(c.css.sortDesc)? m.sortDesc:f.hasClass(c.css.header)?m.sortNone:"",f[e===m.sortNone?"removeClass":"addClass"](m.active),h.removeClass(v).addClass(e))});a.debug&&c.benchmark("Applying "+p+" theme",g)},remove:function(b,a,d){b=a.$table;a=a.theme||"jui";d=c.themes[a]||c.themes.jui;var g=b.children("thead").children(),e=d.sortNone+" "+d.sortDesc+" "+d.sortAsc;b.removeClass("tablesorter-"+a+" "+d.table).find(c.css.header).removeClass(d.header);g.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(d.hover+" "+ e+" "+d.active).find("."+c.css.filterRow).removeClass(d.filterRow);g.find("."+c.css.icon).removeClass(d.icons)}}); +c.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(b,a,d){var g,e,f,h,k,q,n,p,m=a.$table,v=a.$tbodies,s=a.sortList,u=s.length,w=d&&d.columns||["primary","secondary","tertiary"],x=w.length-1;n=w.join(" ");a.debug&&(g=new Date);for(f=0;f=]/g},types:{regex:function(b,a,d,g){if(c.filter.regex.regex.test(a)){var e; b=c.filter.regex.regex.exec(a);try{e=RegExp(b[1],b[2]).test(g)}catch(f){e=!1}return e}return null},operators:function(b,a,d,g,e,f,h,k,l){if(/^[<>]=?/.test(a)){var n,p;n=h.config;b=c.formatFloat(a.replace(c.filter.regex.operators,""),h);d=n.parsers[f];k=b;if(l[f]||"numeric"===d.type)n=d.format(""+a.replace(c.filter.regex.operators,""),h,n.$headers.eq(f),f),b="number"!==typeof b||""===n||isNaN(n)?b:n;n=!l[f]&&"numeric"!==d.type||isNaN(b)||!e?isNaN(g)?c.formatFloat(g.replace(c.filter.regex.nondigit, ""),h):c.formatFloat(g,h):e;/>/.test(a)&&(p=/>=/.test(a)?n>=b:n>b);/k&&(g=d,d=k,k=g);return a>=d&&a<=k||""===d||""===k}return null},wild:function(b,a,c,g,e,f,h,k,q,n){return/[\?|\*]/.test(a)||/\s+OR\s+/i.test(b)?(b=h.config,a=a.replace(/\s+OR\s+/gi,"|"),!b.$headers.filter('[data-column="'+f+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=l.isArray(n)?"("+a+")":"^("+a+")$"),RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g, "\\S*")).test(g)):null},fuzzy:function(b,a,c,g){if(/^~/.test(a)){b=0;c=g.length;var e=a.slice(1);for(a=0;a'+(f.data("placeholder")|| f.attr("data-placeholder")||"")+"":"",g+='");a.$table.find("thead").find("select."+c.css.filter+'[data-column="'+h+'"]').append(g)}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.tsfilter filterEnd.tsfilter",function(d,e){f=e?a.$table.find("."+c.css.header).filter("[data-column]").filter(function(){return""!== e[l(this).data("column")]}):"";c.isProcessing(b,"filterStart"===d.type,e?f:"")});a.debug&&c.benchmark("Applying Filter widget",q);a.$table.bind("tablesorter-initialized pagerInitialized",function(){k=c.filter.setDefaults(b,a,d)||[];k.length&&c.setFilters(b,k,!0);a.$table.trigger("filterFomatterUpdate");c.filter.checkFilters(b,k)});d.filter_initialized=!0;a.$table.trigger("filterInit")},setDefaults:function(b,a,d){var g=c.getFilters(b);d.filter_saveFilters&&c.storage&&(d=c.storage(b,"tablesorter-filters")|| [],(b=l.isArray(d))&&""===d.join("")||!b||(g=d));a.$table.data("lastSearch",g);return g},buildRow:function(b,a,d){var g,e,f,h=a.columns;e='';for(b=0;b";a.$filters=l(e+"").appendTo(a.$table.find("thead").eq(0)).find("td");for(b=0;b").appendTo(a.$filters.eq(b)):(d.filter_formatter&&l.isFunction(d.filter_formatter[b])?((e=d.filter_formatter[b](a.$filters.eq(b),b))&&0===e.length&&(e=a.$filters.eq(b).children("input")),e&&(0===e.parent().length||e.parent().length&&e.parent()[0]!==a.$filters[b])&&a.$filters.eq(b).append(e)):e=l('').appendTo(a.$filters.eq(b)),e&&e.attr("placeholder", g.data("placeholder")||g.attr("data-placeholder")||"")),e&&(g=(l.isArray(d.filter_cssFilter)?"undefined"!==typeof d.filter_cssFilter[b]?d.filter_cssFilter[b]||"":"":d.filter_cssFilter)||"",e.addClass(c.css.filter+" "+g).attr("data-column",b),f&&(e.addClass("disabled")[0].disabled=!0))},bindSearch:function(b,a,d){b=l(b)[0];a=l(a);if(a.length){var g=b.config,e=g.widgetOptions,f=e.filter_$externalFilters;!0!==d&&(e.filter_$anyMatch=a.filter('[data-column="all"]'),e.filter_$externalFilters=f&&f.length? e.filter_$externalFilters.add(a):a,c.setFilters(b,g.$table.data("lastSearch")||[],!1===d));a.attr("data-lastSearchTime",(new Date).getTime()).unbind("keyup search change").bind("keyup search change",function(a,d){l(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if("number"===typeof e.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===e.filter_liveSearch&&13!==a.which||37<=a.which&&40>= a.which||13!==a.which&&!1===e.filter_liveSearch))return;c.filter.searching(b,"",!0)});g.$table.bind("filterReset",function(){a.val("")})}},checkFilters:function(b,a,d){var g=b.config,e=g.widgetOptions,f=l.isArray(a),h=f?a:c.getFilters(b,!0),k=(h||[]).join("");f&&c.setFilters(b,h,!1,!0!==d);e.filter_hideFilters&&g.$table.find("."+c.css.filterRow).trigger(""===k?"mouseleave":"mouseenter");if(g.lastCombinedFilter!==k||!1===a)if(!1===a&&(g.lastCombinedFilter=null),g.$table.trigger("filterStart",[h]), g.showProcessing)setTimeout(function(){c.filter.findRows(b,h,k);return!1},30);else return c.filter.findRows(b,h,k),!1},hideFilters:function(b,a){var d,g,e;a.$table.find("."+c.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(b){d=l(this);clearTimeout(e);e=setTimeout(function(){/enter|over/.test(b.type)?d.removeClass("hideme"):l(document.activeElement).closest("tr")[0]!==d[0]&&""===a.lastCombinedFilter&&d.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(a){g= l(this).closest("tr");clearTimeout(e);e=setTimeout(function(){if(""===c.getFilters(b).join(""))g["focus"===a.type?"removeClass":"addClass"]("hideme")},200)})},findRows:function(b,a,d){if(b.config.lastCombinedFilter!==d){var g,e,f,h,k,q,n,p,m,v,s,u,w,x,B,z,y,D,C,A,L,E,G,H,I,J,M,r=b.config,t=r.widgetOptions,N=r.columns,K=r.$tbodies,O=["range","notMatch","operators"],F=r.$headers.map(function(a){return r.parsers&&r.parsers[a]&&r.parsers[a].parsed||(c.getData?"parsed"===c.getData(r.$headers.filter('[data-column="'+ a+'"]:last'),r.headers[a],"filter"):l(this).hasClass("filter-parsed"))}).get();r.debug&&(L=new Date);for(q=0;ql.inArray(a,O)&&(z=c(E,G,I,J,M,N,b,t,F,H),null!==z))return C=z,!1}),A=null!==C?C:0<=(J+s).indexOf(G));for(m=0;m'+(p.data("placeholder")|| p.attr("data-placeholder")||"")+"";for(f=0;f"+n[g]+"":"";k=(k.$filters?k.$filters:k.$table.children("thead")).find("."+c.css.filter);b.filter_$externalFilters&&(k=k&&k.length?k.add(b.filter_$externalFilters):b.filter_$externalFilters);k.filter('select[data-column="'+a+'"]')[d?"html":"append"](m)},buildDefault:function(b,a){var d,g,e=b.config,f=e.widgetOptions,h=e.columns;for(d= 0;db.top&&cMath.abs(q.parent().width()-q.width()),s=function(){c.storage&&p&&m&&(k={},k[p.index()]=p.width(),k[m.index()]=m.width(),p.width(k[p.index()]),m.width(k[m.index()]),!1!==d.resizable&&c.storage(b,"tablesorter-resizable",k));n=0;p=m=null; l(window).trigger("resize")};if(k=c.storage&&!1!==d.resizable?c.storage(b,"tablesorter-resizable"):{})for(h in k)!isNaN(h)&&h');d.resizable_addLastColumn||(f=f.slice(0,-1));e=e?e.add(f):f});e.each(function(){var a=l(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+c.css.wrapper).append('
')}).bind("mousemove.tsresize",function(a){if(0!==n&&p){var b=a.pageX-n,c= p.width();p.width(c+b);p.width()!==c&&v&&m.width(m.width()-b);n=a.pageX}}).bind("mouseup.tsresize",function(){s()}).find("."+c.css.resizer+",."+c.css.grip).bind("mousedown",function(b){p=l(b.target).closest("th");var c=a.$headers.filter('[data-column="'+p.attr("data-column")+'"]');1