From f4cded6c6cfc872b9d7abe174c656d442b3d7857 Mon Sep 17 00:00:00 2001 From: Mottie Date: Sun, 27 Apr 2014 11:01:58 -0500 Subject: [PATCH] version bump --- README.md | 21 +++++++++++++ bower.json | 2 +- js/jquery.tablesorter.js | 4 +-- js/jquery.tablesorter.min.js | 4 +-- ...ry.tablesorter.widgets-filter-formatter.js | 2 +- ...ablesorter.widgets-filter-formatter.min.js | 4 +-- js/jquery.tablesorter.widgets.js | 5 ++-- js/jquery.tablesorter.widgets.min.js | 30 +++++++++---------- js/parsers/parser-input-select.js | 2 +- js/widgets/widget-math.js | 2 +- js/widgets/widget-scroller.js | 2 +- package.json | 2 +- tablesorter.jquery.json | 2 +- 13 files changed, 51 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ae1bc1bd..f1c63a92 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,27 @@ 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.16.2 (4/27/2014) + +* Docs: + * Added basic setup for output widget. + * Show various updates. + * Update readme with more resources. +* Core: + * update `addRows` method will now accept a string or jQuery object. + * Sort direction is now counted correctly. + * Add "emptyMin" & "emptyMax" setting to `emptyTo` option. Fixes [issue #577](https://github.com/Mottie/tablesorter/issues/577). + * Add internal `config.$extraHeaders` variable. +* Filter widget: + * Search already filtered rows when not exactly matching content. Fixes [issue #593](https://github.com/Mottie/tablesorter/issues/593). + * Ensure `filter_functions` option is not `null`. Fixes [issue #593](https://github.com/Mottie/tablesorter/issues/593). + * Filter formatter: set datepicker to `null`. Fixes [issue #512](https://github.com/Mottie/tablesorter/issues/512). +* Math widget: add `data-math-mask` for each cell. +* StickyHeaders + * Check for filters before trying to set focus. Fixes [issue #594](https://github.com/Mottie/tablesorter/issues/594). + * Add `stickyHeaders_filteredToTop` option. Fixes [issue #570](https://github.com/Mottie/tablesorter/issues/570). +* Input select parser: don't update columns with both sorter & filter disabled. See [issue #570](https://github.com/Mottie/tablesorter/issues/570). + #### Version 2.16.1 (4/24/2014) * Core: diff --git a/bower.json b/bower.json index d69fe185..e4a65d2f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tablesorter", - "version": "2.16.1", + "version": "2.16.2", "dependencies": { "jquery": ">=1.2.6" }, diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index d8c26f87..826c0d7e 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,5 +1,5 @@ /**! -* TableSorter 2.16.1 - Client-side table sorting with ease! +* TableSorter 2.16.2 - Client-side table sorting with ease! * @requires jQuery v1.2.6+ * * Copyright (c) 2007 Christian Bach @@ -24,7 +24,7 @@ var ts = this; - ts.version = "2.16.1"; + ts.version = "2.16.2"; ts.parsers = []; ts.widgets = []; diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index 7d3bafc7..7dc886e0 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.16.1 min - Client-side table sorting with ease! +* TableSorter 2.16.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){c=g(this);b=l.headers[a];l.headerContent[a]= g(this).html();r=l.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,e);l.onRenderTemplate&&(h=l.onRenderTemplate.apply(c,[a,r]))&&"string"===typeof h&&(r=h);g(this).html('
'+r+"
");l.onRenderHeader&&l.onRenderHeader.apply(c,[a]);this.column=parseInt(g(this).attr("data-column"),10);this.order=C(f.getData(c,b,"sortInitialOrder")||l.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;k=f.getData(c,b,"lockedOrder")||!1;"undefined"!== typeof k&&!1!==k&&(this.order=this.lockedOrder=C(k)?[1,1,1]:[0,0,0]);c.addClass(f.css.header+" "+l.cssHeader);l.headerList[a]=this;c.parent().addClass(f.css.headerRow+" "+l.cssHeaderRow).attr("role","row");l.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});B(a);l.debug&&(u("Built headers:",t),d(l.$headers))}function E(a,b,c){var h=a.config;h.$table.find(h.selectorRemove).remove();q(a);x(a);H(h.$table,b,c)}function B(a){var b,c,h=a.config;h.$headers.each(function(e,r){c=g(r); b="false"===f.getData(r,h.headers[e],"sorter");r.sortDisabled=b;c[b?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+b);a.id&&(b?c.removeAttr("aria-controls"):c.attr("aria-controls",a.id))})}function G(a){var b,c,h,e=a.config,r=e.sortList,k=f.css.sortNone+" "+e.cssNone,d=[f.css.sortAsc+" "+e.cssAsc,f.css.sortDesc+" "+e.cssDesc],l=["ascending","descending"],m=g(a).find("tfoot tr").children().removeClass(d.join(" "));e.$headers.removeClass(d.join(" ")).addClass(k).attr("aria-sort", "none");h=r.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,e,f=a.config,d=b||f.sortList;f.sortList=[];g.each(d,function(a, b){c=[parseInt(b[0],10),parseInt(b[1],10)];if(e=f.$headers[c[0]])f.sortList.push(c),h=g.inArray(c[1],e.order),e.count=0<=h?h:c[1]%(f.sortReset?3:2)})}function N(a,b){return a&&a[b]?a[b].type||"":""}function O(a,b,c){var h,e,d,k=a.config,t=!c[k.sortMultiSortKey],l=k.$table;l.trigger("sortStart",a);b.count=c[k.sortResetKey]?2:(b.count+1)%(k.sortReset?3:2);k.sortRestart&&(e=b,k.$headers.each(function(){this===e||!t&&g(this).is("."+f.css.sortDesc+",."+f.css.sortAsc)||(this.count=-1)}));e=b.column;if(t){k.sortList= [];if(null!==k.sortForce)for(h=k.sortForce,c=0;ch&&(k.sortList.push([e,h]),1h&&(k.sortList.push([e,h]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};f.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"}; f.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"};f.log=d;f.benchmark=u;f.construct=function(a){return this.each(function(){var b=g.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?d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var c="",h=g(a),e=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.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};f.clearTableBody=function(a){g(a)[0].config.$tbodies.empty()};f.bindEvents=function(a,b){a=g(a)[0];var c,d=a.config;b.find(d.selectorSort).add(b.filter(d.selectorSort)).unbind(["mousedown", "mouseup","sort","keyup",""].join(d.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(d.namespace+" "),function(e,f){var k;k=e.type;if(!(1!==(e.which||e.button)&&!/sort|keyup/.test(k)||"keyup"===k&&13!==e.which||"mouseup"===k&&!0!==f&&250<(new Date).getTime()-c)){if("mousedown"===k)return c=(new Date).getTime(),"INPUT"===e.target.tagName?"":!d.cancelSelection;d.delayInit&&m(d.cache)&&x(a);k=/TH|TD/.test(this.tagName)?this:g(this).parents("th, td")[0];k=d.$headers[b.index(k)];k.sortDisabled|| O(a,k,e)}});d.cancelSelection&&b.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};f.restoreHeaders=function(a){var b=g(a)[0].config;b.$table.find(b.selectorHeaders).each(function(a){g(this).find("."+f.css.headerIn).length&&g(this).html(b.headerContent[a])})};f.destroy=function(a,b,c){a=g(a)[0];if(a.hasInitialized){f.refreshWidgets(a,!0,!0);var d=g(a),e=a.config,r=d.find("thead:first"),k=r.find("tr."+f.css.headerRow).removeClass(f.css.headerRow+" "+ e.cssHeaderRow),m=d.find("tfoot:first > tr").children("th, td");!1===b&&0<=g.inArray("uitheme",e.widgets)&&(d.trigger("applyWidgetId",["uitheme"]),d.trigger("applyWidgetId",["zebra"]));r.find("tr").not(k).remove();d.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(e.namespace+" "));e.$headers.add(m).removeClass([f.css.header, e.cssHeader,e.cssAsc,e.cssDesc,f.css.sortAsc,f.css.sortDesc,f.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");k.find(e.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(e.namespace+" "));f.restoreHeaders(a);d.toggleClass(f.css.table+" "+e.tableClass+" tablesorter-"+e.theme,!1===b);a.hasInitialized=!1;delete a.config.cache;"function"===typeof c&&c(a)}};f.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};f.sortNatural=function(a,b){if(a===b)return 0;var c,d,e,g,k,m;d=f.regex;if(d.hex.test(b)){c=parseInt(a.match(d.hex),16);e=parseInt(b.match(d.hex),16);if(ce)return 1}c=a.replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0");d=b.replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0");m=Math.max(c.length,d.length);for(k=0;kg)return 1}return 0};f.sortNaturalAsc=function(a,b,c,d,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:c||1:f.sortNatural(a,b)};f.sortNaturalDesc=function(a,b,c,d,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===b&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:f.sortNatural(b,a)};f.sortText=function(a,b){return a>b?1:ag.inArray(k[h].id,m))&&(e.debug&&d('Refeshing widgets: Removing "'+k[h].id+'"'),k[h].hasOwnProperty("remove")&&e.widgetInit[k[h].id]&&(k[h].remove(a,e,e.widgetOptions),e.widgetInit[k[h].id]=!1));!0!==c&&f.applyWidget(a,b)};f.getData=function(a,b,c){var d="";a=g(a); var e,f;if(!a.length)return"";e=g.metadata?a.metadata():!1;f=" "+(a.attr("class")||"");"undefined"!==typeof a.data(c)||"undefined"!==typeof a.data(c.toLowerCase())?d+=a.data(c)||a.data(c.toLowerCase()):e&&"undefined"!==typeof e[c]?d+=e[c]:b&&"undefined"!==typeof b[c]?d+=b[c]:" "!==f&&f.match(" "+c+"-")&&(d=f.match(RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return g.trim(d)};f.formatFloat=function(a,b){if("string"!==typeof a||""===a)return a;var c;a=(b&&b.config?!1!==b.config.usNumberFormat:"undefined"!== typeof b?b:1)?a.replace(/,/g,""):a.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(a)&&(a=a.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(a);return isNaN(c)?g.trim(a):c};f.isDigit=function(a){return isNaN(a)?/^[\-+(]?\d+[)]?$/.test(a.toString().replace(/[,.'"\s]/g,"")):!0}}});var n=g.tablesorter;g.fn.extend({tablesorter:n.construct});n.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? n.replaceAccents(d):d);return d},type:"text"});n.addParser({id:"digit",is:function(d){return n.isDigit(d)},format:function(d,u){var m=n.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"});n.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=n.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"});n.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,v=d?d.split("."):"",q="",x=v.length;for(m=0;md.length},format:function(d,g){return d?n.formatFloat(d.replace(/%/g,""),g):d},type:"numeric"});n.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?n.formatFloat((new Date(d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,g):d},type:"numeric"});n.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,v){if(d){m=g.config;var q=m.$headers.filter("[data-column="+v+"]:last");v=q.length&&q[0].dateFormat||n.getData(q,m.headers[v],"dateFormat")|| m.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===v?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===v?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===v&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return d?n.formatFloat((new Date(d)).getTime()||d,g):d},type:"numeric"});n.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? n.formatFloat((new Date("2000/01/01 "+d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,g):d},type:"numeric"});n.addParser({id:"metadata",is:function(){return!1},format:function(d,n,m){d=n.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return g(m).metadata()[d]},type:"numeric"});n.addWidget({id:"zebra",priority:90,format:function(d,u,m){var v,q,x,y,C,D,E=RegExp(u.cssChildRow,"i"),B=u.$tbodies;u.debug&&(C=new Date);for(d=0;d':"";m.$headers=g(a).find(m.selectorHeaders).each(function(a){c=g(this);b=m.headers[a];m.headerContent[a]= g(this).html();t=m.headerTemplate.replace(/\{content\}/g,g(this).html()).replace(/\{icon\}/g,e);m.onRenderTemplate&&(h=m.onRenderTemplate.apply(c,[a,t]))&&"string"===typeof h&&(t=h);g(this).html('
'+t+"
");m.onRenderHeader&&m.onRenderHeader.apply(c,[a]);this.column=parseInt(g(this).attr("data-column"),10);this.order=C(f.getData(c,b,"sortInitialOrder")||m.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;k=f.getData(c,b,"lockedOrder")||!1;"undefined"!== typeof k&&!1!==k&&(this.order=this.lockedOrder=C(k)?[1,1,1]:[0,0,0]);c.addClass(f.css.header+" "+m.cssHeader);m.headerList[a]=this;c.parent().addClass(f.css.headerRow+" "+m.cssHeaderRow).attr("role","row");m.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});B(a);m.debug&&(u("Built headers:",l),d(m.$headers))}function E(a,b,c){var h=a.config;h.$table.find(h.selectorRemove).remove();s(a);x(a);H(h.$table,b,c)}function B(a){var b,c,h=a.config;h.$headers.each(function(e,t){c=g(t); b="false"===f.getData(t,h.headers[e],"sorter");t.sortDisabled=b;c[b?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+b);a.id&&(b?c.removeAttr("aria-controls"):c.attr("aria-controls",a.id))})}function G(a){var b,c,h=a.config,e=h.sortList,t=e.length,d=f.css.sortNone+" "+h.cssNone,l=[f.css.sortAsc+" "+h.cssAsc,f.css.sortDesc+" "+h.cssDesc],m=["ascending","descending"],n=g(a).find("tfoot tr").children().add(h.$extraHeaders).removeClass(l.join(" "));h.$headers.removeClass(l.join(" ")).addClass(d).attr("aria-sort", "none");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,c){var h,e,f,d=a.config;a=b||d.sortList;d.sortList=[];g.each(a,function(a, b){h=[parseInt(b[0],10),parseInt(b[1],10)];if(f=d.$headers.filter('[data-column="'+h[0]+'"]:last')[0])d.sortList.push(h),e=g.inArray(h[1],f.order),c&&(f.count+=1),f.count=0<=e?e:h[1]%(d.sortReset?3:2)})}function N(a,b){return a&&a[b]?a[b].type||"":""}function O(a,b,c){var h,e,d,k=a.config,l=!c[k.sortMultiSortKey],m=k.$table;m.trigger("sortStart",a);b.count=c[k.sortResetKey]?2:(b.count+1)%(k.sortReset?3:2);k.sortRestart&&(e=b,k.$headers.each(function(){this===e||!l&&g(this).is("."+f.css.sortDesc+",."+ f.css.sortAsc)||(this.count=-1)}));e=b.column;if(l){k.sortList=[];if(null!==k.sortForce)for(h=k.sortForce,c=0;ch&&(k.sortList.push([e,h]),1h&&(k.sortList.push([e,h]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};f.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing", sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};f.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"};f.log=d;f.benchmark=u;f.construct=function(a){return this.each(function(){var b=g.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?d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var c="",h=g(a),e=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.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};f.clearTableBody=function(a){g(a)[0].config.$tbodies.empty()};f.bindEvents= function(a,b,c){a=g(a)[0];var d,e=a.config;!0!==c&&(e.$extraHeaders=e.$extraHeaders?e.$extraHeaders.add(b):b);b.find(e.selectorSort).add(b.filter(e.selectorSort)).unbind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" "),function(c,f){var l;l=c.type;if(!(1!==(c.which||c.button)&&!/sort|keyup/.test(l)||"keyup"===l&&13!==c.which||"mouseup"===l&&!0!==f&&250<(new Date).getTime()-d)){if("mousedown"===l)return d=(new Date).getTime(), "INPUT"===c.target.tagName?"":!e.cancelSelection;e.delayInit&&n(e.cache)&&x(a);l=/TH|TD/.test(this.tagName)?this:g(this).parents("th, td")[0];l=e.$headers[b.index(l)];l.sortDisabled||O(a,l,c)}});e.cancelSelection&&b.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};f.restoreHeaders=function(a){var b=g(a)[0].config;b.$table.find(b.selectorHeaders).each(function(a){g(this).find("."+f.css.headerIn).length&&g(this).html(b.headerContent[a])})};f.destroy= function(a,b,c){a=g(a)[0];if(a.hasInitialized){f.refreshWidgets(a,!0,!0);var d=g(a),e=a.config,t=d.find("thead:first"),k=t.find("tr."+f.css.headerRow).removeClass(f.css.headerRow+" "+e.cssHeaderRow),l=d.find("tfoot:first > tr").children("th, td");!1===b&&0<=g.inArray("uitheme",e.widgets)&&(d.trigger("applyWidgetId",["uitheme"]),d.trigger("applyWidgetId",["zebra"]));t.find("tr").not(k).remove();d.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(e.namespace+ " "));e.$headers.add(l).removeClass([f.css.header,e.cssHeader,e.cssAsc,e.cssDesc,f.css.sortAsc,f.css.sortDesc,f.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");k.find(e.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(e.namespace+" "));f.restoreHeaders(a);d.toggleClass(f.css.table+" "+e.tableClass+" tablesorter-"+e.theme,!1===b);a.hasInitialized=!1;delete a.config.cache;"function"===typeof c&&c(a)}};f.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};f.sortNatural=function(a,b){if(a===b)return 0;var c,d,e,g,k,l;d=f.regex;if(d.hex.test(b)){c=parseInt(a.match(d.hex),16);e=parseInt(b.match(d.hex),16);if(ce)return 1}c=a.replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0");d=b.replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0");l=Math.max(c.length,d.length);for(k=0;kg)return 1}return 0};f.sortNaturalAsc=function(a,b,c,d,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===b&&0!==c?"boolean"===typeof c?c?1:-1:c||1:f.sortNatural(a,b)};f.sortNaturalDesc=function(a,b,c,d,e){if(a===b)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===a&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===b&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:f.sortNatural(b,a)};f.sortText=function(a,b){return a>b?1:ag.inArray(k[h].id,n))&&(e.debug&&d('Refeshing widgets: Removing "'+k[h].id+'"'),k[h].hasOwnProperty("remove")&&e.widgetInit[k[h].id]&&(k[h].remove(a,e,e.widgetOptions),e.widgetInit[k[h].id]=!1));!0!==c&&f.applyWidget(a,b)};f.getData=function(a,b,c){var d="";a=g(a); var e,f;if(!a.length)return"";e=g.metadata?a.metadata():!1;f=" "+(a.attr("class")||"");"undefined"!==typeof a.data(c)||"undefined"!==typeof a.data(c.toLowerCase())?d+=a.data(c)||a.data(c.toLowerCase()):e&&"undefined"!==typeof e[c]?d+=e[c]:b&&"undefined"!==typeof b[c]?d+=b[c]:" "!==f&&f.match(" "+c+"-")&&(d=f.match(RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return g.trim(d)};f.formatFloat=function(a,b){if("string"!==typeof a||""===a)return a;var c;a=(b&&b.config?!1!==b.config.usNumberFormat:"undefined"!== typeof b?b:1)?a.replace(/,/g,""):a.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(a)&&(a=a.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(a);return isNaN(c)?g.trim(a):c};f.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 n=u.config;d&&(d=g.trim(n.ignoreCase?d.toLocaleLowerCase():d),d=n.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 n=p.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),u);return d&&"number"===typeof n?n: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 n=p.formatFloat((d|| "").replace(/[^\w,. \-()]/g,""),u);return d&&"number"===typeof n?n: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 n,v=d?d.split("."):"",s="",x=v.length;for(n=0;nd.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()||d,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,n,v){if(d){n=g.config;var s=n.$headers.filter("[data-column="+v+"]:last");v=s.length&&s[0].dateFormat||p.getData(s,n.headers[v],"dateFormat")|| n.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===v?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===v?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===v&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return d?p.formatFloat((new Date(d)).getTime()||d,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()||d,g):d},type:"numeric"});p.addParser({id:"metadata",is:function(){return!1},format:function(d,p,n){d=p.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return g(n).metadata()[d]},type:"numeric"});p.addWidget({id:"zebra",priority:90,format:function(d,u,n){var v,s,x,y,C,D,E=RegExp(u.cssChildRow,"i"),B=u.$tbodies;u.debug&&(C=new Date);for(d=0;d'+d.cellText+"":"";g.each(d.compare,function(b,c){a+=""});b.wrapInner('
').prepend(l+'').appendTo(b).bind("change"+c.namespace+"filter", function(){e({value:this.value,delayed:!1})}),h=[],e=function(f,k){var q=!0,e,p=f&&f.value&&r.formatFloat((f.value+"").replace(/[><=]/g,""))||b.find(".spinner").val()||a.value,d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",l=f&&"boolean"===typeof f.delayed?f.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.addToggle&&(q=b.find(".toggle").is(":checked"));e=a.disabled||!q?"disable":"enable";b.find(".filter").val(q?(d?d:a.exactMatch?"=":"")+p:"").trigger(k? "":"search",l).end().find(".spinner").spinner(e).val(p);h.length&&(h.find(".spinner").spinner(e).val(p).end().find(".compare-select").val(d),a.addToggle&&(h.find(".toggle")[0].checked=q))};a.oldcreate=a.create;a.oldspin=a.spin;a.create=function(b,k){e();"function"===typeof a.oldcreate&&a.oldcreate(b,k)};a.spin=function(b,k){e(k);"function"===typeof a.oldspin&&a.oldspin(b,k)};a.addToggle&&g('
').appendTo(b).find(".toggle").bind("change",function(){e()});b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");g('').val(a.value).appendTo(b).spinner(a).bind("change keyup",function(){e()});c.$table.bind("filterFomatterUpdate",function(){var c=n.updateCompare(b,l,a)[0];b.find(".spinner").val(c);e({value:c},!0)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){e()}));c.$table.bind("stickyHeadersInit", function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();a.addToggle&&g('
').appendTo(h).find(".toggle").bind("change",function(){b.find(".toggle")[0].checked=this.checked;e()});g('').val(a.value).appendTo(h).spinner(a).bind("change keyup",function(){b.find(".spinner").val(this.value); e()});a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());e()}))});c.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(h).find(".compare-select").val(a.compare[a.selected||0]);a.addToggle&&(b.find(".toggle")[0].checked=!1);b.find(".spinner").spinner("value",a.value);setTimeout(function(){e()},0)});e();return l},uiSlider:function(b,f,d){var a=g.extend({delayed:!0,valueToHeader:!1,exactMatch:!0,cellText:"",compare:"", allText:"all",value:0,min:0,max:100,step:1,range:"min"},d),c=b.closest("table")[0].config,l=g('').appendTo(b).bind("change"+c.namespace+"filter",function(){e({value:this.value})}),h=[],e=function(e,k){var q="undefined"!==typeof e?r.formatFloat((e.value+"").replace(/[><=]/g,""))||a.value:a.value,d=a.compare?q:q===a.min?a.allText:q,p=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",d=p+d,l=e&&"boolean"===typeof e.delayed? e.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.valueToHeader?b.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(" ("+d+")"):b.find(".ui-slider-handle").addClass("value-popup").attr("data-value",d);b.find(".filter").val(p?p+q:q===a.min?"":(a.exactMatch?"=":"")+q).trigger(k?"":"search",l).end().find(".slider").slider("value",q);h.length&&(h.find(".compare-select").val(p).end().find(".slider").slider("value",q),a.valueToHeader?h.closest("thead").find("th[data-column="+f+ "]").find(".curvalue").html(" ("+d+")"):h.find(".ui-slider-handle").addClass("value-popup").attr("data-value",d))};b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");a.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append('');a.oldcreate=a.create;a.oldslide=a.slide;a.create=function(b,k){e();"function"===typeof a.oldcreate&&a.oldcreate(b,k)};a.slide=function(b,k){e(k);"function"===typeof a.oldslide&& a.oldslide(b,k)};g('
').appendTo(b).slider(a);c.$table.bind("filterFomatterUpdate",function(){var c=n.updateCompare(b,l,a)[0];b.find(".slider").slider("value",c);e({value:c},!1)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){e({value:b.find(".slider").slider("value")})}));c.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(h).find(".compare-select").val(a.compare[a.selected||0]);setTimeout(function(){e({value:a.value})}, 0)});c.$table.bind("stickyHeadersInit",function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();g('
').val(a.value).appendTo(h).slider(a).bind("change keyup",function(){b.find(".slider").slider("value",this.value);e()});a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());e()}))});return l},uiRange:function(b,f,d){var a=g.extend({delayed:!0,valueToHeader:!1, values:[0,100],min:0,max:100,range:!0},d),c=b.closest("table")[0].config,l=g('').appendTo(b).bind("change"+c.namespace+"filter",function(){e()}),h=[],e=function(){var b=l.val(),c=b.split(" - ");""===b&&(c=[a.min,a.max]);c&&c[1]&&m({values:c,delay:!1},!0)},m=function(k,e){var d=k&&k.values||a.values,g=d[0]+" - "+d[1],l=d[0]===a.min&&d[1]===a.max?"":g,m=k&&"boolean"===typeof k.delayed?k.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.valueToHeader?b.closest("thead").find("th[data-column="+ f+"]").find(".currange").html(" ("+g+")"):b.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value",d[1]);b.find(".filter").val(l).trigger(e?"":"search",m).end().find(".range").slider("values",d);h.length&&(h.find(".range").slider("values",d),a.valueToHeader?h.closest("thead").find("th[data-column="+f+"]").find(".currange").html(" ("+g+")"):h.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value", d[1]))};b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");a.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append('');a.oldcreate=a.create;a.oldslide=a.slide;a.create=function(b,c){m();"function"===typeof a.oldcreate&&a.oldcreate(b,c)};a.slide=function(b,c){m(c);"function"===typeof a.oldslide&&a.oldslide(b,c)};g('
').appendTo(b).slider(a);c.$table.bind("filterFomatterUpdate", function(){e()});c.$table.bind("filterReset",function(){b.find(".range").slider("values",a.values);setTimeout(function(){m()},0)});c.$table.bind("stickyHeadersInit",function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();g('
').val(a.value).appendTo(h).slider(a).bind("change keyup",function(){b.find(".range").val(this.value);m()})});return l},uiDateCompare:function(b,f,d){var a=g.extend({cellText:"",compare:"",endOfDay:!0,defaultDate:"", changeMonth:!0,changeYear:!0,numberOfMonths:1},d),c,l=b.closest("table")[0].config;d=b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");var h=g('').appendTo(b).bind("change"+l.namespace+"filter",function(){var b=this.value;if(b)a.onClose(b)}),e,m=[],k=function(k){var e,f;e=c.datepicker("getDate")||"";var d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",h=l.$table[0].hasInitialized?a.delayed|| "":!0;c.datepicker("setDate",""===e?"":e);""===e&&(k=!1);f=(e=c.datepicker("getDate"))?(a.endOfDay&&/<=/.test(d)?e.setHours(23,59,59):e.getTime())||"":"";e&&a.endOfDay&&"="===d&&(d="",f+=" - "+e.setHours(23,59,59),k=!1);b.find(".dateCompare").val(d+f).trigger(k?"":"search",h).end();m.length&&m.find(".dateCompare").val(d+f).end().find(".compare-select").val(d)};e='';c=g(e).appendTo(b);a.oldonClose=a.onClose;a.onClose=function(b,c){k();"function"===typeof a.oldonClose&&a.oldonClose(b,c)};c.datepicker(a);l.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(m).find(".compare-select").val(a.compare[a.selected||0]);b.add(m).find(".date").val(a.defaultDate).datepicker("setDate",a.defaultDate);setTimeout(function(){k()},0)});l.$table.bind("filterFomatterUpdate",function(){var e;e=h.val();/\s+-\s+/.test(e)?(b.find(".compare-select").val("="), e=e.split(/\s+-\s+/)[0],c.datepicker("setDate",e)):(e=n.updateCompare(b,h,a)[1].toString()||"",e=""!==e?/\d{5}/g.test(e)?Number(e):e||"":"");b.add(m).find(".date").datepicker("setDate",e);setTimeout(function(){k(!0)},0)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){k()}));l.$table.bind("stickyHeadersInit",function(){m=l.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();m.append(e).find(".date").datepicker(a);a.compare&&(n.addCompare(m, f,a),m.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());k()}))});return h.val(a.defaultDate?a.defaultDate:"")},uiDatepicker:function(b,f,d){var a=g.extend({endOfDay:!0,textFrom:"from",textTo:"to",from:"",to:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},d),c,l,h=[],e=b.closest("table")[0].config,m=g('').appendTo(b).bind("change"+e.namespace+"filter",function(){var a=this.value;a.match(" - ")?(a=a.split(" - "),b.find(".dateTo").val(a[1]), l(a[0])):a.match(">=")?l(a.replace(">=","")):a.match("<=")&&l(a.replace("<=",""))});d=b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");c="';g(c).appendTo(b);a.oldonClose=a.onClose;l=a.onClose=function(c,e){var f,d=b.find(".dateFrom").datepicker("getDate"),g=b.find(".dateTo").datepicker("getDate"),d=d instanceof Date&&isFinite(d)?d.getTime():"",g=g instanceof Date&&isFinite(g)?(a.endOfDay?g.setHours(23,59,59):g.getTime())||"":"";f=d?g?d+" - "+g:">="+d:g?"<="+g:"";b.add(h).find(".dateRange").val(f).trigger("search");d=d?new Date(d):"";g=g?new Date(g):"";/<=/.test(f)?b.add(h).find(".dateFrom").datepicker("option","maxDate",g).end().find(".dateTo").datepicker("option", "minDate",null).datepicker("setDate",g):/>=/.test(f)?b.add(h).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d).end().find(".dateTo").datepicker("option","minDate",d):b.add(h).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",g);"function"===typeof a.oldonClose&&a.oldonClose(c,e)};a.defaultDate=a.from||"";b.find(".dateFrom").datepicker(a);a.defaultDate=a.to||"+7d"; b.find(".dateTo").datepicker(a);e.$table.bind("filterFomatterUpdate",function(){var a=m.val()||"",c="",e="";/\s+-\s+/.test(a)?(a=a.split(/\s+-\s+/)||[],c=a[0]||"",e=a[1]||""):/>=/.test(a)?c=a.replace(/>=/,"")||"":/<=/.test(a)&&(e=a.replace(/<=/,"")||"");b.add(h).find(".dateFrom").datepicker("setDate",c);b.add(h).find(".dateTo").datepicker("setDate",e);setTimeout(function(){l()},0)});e.$table.bind("stickyHeadersInit",function(){h=e.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(); h.append(c);a.defaultDate=a.from||"";h.find(".dateFrom").datepicker(a);a.defaultDate=a.to||"+7d";h.find(".dateTo").datepicker(a)});b.closest("table").bind("filterReset",function(){b.add(h).find(".dateFrom").val("").datepicker("setDate",a.from);b.add(h).find(".dateTo").val("").datepicker("setDate",a.to);setTimeout(function(){l()},0)});return m.val(a.from?a.to?a.from+" - "+a.to:">="+a.from:a.to?"<="+a.to:"")},html5Number:function(b,f,d){var a,c=g.extend({value:0,min:0,max:100,step:1,delayed:!0,disabled:!1, addToggle:!1,exactMatch:!1,cellText:"",compare:"",skipTest:!1},d),l;d=g('').appendTo(b);var h=c.skipTest||"number"===d.attr("type")&&"test"!==d.val(),e=[],m=b.closest("table")[0].config,k=function(a,d){var f=c.addToggle?b.find(".toggle").is(":checked"):!0,k=b.find(".number").val(),h=(g.isArray(c.compare)?b.find(".compare-select").val()||c.compare[c.selected||0]:c.compare)||"",n=m.$table[0].hasInitialized?(a?a:c.delayed)||"":!0;l.val(!c.addToggle|| f?(h?h:c.exactMatch?"=":"")+k:"").trigger(d?"":"search",n).end().find(".number").val(k);b.find(".number").length&&(b.find(".number")[0].disabled=c.disabled||!f);e.length&&(e.find(".number").val(k)[0].disabled=c.disabled||!f,e.find(".compare-select").val(h),c.addToggle&&(e.find(".toggle")[0].checked=f))};d.remove();h&&(a=c.addToggle?'
':"",a+='',b.append(a+'').find(".toggle, .number").bind("change",function(){k()}).closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").closest("table").bind("filterReset",function(){g.isArray(c.compare)&&b.add(e).find(".compare-select").val(c.compare[c.selected||0]);c.addToggle&&(b.find(".toggle")[0].checked=!1,e.length&&(e.find(".toggle")[0].checked=!1));b.find(".number").val(c.value);setTimeout(function(){k()}, 0)}),l=b.find("input[type=hidden]").bind("change",function(){b.find(".number").val(this.value);k()}),m.$table.bind("filterFomatterUpdate",function(){var a=n.updateCompare(b,l,c)[0]||c.value;b.find(".number").val(((a||"")+"").replace(/[><=]/g,""));k(!1,!0)}),c.compare&&(n.addCompare(b,f,c),b.find(".compare-select").bind("change",function(){k()})),m.$table.bind("stickyHeadersInit",function(){e=m.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();e.append(a).find(".toggle, .number").bind("change", function(){b.find(".number").val(g(this).val());k()});c.compare&&(n.addCompare(e,f,c),e.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());k()}));k()}),k());return h?b.find('input[type="hidden"]'):g('')},html5Range:function(b,f,d){var a=g.extend({value:0,min:0,max:100,step:1,delayed:!0,valueToHeader:!0,exactMatch:!0,cellText:"",compare:"",allText:"all",skipTest:!1},d),c;d=g('').appendTo(b); var l=a.skipTest||"range"===d.attr("type")&&"test"!==d.val(),h=[],e=b.closest("table")[0].config,m=function(d,l,m){d=("undefined"===typeof d?c.val():d).toString().replace(/[<>=]/g,"")||a.value;var p=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",n=" ("+(p?p+d:d==a.min?a.allText:d)+")";l=e.$table[0].hasInitialized?(l?l:a.delayed)||"":!0;b.find("input[type=hidden]").val(p?p+d:d==a.min?"":(a.exactMatch?"=":"")+d).trigger(m?"":"search",l).end().find(".range").val(d); b.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(n);h.length&&(h.find(".range").val(d).end().find(".compare-select").val(p),h.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(n))};d.remove();l&&(b.html('').closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").find(".tablesorter-header-inner").append(''), c=b.find("input[type=hidden]").bind("change"+e.namespace+"filter",function(){var c=this.value,d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"";c!==this.lastValue&&(this.value=this.lastValue=d?d+c:c==a.min?"":(a.exactMatch?"=":"")+c,m(c))}),b.find(".range").bind("change",function(){m(this.value)}),e.$table.bind("filterFomatterUpdate",function(){var d=n.updateCompare(b,c,a)[0];b.find(".range").val(d);m(d,!1,!0)}),a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change", function(){m()})),e.$table.bind("stickyHeadersInit",function(){h=e.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();h.html('').find(".range").bind("change",function(){m(h.find(".range").val())});m();a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());m()}))}),b.closest("table").bind("filterReset",function(){g.isArray(a.compare)&& b.add(h).find(".compare-select").val(a.compare[a.selected||0]);setTimeout(function(){m(a.value,!1,!0)},0)}),m());return l?b.find('input[type="hidden"]'):g('')},html5Color:function(b,f,d){var a,c=g.extend({value:"#000000",disabled:!1,addToggle:!0,exactMatch:!0,valueToHeader:!1,skipTest:!1},d),l;d=g('').appendTo(b);var h=c.skipTest||"color"===d.attr("type")&&"test"!==d.val(),e=[],m=b.closest("table")[0].config,k=function(a, d){a=("undefined"===typeof a?l.val():a).toString().replace("=","")||c.value;var g=!0,h=" ("+a+")";c.addToggle&&(g=b.find(".toggle").is(":checked"));b.find(".colorpicker").length&&(b.find(".colorpicker").val(a)[0].disabled=c.disabled||!g);l.val(g?a+(c.exactMatch?"=":""):"").trigger(!m.$table[0].hasInitialized||d?"":"search");c.valueToHeader?b.closest("thead").find("th[data-column="+f+"]").find(".curcolor").html(h):b.find(".currentColor").html(h);e.length&&(e.find(".colorpicker").val(a)[0].disabled= c.disabled||!g,c.addToggle&&(e.find(".toggle")[0].checked=g),c.valueToHeader?e.closest("thead").find("th[data-column="+f+"]").find(".curcolor").html(h):e.find(".currentColor").html(h))};d.remove();h&&(a=""+f+Math.round(100*Math.random()),a='
'+(c.addToggle?'
':"")+''+(c.valueToHeader? "":'(#000000)')+"
",b.html(a),c.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append(''),b.find(".toggle, .colorpicker").bind("change",function(){k(b.find(".colorpicker").val())}),l=b.find("input[type=hidden]").bind("change"+m.namespace+"filter",function(){k(this.value)}),m.$table.bind("filterFomatterUpdate",function(){k(l.val(),!0)}),b.closest("table").bind("filterReset",function(){c.addToggle&& (b.find(".toggle")[0].checked=!1);setTimeout(function(){k()},0)}),m.$table.bind("stickyHeadersInit",function(){e=m.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f);e.html(a).find(".toggle, .colorpicker").bind("change",function(){k(e.find(".colorpicker").val())});k(e.find(".colorpicker").val())}),k(c.value));return h?b.find('input[type="hidden"]'):g('')}}})(jQuery); +;(function(g){var r=g.tablesorter||{},n=r.filterFormatter={addCompare:function(b,f,d){if(d.compare&&g.isArray(d.compare)&&1'+d.cellText+"":"";g.each(d.compare,function(b,c){a+=""});b.wrapInner('
').prepend(l+'').appendTo(b).bind("change"+c.namespace+"filter", function(){e({value:this.value,delayed:!1})}),h=[],e=function(f,k){var q=!0,e,p=f&&f.value&&r.formatFloat((f.value+"").replace(/[><=]/g,""))||b.find(".spinner").val()||a.value,d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",l=f&&"boolean"===typeof f.delayed?f.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.addToggle&&(q=b.find(".toggle").is(":checked"));e=a.disabled||!q?"disable":"enable";b.find(".filter").val(q?(d?d:a.exactMatch?"=":"")+p:"").trigger(k? "":"search",l).end().find(".spinner").spinner(e).val(p);h.length&&(h.find(".spinner").spinner(e).val(p).end().find(".compare-select").val(d),a.addToggle&&(h.find(".toggle")[0].checked=q))};a.oldcreate=a.create;a.oldspin=a.spin;a.create=function(b,k){e();"function"===typeof a.oldcreate&&a.oldcreate(b,k)};a.spin=function(b,k){e(k);"function"===typeof a.oldspin&&a.oldspin(b,k)};a.addToggle&&g('
').appendTo(b).find(".toggle").bind("change",function(){e()});b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");g('').val(a.value).appendTo(b).spinner(a).bind("change keyup",function(){e()});c.$table.bind("filterFomatterUpdate",function(){var c=n.updateCompare(b,l,a)[0];b.find(".spinner").val(c);e({value:c},!0)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){e()}));c.$table.bind("stickyHeadersInit", function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();a.addToggle&&g('
').appendTo(h).find(".toggle").bind("change",function(){b.find(".toggle")[0].checked=this.checked;e()});g('').val(a.value).appendTo(h).spinner(a).bind("change keyup",function(){b.find(".spinner").val(this.value); e()});a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());e()}))});c.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(h).find(".compare-select").val(a.compare[a.selected||0]);a.addToggle&&(b.find(".toggle")[0].checked=!1);b.find(".spinner").spinner("value",a.value);setTimeout(function(){e()},0)});e();return l},uiSlider:function(b,f,d){var a=g.extend({delayed:!0,valueToHeader:!1,exactMatch:!0,cellText:"",compare:"", allText:"all",value:0,min:0,max:100,step:1,range:"min"},d),c=b.closest("table")[0].config,l=g('').appendTo(b).bind("change"+c.namespace+"filter",function(){e({value:this.value})}),h=[],e=function(e,k){var q="undefined"!==typeof e?r.formatFloat((e.value+"").replace(/[><=]/g,""))||a.value:a.value,d=a.compare?q:q===a.min?a.allText:q,p=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",d=p+d,l=e&&"boolean"===typeof e.delayed? e.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.valueToHeader?b.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(" ("+d+")"):b.find(".ui-slider-handle").addClass("value-popup").attr("data-value",d);b.find(".filter").val(p?p+q:q===a.min?"":(a.exactMatch?"=":"")+q).trigger(k?"":"search",l).end().find(".slider").slider("value",q);h.length&&(h.find(".compare-select").val(p).end().find(".slider").slider("value",q),a.valueToHeader?h.closest("thead").find("th[data-column="+f+ "]").find(".curvalue").html(" ("+d+")"):h.find(".ui-slider-handle").addClass("value-popup").attr("data-value",d))};b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");a.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append('');a.oldcreate=a.create;a.oldslide=a.slide;a.create=function(b,k){e();"function"===typeof a.oldcreate&&a.oldcreate(b,k)};a.slide=function(b,k){e(k);"function"===typeof a.oldslide&& a.oldslide(b,k)};g('
').appendTo(b).slider(a);c.$table.bind("filterFomatterUpdate",function(){var c=n.updateCompare(b,l,a)[0];b.find(".slider").slider("value",c);e({value:c},!1)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){e({value:b.find(".slider").slider("value")})}));c.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(h).find(".compare-select").val(a.compare[a.selected||0]);setTimeout(function(){e({value:a.value})}, 0)});c.$table.bind("stickyHeadersInit",function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();g('
').val(a.value).appendTo(h).slider(a).bind("change keyup",function(){b.find(".slider").slider("value",this.value);e()});a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());e()}))});return l},uiRange:function(b,f,d){var a=g.extend({delayed:!0,valueToHeader:!1, values:[0,100],min:0,max:100,range:!0},d),c=b.closest("table")[0].config,l=g('').appendTo(b).bind("change"+c.namespace+"filter",function(){e()}),h=[],e=function(){var b=l.val(),c=b.split(" - ");""===b&&(c=[a.min,a.max]);c&&c[1]&&m({values:c,delay:!1},!0)},m=function(k,e){var d=k&&k.values||a.values,g=d[0]+" - "+d[1],l=d[0]===a.min&&d[1]===a.max?"":g,m=k&&"boolean"===typeof k.delayed?k.delayed:c.$table[0].hasInitialized?a.delayed||"":!0;a.valueToHeader?b.closest("thead").find("th[data-column="+ f+"]").find(".currange").html(" ("+g+")"):b.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value",d[1]);b.find(".filter").val(l).trigger(e?"":"search",m).end().find(".range").slider("values",d);h.length&&(h.find(".range").slider("values",d),a.valueToHeader?h.closest("thead").find("th[data-column="+f+"]").find(".currange").html(" ("+g+")"):h.find(".ui-slider-handle").addClass("value-popup").eq(0).attr("data-value",d[0]).end().eq(1).attr("data-value", d[1]))};b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");a.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append('');a.oldcreate=a.create;a.oldslide=a.slide;a.create=function(b,c){m();"function"===typeof a.oldcreate&&a.oldcreate(b,c)};a.slide=function(b,c){m(c);"function"===typeof a.oldslide&&a.oldslide(b,c)};g('
').appendTo(b).slider(a);c.$table.bind("filterFomatterUpdate", function(){e()});c.$table.bind("filterReset",function(){b.find(".range").slider("values",a.values);setTimeout(function(){m()},0)});c.$table.bind("stickyHeadersInit",function(){h=c.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();g('
').val(a.value).appendTo(h).slider(a).bind("change keyup",function(){b.find(".range").val(this.value);m()})});return l},uiDateCompare:function(b,f,d){var a=g.extend({cellText:"",compare:"",endOfDay:!0,defaultDate:"", changeMonth:!0,changeYear:!0,numberOfMonths:1},d),c,l=b.closest("table")[0].config;d=b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");var h=g('').appendTo(b).bind("change"+l.namespace+"filter",function(){var b=this.value;if(b)a.onClose(b)}),e,m=[],k=function(k){var e,f;e=c.datepicker("getDate")||"";var d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",h=l.$table[0].hasInitialized?a.delayed|| "":!0;c.datepicker("setDate",(""===e?"":e)||null);""===e&&(k=!1);f=(e=c.datepicker("getDate"))?(a.endOfDay&&/<=/.test(d)?e.setHours(23,59,59):e.getTime())||"":"";e&&a.endOfDay&&"="===d&&(d="",f+=" - "+e.setHours(23,59,59),k=!1);b.find(".dateCompare").val(d+f).trigger(k?"":"search",h).end();m.length&&m.find(".dateCompare").val(d+f).end().find(".compare-select").val(d)};e='';c=g(e).appendTo(b);a.oldonClose=a.onClose;a.onClose=function(b,c){k();"function"===typeof a.oldonClose&&a.oldonClose(b,c)};c.datepicker(a);l.$table.bind("filterReset",function(){g.isArray(a.compare)&&b.add(m).find(".compare-select").val(a.compare[a.selected||0]);b.add(m).find(".date").val(a.defaultDate).datepicker("setDate",a.defaultDate||null);setTimeout(function(){k()},0)});l.$table.bind("filterFomatterUpdate",function(){var e;e=h.val();/\s+-\s+/.test(e)?(b.find(".compare-select").val("="), e=e.split(/\s+-\s+/)[0],c.datepicker("setDate",e||null)):(e=n.updateCompare(b,h,a)[1].toString()||"",e=""!==e?/\d{5}/g.test(e)?Number(e):e||"":"");b.add(m).find(".date").datepicker("setDate",e||null);setTimeout(function(){k(!0)},0)});a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change",function(){k()}));l.$table.bind("stickyHeadersInit",function(){m=l.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();m.append(e).find(".date").datepicker(a);a.compare&& (n.addCompare(m,f,a),m.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());k()}))});return h.val(a.defaultDate?a.defaultDate:"")},uiDatepicker:function(b,f,d){var a=g.extend({endOfDay:!0,textFrom:"from",textTo:"to",from:"",to:"",changeMonth:!0,changeYear:!0,numberOfMonths:1},d),c,l,h=[],e=b.closest("table")[0].config,m=g('').appendTo(b).bind("change"+e.namespace+"filter",function(){var a=this.value;a.match(" - ")?(a= a.split(" - "),b.find(".dateTo").val(a[1]),l(a[0])):a.match(">=")?l(a.replace(">=","")):a.match("<=")&&l(a.replace("<=",""))});d=b.closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed");c="';g(c).appendTo(b);a.oldonClose=a.onClose;l=a.onClose=function(c,e){var f,d=b.find(".dateFrom").datepicker("getDate"),g=b.find(".dateTo").datepicker("getDate"),d=d instanceof Date&&isFinite(d)?d.getTime():"",g=g instanceof Date&&isFinite(g)?(a.endOfDay?g.setHours(23,59,59):g.getTime())||"":"";f=d?g?d+" - "+g:">="+d:g?"<="+g:"";b.add(h).find(".dateRange").val(f).trigger("search");d=d?new Date(d):"";g=g?new Date(g):"";/<=/.test(f)?b.add(h).find(".dateFrom").datepicker("option", "maxDate",g||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",g||null):/>=/.test(f)?b.add(h).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d||null).end().find(".dateTo").datepicker("option","minDate",d||null):b.add(h).find(".dateFrom").datepicker("option","maxDate",null).datepicker("setDate",d||null).end().find(".dateTo").datepicker("option","minDate",null).datepicker("setDate",g||null);"function"===typeof a.oldonClose&&a.oldonClose(c, e)};a.defaultDate=a.from||"";b.find(".dateFrom").datepicker(a);a.defaultDate=a.to||"+7d";b.find(".dateTo").datepicker(a);e.$table.bind("filterFomatterUpdate",function(){var a=m.val()||"",c="",e="";/\s+-\s+/.test(a)?(a=a.split(/\s+-\s+/)||[],c=a[0]||"",e=a[1]||""):/>=/.test(a)?c=a.replace(/>=/,"")||"":/<=/.test(a)&&(e=a.replace(/<=/,"")||"");b.add(h).find(".dateFrom").datepicker("setDate",c||null);b.add(h).find(".dateTo").datepicker("setDate",e||null);setTimeout(function(){l()},0)});e.$table.bind("stickyHeadersInit", function(){h=e.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();h.append(c);a.defaultDate=a.from||"";h.find(".dateFrom").datepicker(a);a.defaultDate=a.to||"+7d";h.find(".dateTo").datepicker(a)});b.closest("table").bind("filterReset",function(){b.add(h).find(".dateFrom").val("").datepicker("setDate",a.from||null);b.add(h).find(".dateTo").val("").datepicker("setDate",a.to||null);setTimeout(function(){l()},0)});return m.val(a.from?a.to?a.from+" - "+a.to:">="+a.from:a.to? "<="+a.to:"")},html5Number:function(b,f,d){var a,c=g.extend({value:0,min:0,max:100,step:1,delayed:!0,disabled:!1,addToggle:!1,exactMatch:!1,cellText:"",compare:"",skipTest:!1},d),l;d=g('').appendTo(b);var h=c.skipTest||"number"===d.attr("type")&&"test"!==d.val(),e=[],m=b.closest("table")[0].config,k=function(a,d){var f=c.addToggle?b.find(".toggle").is(":checked"):!0,k=b.find(".number").val(),h=(g.isArray(c.compare)?b.find(".compare-select").val()|| c.compare[c.selected||0]:c.compare)||"",n=m.$table[0].hasInitialized?(a?a:c.delayed)||"":!0;l.val(!c.addToggle||f?(h?h:c.exactMatch?"=":"")+k:"").trigger(d?"":"search",n).end().find(".number").val(k);b.find(".number").length&&(b.find(".number")[0].disabled=c.disabled||!f);e.length&&(e.find(".number").val(k)[0].disabled=c.disabled||!f,e.find(".compare-select").val(h),c.addToggle&&(e.find(".toggle")[0].checked=f))};d.remove();h&&(a=c.addToggle?'
':"",a+='',b.append(a+'').find(".toggle, .number").bind("change",function(){k()}).closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").closest("table").bind("filterReset",function(){g.isArray(c.compare)&&b.add(e).find(".compare-select").val(c.compare[c.selected||0]);c.addToggle&&(b.find(".toggle")[0].checked=!1,e.length&&(e.find(".toggle")[0].checked= !1));b.find(".number").val(c.value);setTimeout(function(){k()},0)}),l=b.find("input[type=hidden]").bind("change",function(){b.find(".number").val(this.value);k()}),m.$table.bind("filterFomatterUpdate",function(){var a=n.updateCompare(b,l,c)[0]||c.value;b.find(".number").val(((a||"")+"").replace(/[><=]/g,""));k(!1,!0)}),c.compare&&(n.addCompare(b,f,c),b.find(".compare-select").bind("change",function(){k()})),m.$table.bind("stickyHeadersInit",function(){e=m.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty(); e.append(a).find(".toggle, .number").bind("change",function(){b.find(".number").val(g(this).val());k()});c.compare&&(n.addCompare(e,f,c),e.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());k()}));k()}),k());return h?b.find('input[type="hidden"]'):g('')},html5Range:function(b,f,d){var a=g.extend({value:0,min:0,max:100,step:1,delayed:!0,valueToHeader:!0,exactMatch:!0,cellText:"",compare:"",allText:"all",skipTest:!1},d),c;d=g('').appendTo(b); var l=a.skipTest||"range"===d.attr("type")&&"test"!==d.val(),h=[],e=b.closest("table")[0].config,m=function(d,l,m){d=("undefined"===typeof d?c.val():d).toString().replace(/[<>=]/g,"")||a.value;var p=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"",n=" ("+(p?p+d:d==a.min?a.allText:d)+")";l=e.$table[0].hasInitialized?(l?l:a.delayed)||"":!0;b.find("input[type=hidden]").val(p?p+d:d==a.min?"":(a.exactMatch?"=":"")+d).trigger(m?"":"search",l).end().find(".range").val(d); b.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(n);h.length&&(h.find(".range").val(d).end().find(".compare-select").val(p),h.closest("thead").find("th[data-column="+f+"]").find(".curvalue").html(n))};d.remove();l&&(b.html('').closest("thead").find("th[data-column="+f+"]").addClass("filter-parsed").find(".tablesorter-header-inner").append(''), c=b.find("input[type=hidden]").bind("change"+e.namespace+"filter",function(){var c=this.value,d=(g.isArray(a.compare)?b.find(".compare-select").val()||a.compare[a.selected||0]:a.compare)||"";c!==this.lastValue&&(this.value=this.lastValue=d?d+c:c==a.min?"":(a.exactMatch?"=":"")+c,m(c))}),b.find(".range").bind("change",function(){m(this.value)}),e.$table.bind("filterFomatterUpdate",function(){var d=n.updateCompare(b,c,a)[0];b.find(".range").val(d);m(d,!1,!0)}),a.compare&&(n.addCompare(b,f,a),b.find(".compare-select").bind("change", function(){m()})),e.$table.bind("stickyHeadersInit",function(){h=e.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f).empty();h.html('').find(".range").bind("change",function(){m(h.find(".range").val())});m();a.compare&&(n.addCompare(h,f,a),h.find(".compare-select").bind("change",function(){b.find(".compare-select").val(g(this).val());m()}))}),b.closest("table").bind("filterReset",function(){g.isArray(a.compare)&& b.add(h).find(".compare-select").val(a.compare[a.selected||0]);setTimeout(function(){m(a.value,!1,!0)},0)}),m());return l?b.find('input[type="hidden"]'):g('')},html5Color:function(b,f,d){var a,c=g.extend({value:"#000000",disabled:!1,addToggle:!0,exactMatch:!0,valueToHeader:!1,skipTest:!1},d),l;d=g('').appendTo(b);var h=c.skipTest||"color"===d.attr("type")&&"test"!==d.val(),e=[],m=b.closest("table")[0].config,k=function(a, d){a=("undefined"===typeof a?l.val():a).toString().replace("=","")||c.value;var g=!0,h=" ("+a+")";c.addToggle&&(g=b.find(".toggle").is(":checked"));b.find(".colorpicker").length&&(b.find(".colorpicker").val(a)[0].disabled=c.disabled||!g);l.val(g?a+(c.exactMatch?"=":""):"").trigger(!m.$table[0].hasInitialized||d?"":"search");c.valueToHeader?b.closest("thead").find("th[data-column="+f+"]").find(".curcolor").html(h):b.find(".currentColor").html(h);e.length&&(e.find(".colorpicker").val(a)[0].disabled= c.disabled||!g,c.addToggle&&(e.find(".toggle")[0].checked=g),c.valueToHeader?e.closest("thead").find("th[data-column="+f+"]").find(".curcolor").html(h):e.find(".currentColor").html(h))};d.remove();h&&(a=""+f+Math.round(100*Math.random()),a='
'+(c.addToggle?'
':"")+''+(c.valueToHeader? "":'(#000000)')+"
",b.html(a),c.valueToHeader&&b.closest("thead").find("th[data-column="+f+"]").find(".tablesorter-header-inner").append(''),b.find(".toggle, .colorpicker").bind("change",function(){k(b.find(".colorpicker").val())}),l=b.find("input[type=hidden]").bind("change"+m.namespace+"filter",function(){k(this.value)}),m.$table.bind("filterFomatterUpdate",function(){k(l.val(),!0)}),b.closest("table").bind("filterReset",function(){c.addToggle&& (b.find(".toggle")[0].checked=!1);setTimeout(function(){k()},0)}),m.$table.bind("stickyHeadersInit",function(){e=m.widgetOptions.$sticky.find(".tablesorter-filter-row").children().eq(f);e.html(a).find(".toggle, .colorpicker").bind("change",function(){k(e.find(".colorpicker").val())});k(e.find(".colorpicker").val())}),k(c.value));return h?b.find('input[type="hidden"]'):g('')}}})(jQuery); diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 95fc08d1..effb3cbb 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -1,4 +1,4 @@ -/*! tableSorter 2.16+ widgets - updated 4/23/2014 (v2.16.0) +/*! tableSorter 2.16+ widgets - updated 4/27/2014 (v2.16.2) * * Column Styles * Column Filters @@ -1236,8 +1236,7 @@ ts.addWidget({ if ( c.$table.hasClass('hasStickyHeaders') || ($.inArray('filter', c.widgets) >= 0 && !c.$table.hasClass('hasFilters')) ) { return; } - var $cell, - $table = c.$table, + var $table = c.$table, $attach = $(wo.stickyHeaders_attachTo), $thead = $table.children('thead:first'), $win = $attach.length ? $attach : $(window), diff --git a/js/jquery.tablesorter.widgets.min.js b/js/jquery.tablesorter.widgets.min.js index 8996c951..6a5d55df 100644 --- a/js/jquery.tablesorter.widgets.min.js +++ b/js/jquery.tablesorter.widgets.min.js @@ -1,17 +1,17 @@ -/*! tableSorter 2.16+ widgets - updated 4/23/2014 (v2.16.0) */ +/*! tableSorter 2.16+ widgets - updated 4/27/2014 (v2.16.2) */ ;(function(k){ -var c=k.tablesorter=k.tablesorter||{}; -c.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",footerRow:"",footerCells:"",icons:"",sortNone:"bootstrap-icon-unsorted",sortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",sortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",active:"",hover:"",filterRow:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content ui-corner-all",header:"ui-widget-header ui-corner-all ui-state-default", footerRow:"",footerCells:"",icons:"ui-icon",sortNone:"ui-icon-carat-2-n-s",sortAsc:"ui-icon-carat-1-n",sortDesc:"ui-icon-carat-1-s",active:"ui-state-active",hover:"ui-state-hover",filterRow:"",even:"ui-widget-content",odd:"ui-state-default"}};k.extend(c.css,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",wrapper:"tablesorter-wrapper",resizer:"tablesorter-resizer",grip:"tablesorter-resizer-grip",sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible"}); -c.storage=function(b, a,e,c){b=k(b)[0];var d,g,h=!1;d={};g=b.config;var m=k(b);b=c&&c.id||m.attr(c&&c.group||"data-table-group")||b.id||k(".tablesorter").index(m);c=c&&c.url||m.attr(c&&c.page||"data-table-page")||g&&g.fixedUrl||window.location.pathname;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","temp"),h=!0,window.localStorage.removeItem("_tmptest")}catch(q){}k.parseJSON&&(h?d=k.parseJSON(localStorage[a]||"{}"):(g=document.cookie.split(/[;\s|=]/),d=k.inArray(a,g)+1,d=0!==d?k.parseJSON(g[d]|| "{}"):{}));if((e||""===e)&&window.JSON&&JSON.hasOwnProperty("stringify"))d[c]||(d[c]={}),d[c][b]=e,h?localStorage[a]=JSON.stringify(d):(e=new Date,e.setTime(e.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(d).replace(/\"/g,'"')+"; expires="+e.toGMTString()+"; path=/");else return d&&d[c]?d[c][b]:""}; -c.addHeaderResizeEvent=function(b,a,e){var c;e=k.extend({},{timer:250},e);var d=b.config,g=d.widgetOptions,h=function(a){g.resize_flag=!0;c=[];d.$headers.each(function(){var a=k(this),b=a.data("savedSizes")|| [0,0],e=this.offsetWidth,d=this.offsetHeight;if(e!==b[0]||d!==b[1])a.data("savedSizes",[e,d]),c.push(this)});c.length&&!1!==a&&d.$table.trigger("resize",[c]);g.resize_flag=!1};h(!1);clearInterval(g.resize_timer);if(a)return g.resize_flag=!1;g.resize_timer=setInterval(function(){g.resize_flag||h()},e.timer)}; -c.addWidget({id:"uitheme",priority:10,format:function(b,a,e){var f,d,g,h,m=c.themes,q=a.$table,p=a.$headers,n=a.theme||"jui",l=m[n]||m.jui,v=l.sortNone+" "+l.sortDesc+" "+l.sortAsc;a.debug&&(f= new Date);q.hasClass("tablesorter-"+n)&&a.theme!==n&&b.hasInitialized||(""!==l.even&&(e.zebra[0]+=" "+l.even),""!==l.odd&&(e.zebra[1]+=" "+l.odd),q.find("caption").addClass(l.caption),b=q.removeClass(""===a.theme?"":"tablesorter-"+a.theme).addClass("tablesorter-"+n+" "+l.table).find("tfoot"),b.length&&b.find("tr").addClass(l.footerRow).children("th, td").addClass(l.footerCells),p.addClass(l.header).not(".sorter-false").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){k(this)["mouseenter"=== a.type?"addClass":"removeClass"](l.hover)}),p.find("."+c.css.wrapper).length||p.wrapInner('
'),a.cssIcon&&p.find("."+c.css.icon).addClass(l.icons),q.hasClass("hasFilters")&&p.find("."+c.css.filterRow).addClass(l.filterRow));k.each(p,function(){g=k(this);h=c.css.icon?g.find("."+c.css.icon):g;this.sortDisabled?(g.removeClass(v),h.removeClass(v+" "+l.icons)):(d=g.hasClass(c.css.sortAsc)?l.sortAsc:g.hasClass(c.css.sortDesc)? l.sortDesc:g.hasClass(c.css.header)?l.sortNone:"",g[d===l.sortNone?"removeClass":"addClass"](l.active),h.removeClass(v).addClass(d))});a.debug&&c.benchmark("Applying "+n+" theme",f)},remove:function(b,a,e){b=a.$table;a=a.theme||"jui";e=c.themes[a]||c.themes.jui;var f=b.children("thead").children(),d=e.sortNone+" "+e.sortDesc+" "+e.sortAsc;b.removeClass("tablesorter-"+a+" "+e.table).find(c.css.header).removeClass(e.header);f.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(e.hover+" "+ d+" "+e.active).find("."+c.css.filterRow).removeClass(e.filterRow);f.find("."+c.css.icon).removeClass(e.icons)}}); -c.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(b,a,e){var f,d,g,h,m,q,p,n,l=a.$table,v=a.$tbodies,s=a.sortList,u=s.length,w=e&&e.columns||["primary","secondary","tertiary"],x=w.length-1;p=w.join(" ");a.debug&&(f=new Date);for(g=0;g=]/g},types:{regex:function(b,a,e,f){if(c.filter.regex.regex.test(a)){var d; b=c.filter.regex.regex.exec(a);try{d=RegExp(b[1],b[2]).test(f)}catch(g){d=!1}return d}return null},operators:function(b,a,e,f,d,g,h,k,q){if(/^[<>]=?/.test(a)){var p,n;p=h.config;b=c.formatFloat(a.replace(c.filter.regex.operators,""),h);e=p.parsers[g];k=b;if(q[g]||"numeric"===e.type)p=e.format(""+a.replace(c.filter.regex.operators,""),h,p.$headers.eq(g),g),b="number"!==typeof b||""===p||isNaN(p)?b:p;p=!q[g]&&"numeric"!==e.type||isNaN(b)||!d?isNaN(f)?c.formatFloat(f.replace(c.filter.regex.nondigit, ""),h):c.formatFloat(f,h):d;/>/.test(a)&&(n=/>=/.test(a)?p>=b:p>b);/k&&(f=e,e=k,k=f);return a>=e&&a<=k||""===e||""===k}return null},wild:function(b,a,c,f,d,g,h,m,q,p){return/[\?|\*]/.test(a)||/\s+OR\s+/i.test(b)?(b=h.config,a=a.replace(/\s+OR\s+/gi,"|"),!b.$headers.filter('[data-column="'+g+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(p)?"("+a+")":"^("+a+")$"),RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g, "\\S*")).test(f)):null},fuzzy:function(b,a,c,f){if(/^~/.test(a)){b=0;c=f.length;var d=a.slice(1);for(a=0;a'+(g.data("placeholder")||g.attr("data-placeholder")||e.filter_placeholder.select||"")+"":"",f+='");a.$table.find("thead").find("select."+c.css.filter+'[data-column="'+h+'"]').append(f)}c.filter.buildDefault(b,!0);c.filter.bindSearch(b,a.$table.find("."+c.css.filter),!0);e.filter_external&&c.filter.bindSearch(b,e.filter_external); e.filter_hideFilters&&c.filter.hideFilters(b,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(d,e){g=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?g:"")});a.debug&&c.benchmark("Applying Filter widget",q);a.$table.bind("tablesorter-initialized pagerInitialized",function(){m=c.filter.setDefaults(b,a,e)||[];m.length&&c.setFilters(b, m,!0);a.$table.trigger("filterFomatterUpdate");c.filter.checkFilters(b,m)});e.filter_initialized=!0;a.$table.trigger("filterInit")},setDefaults:function(b,a,e){var f,d=c.getFilters(b)||[];e.filter_saveFilters&&c.storage&&(f=c.storage(b,"tablesorter-filters")||[],(b=k.isArray(f))&&""===f.join("")||!b||(d=f));if(""===d.join(""))for(b=0;b';for(b=0;b";a.$filters=k(d+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(b=0;b").appendTo(a.$filters.eq(b)):(e.filter_formatter&&k.isFunction(e.filter_formatter[b])?((d=e.filter_formatter[b](a.$filters.eq(b),b))&&0===d.length&&(d=a.$filters.eq(b).children("input")),d&&(0===d.parent().length||d.parent().length&&d.parent()[0]!==a.$filters[b])&&a.$filters.eq(b).append(d)):d=k('').appendTo(a.$filters.eq(b)),d&&d.attr("placeholder",f.data("placeholder")||f.attr("data-placeholder")||e.filter_placeholder.search||"")),d&&(f=(k.isArray(e.filter_cssFilter)? "undefined"!==typeof e.filter_cssFilter[b]?e.filter_cssFilter[b]||"":"":e.filter_cssFilter)||"",d.addClass(c.css.filter+" "+f).attr("data-column",b),g&&(d.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(b,a,e){b=k(b)[0];a=k(a);if(a.length){var f=b.config,d=f.widgetOptions,g=d.filter_$externalFilters;!0!==e&&(d.filter_$anyMatch=a.filter('[data-column="all"]'),d.filter_$externalFilters=g&&g.length?d.filter_$externalFilters.add(a):a,c.setFilters(b,f.$table.data("lastSearch")|| [],!1===e));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keyup","search","change",""].join(f.namespace+"filter ")).bind(["keyup","search","change",""].join(f.namespace+"filter "),function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if("number"===typeof d.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===d.filter_liveSearch&&13!==a.which||37<=a.which&&40>=a.which|| 13!==a.which&&!1===d.filter_liveSearch))return;c.filter.searching(b,!0,!0)});f.$table.bind("filterReset",function(){a.val("")})}},checkFilters:function(b,a,e){var f=b.config,d=f.widgetOptions,g=k.isArray(a),h=g?a:c.getFilters(b,!0),m=(h||[]).join("");g&&c.setFilters(b,h,!1,!0!==e);d.filter_hideFilters&&f.$table.find("."+c.css.filterRow).trigger(""===m?"mouseleave":"mouseenter");if(f.lastCombinedFilter!==m||!1===a)if(!1===a&&(f.lastCombinedFilter=null),f.$table.trigger("filterStart",[h]),f.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 e,f,d;a.$table.find("."+c.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(b){e=k(this);clearTimeout(d);d=setTimeout(function(){/enter|over/.test(b.type)?e.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==e[0]&&""===a.lastCombinedFilter&&e.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(a){f=k(this).closest("tr");clearTimeout(d);d=setTimeout(function(){if(""=== c.getFilters(b).join(""))f["focus"===a.type?"removeClass":"addClass"]("hideme")},200)})},findRows:function(b,a,e){if(b.config.lastCombinedFilter!==e){var f,d,g,h,m,q,p,n,l,v,s,u,w,x,A,z,y,D,B,C,L,E,G,H,I,J,M,r=b.config,t=r.widgetOptions,N=r.columns,K=r.$table.children("tbody"),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"):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 B=z,!1}),C=null!==B?B:0<=(J+s).indexOf(G));for(l=0;l'+(h.data("placeholder")||h.attr("data-placeholder")||g.filter_placeholder.select||"")+"",m=c.filter.getOptionSource(b,a,f),q=d.$table.find("thead").find("select."+c.css.filter+'[data-column="'+a+'"]').val();for(b=0;b"+m[b]+"":"";d=(d.$filters?d.$filters:d.$table.children("thead")).find("."+c.css.filter);g.filter_$externalFilters&&(d=d&&d.length?d.add(g.filter_$externalFilters):g.filter_$externalFilters);d.filter('select[data-column="'+a+'"]')[e?"html":"append"](h)}},buildDefault:function(b,a){var e,f,d=b.config,g=d.widgetOptions,h=d.columns;for(e=0;eb.top&&cMath.abs(q.parent().width()-q.width()), s=function(){c.storage&&n&&l&&(m={},m[n.index()]=n.width(),m[l.index()]=l.width(),n.width(m[n.index()]),l.width(m[l.index()]),!1!==e.resizable&&c.storage(b,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));p=0;n=l=null;k(window).trigger("resize")};if(m=c.storage&&!1!==e.resizable?c.storage(b,"tablesorter-resizable"):{})for(h in m)!isNaN(h)&&h
');e.resizable_addLastColumn||(g=g.slice(0,-1));d=d?d.add(g):g});d.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!==p&&n){var b=a.pageX-p,c=n.width();n.width(c+b);n.width()!==c&&v&&l.width(l.width()-b);p=a.pageX}}).bind("mouseup.tsresize",function(){s()}).find("."+c.css.resizer+",."+c.css.grip).bind("mousedown",function(b){n=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+ n.attr("data-column")+'"]');1
'),a.cssIcon&&g.find("."+d.css.icon).addClass(m.icons),c.hasClass("hasFilters")&&g.find("."+d.css.filterRow).addClass(m.filterRow));for(c=0;c=]/g},types:{regex:function(b,a,e,c){if(d.filter.regex.regex.test(a)){var f;b=d.filter.regex.regex.exec(a);try{f=RegExp(b[1],b[2]).test(c)}catch(g){f=!1}return f}return null},operators:function(b,a,e,c,f,g,h,l,k){if(/^[<>]=?/.test(a)){var q,n;q=h.config;b=d.formatFloat(a.replace(d.filter.regex.operators,""),h);e=q.parsers[g];l=b;if(k[g]||"numeric"=== e.type)q=e.format(""+a.replace(d.filter.regex.operators,""),h,q.$headers.eq(g),g),b="number"!==typeof b||""===q||isNaN(q)?b:q;q=!k[g]&&"numeric"!==e.type||isNaN(b)||!f?isNaN(c)?d.formatFloat(c.replace(d.filter.regex.nondigit,""),h):d.formatFloat(c,h):f;/>/.test(a)&&(n=/>=/.test(a)?q>=b:q>b);/l&&(c=e,e=l,l=c);return a>=e&&a<=l||""===e||""===l}return null},wild:function(b,a,e,c,d,g,h,l,m,q){return/[\?|\*]/.test(a)|| /\s+OR\s+/i.test(b)?(b=h.config,a=a.replace(/\s+OR\s+/gi,"|"),!b.$headers.filter('[data-column="'+g+'"]:last').hasClass("filter-match")&&/\|/.test(a)&&(a=k.isArray(q)?"("+a+")":"^("+a+")$"),RegExp(a.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*")).test(c)):null},fuzzy:function(b,a,e,c){if(/^~/.test(a)){b=0;e=c.length;var d=a.slice(1);for(a=0;a'+(g.data("placeholder")|| g.attr("data-placeholder")||e.filter_placeholder.select||"")+"":"",c+='");a.$table.find("thead").find("select."+d.css.filter+'[data-column="'+h+'"]').append(c)}d.filter.buildDefault(b,!0);d.filter.bindSearch(b,a.$table.find("."+d.css.filter),!0);e.filter_external&&d.filter.bindSearch(b,e.filter_external);e.filter_hideFilters&&d.filter.hideFilters(b,a);a.showProcessing&&a.$table.bind("filterStart"+a.namespace+"filter filterEnd"+a.namespace+"filter",function(e, c){g=c?a.$table.find("."+d.css.header).filter("[data-column]").filter(function(){return""!==c[k(this).data("column")]}):"";d.isProcessing(b,"filterStart"===e.type,c?g:"")});a.debug&&d.benchmark("Applying Filter widget",m);a.$table.bind("tablesorter-initialized pagerInitialized",function(){l=d.filter.setDefaults(b,a,e)||[];l.length&&d.setFilters(b,l,!0);a.$table.trigger("filterFomatterUpdate");d.filter.checkFilters(b,l)});e.filter_initialized=!0;a.$table.trigger("filterInit")},setDefaults:function(b, a,e){var c,f=d.getFilters(b)||[];e.filter_saveFilters&&d.storage&&(c=d.storage(b,"tablesorter-filters")||[],(b=k.isArray(c))&&""===c.join("")||!b||(f=c));if(""===f.join(""))for(b=0;b';for(b=0;b";a.$filters=k(f+"").appendTo(a.$table.children("thead").eq(0)).find("td"); for(b=0;b").appendTo(a.$filters.eq(b)):(e.filter_formatter&&k.isFunction(e.filter_formatter[b])?((f=e.filter_formatter[b](a.$filters.eq(b),b))&&0=== f.length&&(f=a.$filters.eq(b).children("input")),f&&(0===f.parent().length||f.parent().length&&f.parent()[0]!==a.$filters[b])&&a.$filters.eq(b).append(f)):f=k('').appendTo(a.$filters.eq(b)),f&&f.attr("placeholder",c.data("placeholder")||c.attr("data-placeholder")||e.filter_placeholder.search||"")),f&&(c=(k.isArray(e.filter_cssFilter)?"undefined"!==typeof e.filter_cssFilter[b]?e.filter_cssFilter[b]||"":"":e.filter_cssFilter)||"",f.addClass(d.css.filter+" "+c).attr("data-column", b),g&&(f.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(b,a,e){b=k(b)[0];a=k(a);if(a.length){var c=b.config,f=c.widgetOptions,g=f.filter_$externalFilters;!0!==e&&(f.filter_$anyMatch=a.filter('[data-column="all"]'),f.filter_$externalFilters=g&&g.length?f.filter_$externalFilters.add(a):a,d.setFilters(b,c.$table.data("lastSearch")||[],!1===e));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(["keyup","search","change",""].join(c.namespace+"filter ")).bind(["keyup", "search","change",""].join(c.namespace+"filter "),function(a){k(this).attr("data-lastSearchTime",(new Date).getTime());if(27===a.which)this.value="";else if("number"===typeof f.filter_liveSearch&&this.value.lengtha.which&&8!==a.which&&!0===f.filter_liveSearch&&13!==a.which||37<=a.which&&40>=a.which||13!==a.which&&!1===f.filter_liveSearch))return;d.filter.searching(b,!0,!0)});c.$table.bind("filterReset",function(){a.val("")})}},checkFilters:function(b, a,e){var c=b.config,f=c.widgetOptions,g=k.isArray(a),h=g?a:d.getFilters(b,!0),l=(h||[]).join("");g&&d.setFilters(b,h,!1,!0!==e);f.filter_hideFilters&&c.$table.find("."+d.css.filterRow).trigger(""===l?"mouseleave":"mouseenter");if(c.lastCombinedFilter!==l||!1===a)if(!1===a&&(c.lastCombinedFilter=null),c.$table.trigger("filterStart",[h]),c.showProcessing)setTimeout(function(){d.filter.findRows(b,h,l);return!1},30);else return d.filter.findRows(b,h,l),!1},hideFilters:function(b,a){var e,c,f;a.$table.find("."+ d.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(b){e=k(this);clearTimeout(f);f=setTimeout(function(){/enter|over/.test(b.type)?e.removeClass("hideme"):k(document.activeElement).closest("tr")[0]!==e[0]&&""===a.lastCombinedFilter&&e.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(a){c=k(this).closest("tr");clearTimeout(f);f=setTimeout(function(){if(""===d.getFilters(b).join(""))c["focus"===a.type?"removeClass":"addClass"]("hideme")},200)})},findRows:function(b, a,e){if(b.config.lastCombinedFilter!==e){var c,f,g,h,l,m,q,n,p,t,v,u,w,x,D,y,B,C,z,A,L,E,G,H,I,J,M,r=b.config,s=r.widgetOptions,N=r.columns,K=r.$table.children("tbody"),O=["range","notMatch","operators"],F=r.$headers.map(function(a){return r.parsers&&r.parsers[a]&&r.parsers[a].parsed||(d.getData?"parsed"===d.getData(r.$headers.filter('[data-column="'+a+'"]:last'),r.headers[a],"filter"):k(this).hasClass("filter-parsed"))}).get();r.debug&&(L=new Date);for(m=0;mk.inArray(a,O)&&(y=c(E,G,I,J,M,N,b,s,F,H),null!==y))return z=y,!1}), A=null!==z?z:0<=(J+v).indexOf(G));for(p=0;p'+(h.data("placeholder")||h.attr("data-placeholder")||g.filter_placeholder.select||"")+"",l=d.filter.getOptionSource(b,a,c),m=f.$table.find("thead").find("select."+d.css.filter+ '[data-column="'+a+'"]').val();for(b=0;b"+l[b]+"":"";f=(f.$filters?f.$filters:f.$table.children("thead")).find("."+d.css.filter);g.filter_$externalFilters&&(f=f&&f.length?f.add(g.filter_$externalFilters):g.filter_$externalFilters);f.filter('select[data-column="'+a+'"]')[e?"html":"append"](h)}},buildDefault:function(b,a){var e,c,f=b.config,g=f.widgetOptions,h=f.columns;for(e= 0;eb.top&&dMath.abs(m.parent().width()-m.width()),v=function(){d.storage&&n&&p&&(l={},l[n.index()]=n.width(),l[p.index()]=p.width(),n.width(l[n.index()]),p.width(l[p.index()]),!1!==e.resizable&&d.storage(b,"tablesorter-resizable",a.$headers.map(function(){return k(this).width()}).get()));q=0;n=p=null;k(window).trigger("resize")};if(l=d.storage&&!1!==e.resizable?d.storage(b,"tablesorter-resizable"):{})for(h in l)!isNaN(h)&&h
');e.resizable_addLastColumn||(g=g.slice(0, -1));f=f?f.add(g):g});f.each(function(){var a=k(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+d.css.wrapper).append('
')}).bind("mousemove.tsresize",function(a){if(0!==q&&n){var b=a.pageX-q,c=n.width();n.width(c+b);n.width()!==c&&t&&p.width(p.width()-b);q=a.pageX}}).bind("mouseup.tsresize",function(){v()}).find("."+d.css.resizer+",."+d.css.grip).bind("mousedown", function(b){n=k(b.target).closest("th");var c=a.$headers.filter('[data-column="'+n.attr("data-column")+'"]');1