From 6186faa5bfa144deb2bb8c49110f29b9278b8393 Mon Sep 17 00:00:00 2001 From: Mottie Date: Sat, 29 Sep 2012 08:42:58 -0500 Subject: [PATCH] uitheme wraps headers in a div for Firefox --- docs/themes.html | 2 +- js/jquery.tablesorter.js | 6 +++--- js/jquery.tablesorter.min.js | 4 ++-- js/jquery.tablesorter.widgets.js | 8 ++++++-- js/jquery.tablesorter.widgets.min.js | 22 +++++++++++----------- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/themes.html b/docs/themes.html index 2722270e..8c490ff5 100644 --- a/docs/themes.html +++ b/docs/themes.html @@ -14,7 +14,7 @@ - + diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 4b167afc..4773277d 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,5 +1,5 @@ /*! -* TableSorter 2.4 - Client-side table sorting with ease! +* TableSorter 2.4.1 - Client-side table sorting with ease! * @requires jQuery v1.2.6+ * * Copyright (c) 2007 Christian Bach @@ -1218,7 +1218,7 @@ ts.addParser({ id: "usLongDate", is: function(s) { - return /^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4}|'?\d{2})\s+(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(s); + return (/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4}|'?\d{2})\s+(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i).test(s); }, format: function(s, table) { return ts.formatFloat( (new Date(s.replace(/(\S)([AP]M)$/i, "$1 $2")).getTime() || ''), table); @@ -1255,7 +1255,7 @@ ts.addParser({ id: "time", is: function(s) { - return /^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(s); + return (/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i).test(s); }, format: function(s, table) { return ts.formatFloat( (new Date("2000/01/01 " + s.replace(/(\S)([AP]M)$/i, "$1 $2")).getTime() || ""), table); diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index 089d26cd..cc0527af 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -1,6 +1,6 @@ /*! -* TableSorter 2.4 - Client-side table sorting with ease! +* TableSorter 2.4.1 - Client-side table sorting with ease! * Minified using UglifyJS (http://jscompress.com/) * Copyright (c) 2007 Christian Bach */ -!function($){"use strict";$.extend({tablesorter:new function(){function log(a){if(typeof console!=="undefined"&&typeof console.log!=="undefined"){console.log(a)}else{alert(a)}}function benchmark(a,b){log(a+" ("+((new Date).getTime()-b.getTime())+"ms)")}function getElementText(a,b,c){if(!b){return""}var d=a.config,e=d.textExtraction,f="";if(e==="simple"){if(d.supportsTextContent){f=b.textContent}else{f=$(b).text()}}else{if(typeof e==="function"){f=e(b,a,c)}else if(typeof e==="object"&&e.hasOwnProperty(c)){f=e[c](b,a,c)}else{f=d.supportsTextContent?b.textContent:$(b).text()}}return $.trim(f)}function detectParserForColumn(a,b,c,d){var e,f=ts.parsers.length,g=false,h="",i=true;while(h===""&&i){c++;if(b[c]){g=b[c].cells[d];h=getElementText(a,g,d);if(a.config.debug){log("Checking if value was empty on row "+c+", column: "+d+": "+h)}}else{i=false}}for(e=1;e':"";this.innerHTML='
'+this.innerHTML+e+"
";if(i.onRenderHeader){i.onRenderHeader.apply(d,[a])}this.column=b[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(ts.getData(d,c,"sortInitialOrder")||i.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;if(ts.getData(d,c,"sorter")==="false"){this.sortDisabled=true;d.addClass("sorter-false")}else{d.removeClass("sorter-false")}this.lockedOrder=false;f=ts.getData(d,c,"lockedOrder")||false;if(typeof f!=="undefined"&&f!==false){this.order=this.lockedOrder=formatSortingOrder(f)?[1,1,1]:[0,0,0]}d.addClass(this.sortDisabled?"sorter-false":i.cssHeader);i.headerList[a]=this;d.parent().addClass(i.cssHeaderRow)});if(a.config.debug){benchmark("Built headers:",g);log(h)}return h}function setHeadersCss(a,b){var c,d=[],e,f,g,h=a.config,i=h.sortList,j=[h.cssDesc,h.cssAsc],k=$(a).find("tfoot tr").children().removeClass(j.join(" "));b.removeClass(j.join(" "));g=i.length;for(e=0;e"),c=$(a).width();$("tr:first td",a.tBodies[0]).each(function(){b.append($("").css("width",parseInt($(this).width()/c*1e3,10)/10+"%"))});$(a).prepend(b)}}function updateHeaderSortCount(a,b){var c,d,e=a.config,f=e.headerList.length,g=b||e.sortList;e.sortList=[];$.each(g,function(a,b){c=[parseInt(b[0],10),parseInt(b[1],10)];d=e.headerList[c[0]];if(d){e.sortList.push(c);d.count=c[1]%(e.sortReset?3:2)}})}function getCachedSortType(a,b){return a&&a[b]?a[b].type||"":""}function multisort(table){var dynamicExp,sortWrapper,col,mx=0,dir=0,tc=table.config,sortList=tc.sortList,l=sortList.length,bl=table.tBodies.length,sortTime,i,j,k,c,cache,lc,s,e,order,orgOrderCol;if(tc.debug){sortTime=new Date}for(k=0;k thead th, > thead td",selectorSort:"th, td",selectorRemove:"tr.remove-me",debug:false,headerList:[],empties:{},strings:{},parsers:[]};ts.benchmark=benchmark;ts.construct=function(a){return this.each(function(){if(!this.tHead||this.tBodies.length===0||this.hasInitialized===true){return}var b,c,d=$(this),e,f,g,h="",i,j,k,l,m=$.metadata;this.hasInitialized=false;this.config={};e=$.extend(true,this.config,ts.defaults,a);$.data(this,"tablesorter",e);if(e.debug){$.data(this,"startoveralltimer",new Date)}e.supportsTextContent=$("x")[0].textContent==="x";e.supportsDataObject=parseFloat($.fn.jquery)>=1.4;e.string={max:1,min:-1,"max+":1,"max-":-1,zero:0,none:0,"null":0,top:true,bottom:false};if(!/tablesorter\-/.test(d.attr("class"))){h=e.theme!==""?" tablesorter-"+e.theme:""}d.addClass(e.tableClass+h);b=buildHeaders(this);e.parsers=buildParserCache(this,b);if(!e.delayInit){buildCache(this)}b.find("*").andSelf().filter(e.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter",function(a,c){var m=$(this).closest("th, td"),n=m[0];if((a.which||a.button)!==1){return false}if(a.type==="mousedown"){l=(new Date).getTime();return a.target.tagName==="INPUT"?"":!e.cancelSelection}if(c!==true&&(new Date).getTime()-l>250){return false}if(e.delayInit&&!e.cache){buildCache(d[0])}if(!n.sortDisabled){d.trigger("sortStart",d[0]);h=!a[e.sortMultiSortKey];n.count=(n.count+1)%(e.sortReset?3:2);if(e.sortRestart){f=n;b.each(function(){if(this!==f&&(h||!$(this).is("."+e.cssDesc+",."+e.cssAsc))){this.count=-1}})}f=n.column;if(h){e.sortList=[];if(e.sortForce!==null){i=e.sortForce;for(g=0;g1){for(g=1;g1){if(ts.isValueInArray(e.sortAppend[0][0],e.sortList)){e.sortList.pop()}}if(ts.isValueInArray(f,e.sortList)){for(g=0;g1){for(g=1;g=0){h=k.eq(l).find("tr").index(m);i=b.cellIndex;g=j.config.cache[l].normalized[h].length-1;j.config.cache[l].row[j.config.cache[l].normalized[h][g]]=m;j.config.cache[l].normalized[h][i]=e.parsers[i].format(getElementText(j,b,i),j,b,i);checkResort(d,c,f)}}).bind("addRows",function(a,b,c,f){var h,i=b.filter("tr").length,j=[],k=b[0].cells.length,l=this,m=$(this).find("tbody").index(b.closest("tbody"));for(h=0;h0){d.trigger("sorton",[e.sortList,{},!e.initWidgets])}else if(e.initWidgets){ts.applyWidget(this)}fixColumnWidth(this);if(e.showProcessing){d.unbind("sortBegin sortEnd").bind("sortBegin sortEnd",function(a){ts.isProcessing(d[0],a.type==="sortBegin")})}this.hasInitialized=true;if(e.debug){ts.benchmark("Overall initialization time",$.data(this,"startoveralltimer"))}d.trigger("tablesorter-initialized",this);if(typeof e.initialized==="function"){e.initialized(this)}})};ts.isProcessing=function(a,b,c){var d=a.config,e=$(a).find("."+d.cssHeader);if(b){if(c){e=c}else if(d.sortList.length>0){e=e.filter(function(){return this.sortDisabled?false:ts.isValueInArray(parseFloat($(this).attr("data-column")),d.sortList)})}e.addClass(d.cssProcessing)}else{e.removeClass(d.cssProcessing)}};ts.processTbody=function(a,b,c){var d,e;if(c){b.before('');e=$.fn.detach?b.detach():b.remove();return e}e=$(a).find("span.tablesorter-savemyplace");b.insertAfter(e);e.remove()};ts.clearTableBody=function(a){$(a.tBodies).filter(":not(."+a.config.cssInfoBlock+")").empty()};ts.destroy=function(a,b,c){var d=$(a),e=a.config,f=d.find("thead:first");a.hasInitialized=false;f.find("tr:not(."+e.cssHeaderRow+")").remove();f.find(".tablesorter-resizer").remove();ts.refreshWidgets(a,true,true);d.removeData("tablesorter").unbind("update updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave").find("."+e.cssHeader).unbind("click mousedown mousemove mouseup").removeClass(e.cssHeader+" "+e.cssAsc+" "+e.cssDesc).find(".tablesorter-header-inner").each(function(){if(e.cssIcon!==""){$(this).find("."+e.cssIcon).remove()}$(this).replaceWith($(this).contents())});if(b!==false){d.removeClass(e.tableClass)}if(typeof c==="function"){c(a)}};ts.regex=[/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,/^0x[0-9a-f]+$/i];ts.sortText=function(a,b,c,d){if(b===c){return 0}var e=a.config,f=e.string[e.empties[d]||e.emptyTo],g=ts.regex,h,i,j,k,l,m,n,o;if(b===""&&f!==0){return typeof f==="boolean"?f?-1:1:-f||-1}if(c===""&&f!==0){return typeof f==="boolean"?f?1:-1:f||1}if(typeof e.textSorter==="function"){return e.textSorter(b,c,a,d)}h=b.replace(g[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");j=c.replace(g[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");i=parseInt(b.match(g[2]),16)||h.length!==1&&b.match(g[1])&&Date.parse(b);k=parseInt(c.match(g[2]),16)||i&&c.match(g[1])&&Date.parse(c)||null;if(k){if(ik){return 1}}o=Math.max(h.length,j.length);for(n=0;nm){return 1}}return 0};ts.sortTextDesc=function(a,b,c,d){if(b===c){return 0}var e=a.config,f=e.string[e.empties[d]||e.emptyTo];if(b===""&&f!==0){return typeof f==="boolean"?f?-1:1:f||1}if(c===""&&f!==0){return typeof f==="boolean"?f?1:-1:-f||-1}if(typeof e.textSorter==="function"){return e.textSorter(c,b,a,d)}return ts.sortText(a,c,b)};ts.getTextValue=function(a,b,c){if(b){var d,e=a.length,f=b+c;for(d=0;d=0){c.widgets.splice(g,1);c.widgets.push("zebra")}if(c.debug){f=new Date}for(g=0;g1){g=0;e=d.children("tr:visible");e.each(function(){f=$(this);if(!l.test(this.className)){g++}h=g%2===0;f.removeClass(c.zebra[h?1:0]).addClass(c.zebra[h?0:1])})}}if(b.debug){ts.benchmark("Applying Zebra widget",i)}},remove:function(a,b,c){var d,e,f=$(a).children("tbody:not(."+b.cssInfoBlock+")"),g=(b.widgetOptions.zebra||["even","odd"]).join(" ");for(d=0;d':"";this.innerHTML='
'+this.innerHTML+e+"
";if(i.onRenderHeader){i.onRenderHeader.apply(d,[a])}this.column=b[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(ts.getData(d,c,"sortInitialOrder")||i.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;if(ts.getData(d,c,"sorter")==="false"){this.sortDisabled=true;d.addClass("sorter-false")}else{d.removeClass("sorter-false")}this.lockedOrder=false;f=ts.getData(d,c,"lockedOrder")||false;if(typeof f!=="undefined"&&f!==false){this.order=this.lockedOrder=formatSortingOrder(f)?[1,1,1]:[0,0,0]}d.addClass(this.sortDisabled?"sorter-false":i.cssHeader);i.headerList[a]=this;d.parent().addClass(i.cssHeaderRow)});if(a.config.debug){benchmark("Built headers:",g);log(h)}return h}function setHeadersCss(a,b){var c,d=[],e,f,g,h=a.config,i=h.sortList,j=[h.cssDesc,h.cssAsc],k=$(a).find("tfoot tr").children().removeClass(j.join(" "));b.removeClass(j.join(" "));g=i.length;for(e=0;e"),c=$(a).width();$("tr:first td",a.tBodies[0]).each(function(){b.append($("").css("width",parseInt($(this).width()/c*1e3,10)/10+"%"))});$(a).prepend(b)}}function updateHeaderSortCount(a,b){var c,d,e=a.config,f=e.headerList.length,g=b||e.sortList;e.sortList=[];$.each(g,function(a,b){c=[parseInt(b[0],10),parseInt(b[1],10)];d=e.headerList[c[0]];if(d){e.sortList.push(c);d.count=c[1]%(e.sortReset?3:2)}})}function getCachedSortType(a,b){return a&&a[b]?a[b].type||"":""}function multisort(table){var dynamicExp,sortWrapper,col,mx=0,dir=0,tc=table.config,sortList=tc.sortList,l=sortList.length,bl=table.tBodies.length,sortTime,i,j,k,c,cache,lc,s,e,order,orgOrderCol;if(tc.debug){sortTime=new Date}for(k=0;k thead th, > thead td",selectorSort:"th, td",selectorRemove:"tr.remove-me",debug:false,headerList:[],empties:{},strings:{},parsers:[]};ts.benchmark=benchmark;ts.construct=function(a){return this.each(function(){if(!this.tHead||this.tBodies.length===0||this.hasInitialized===true){return}var b,c,d=$(this),e,f,g,h="",i,j,k,l,m=$.metadata;this.hasInitialized=false;this.config={};e=$.extend(true,this.config,ts.defaults,a);$.data(this,"tablesorter",e);if(e.debug){$.data(this,"startoveralltimer",new Date)}e.supportsTextContent=$("x")[0].textContent==="x";e.supportsDataObject=parseFloat($.fn.jquery)>=1.4;e.string={max:1,min:-1,"max+":1,"max-":-1,zero:0,none:0,"null":0,top:true,bottom:false};if(!/tablesorter\-/.test(d.attr("class"))){h=e.theme!==""?" tablesorter-"+e.theme:""}d.addClass(e.tableClass+h);b=buildHeaders(this);e.parsers=buildParserCache(this,b);if(!e.delayInit){buildCache(this)}b.find("*").andSelf().filter(e.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter",function(a,c){var m=this.tagName.match("TH|TD")?$(this):$(this).parents("th, td").filter(":last"),n=m[0];if((a.which||a.button)!==1){return false}if(a.type==="mousedown"){l=(new Date).getTime();return a.target.tagName==="INPUT"?"":!e.cancelSelection}if(c!==true&&(new Date).getTime()-l>250){return false}if(e.delayInit&&!e.cache){buildCache(d[0])}if(!n.sortDisabled){d.trigger("sortStart",d[0]);h=!a[e.sortMultiSortKey];n.count=(n.count+1)%(e.sortReset?3:2);if(e.sortRestart){f=n;b.each(function(){if(this!==f&&(h||!$(this).is("."+e.cssDesc+",."+e.cssAsc))){this.count=-1}})}f=n.column;if(h){e.sortList=[];if(e.sortForce!==null){i=e.sortForce;for(g=0;g1){for(g=1;g1){if(ts.isValueInArray(e.sortAppend[0][0],e.sortList)){e.sortList.pop()}}if(ts.isValueInArray(f,e.sortList)){for(g=0;g1){for(g=1;g=0){h=k.eq(l).find("tr").index(m);i=b.cellIndex;g=j.config.cache[l].normalized[h].length-1;j.config.cache[l].row[j.config.cache[l].normalized[h][g]]=m;j.config.cache[l].normalized[h][i]=e.parsers[i].format(getElementText(j,b,i),j,b,i);checkResort(d,c,f)}}).bind("addRows",function(a,b,c,f){var h,i=b.filter("tr").length,j=[],k=b[0].cells.length,l=this,m=$(this).find("tbody").index(b.closest("tbody"));for(h=0;h0){d.trigger("sorton",[e.sortList,{},!e.initWidgets])}else if(e.initWidgets){ts.applyWidget(this)}fixColumnWidth(this);if(e.showProcessing){d.unbind("sortBegin sortEnd").bind("sortBegin sortEnd",function(a){ts.isProcessing(d[0],a.type==="sortBegin")})}this.hasInitialized=true;if(e.debug){ts.benchmark("Overall initialization time",$.data(this,"startoveralltimer"))}d.trigger("tablesorter-initialized",this);if(typeof e.initialized==="function"){e.initialized(this)}})};ts.isProcessing=function(a,b,c){var d=a.config,e=$(a).find("."+d.cssHeader);if(b){if(c){e=c}else if(d.sortList.length>0){e=e.filter(function(){return this.sortDisabled?false:ts.isValueInArray(parseFloat($(this).attr("data-column")),d.sortList)})}e.addClass(d.cssProcessing)}else{e.removeClass(d.cssProcessing)}};ts.processTbody=function(a,b,c){var d,e;if(c){b.before('');e=$.fn.detach?b.detach():b.remove();return e}e=$(a).find("span.tablesorter-savemyplace");b.insertAfter(e);e.remove()};ts.clearTableBody=function(a){$(a.tBodies).filter(":not(."+a.config.cssInfoBlock+")").empty()};ts.destroy=function(a,b,c){var d=$(a),e=a.config,f=d.find("thead:first");a.hasInitialized=false;f.find("tr:not(."+e.cssHeaderRow+")").remove();f.find(".tablesorter-resizer").remove();ts.refreshWidgets(a,true,true);d.removeData("tablesorter").unbind("update updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave").find("."+e.cssHeader).unbind("click mousedown mousemove mouseup").removeClass(e.cssHeader+" "+e.cssAsc+" "+e.cssDesc).find(".tablesorter-header-inner").each(function(){if(e.cssIcon!==""){$(this).find("."+e.cssIcon).remove()}$(this).replaceWith($(this).contents())});if(b!==false){d.removeClass(e.tableClass)}if(typeof c==="function"){c(a)}};ts.regex=[/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,/^0x[0-9a-f]+$/i];ts.sortText=function(a,b,c,d){if(b===c){return 0}var e=a.config,f=e.string[e.empties[d]||e.emptyTo],g=ts.regex,h,i,j,k,l,m,n,o;if(b===""&&f!==0){return typeof f==="boolean"?f?-1:1:-f||-1}if(c===""&&f!==0){return typeof f==="boolean"?f?1:-1:f||1}if(typeof e.textSorter==="function"){return e.textSorter(b,c,a,d)}h=b.replace(g[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");j=c.replace(g[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");i=parseInt(b.match(g[2]),16)||h.length!==1&&b.match(g[1])&&Date.parse(b);k=parseInt(c.match(g[2]),16)||i&&c.match(g[1])&&Date.parse(c)||null;if(k){if(ik){return 1}}o=Math.max(h.length,j.length);for(n=0;nm){return 1}}return 0};ts.sortTextDesc=function(a,b,c,d){if(b===c){return 0}var e=a.config,f=e.string[e.empties[d]||e.emptyTo];if(b===""&&f!==0){return typeof f==="boolean"?f?-1:1:f||1}if(c===""&&f!==0){return typeof f==="boolean"?f?1:-1:-f||-1}if(typeof e.textSorter==="function"){return e.textSorter(c,b,a,d)}return ts.sortText(a,c,b)};ts.getTextValue=function(a,b,c){if(b){var d,e=a.length,f=b+c;for(d=0;d=0){c.widgets.splice(g,1);c.widgets.push("zebra")}if(c.debug){f=new Date}for(g=0;g1){g=0;e=d.children("tr:visible");e.each(function(){f=$(this);if(!l.test(this.className)){g++}h=g%2===0;f.removeClass(c.zebra[h?1:0]).addClass(c.zebra[h?0:1])})}}if(b.debug){ts.benchmark("Applying Zebra widget",i)}},remove:function(a,b,c){var d,e,f=$(a).children("tbody:not(."+b.cssInfoBlock+")"),g=(b.widgetOptions.zebra||["even","odd"]).join(" ");for(d=0;d'); + } if (c.cssIcon){ // if c.cssIcon is '', then no is added to the header $h.find('.' + c.cssIcon).addClass(o.icons); @@ -811,7 +815,7 @@ $.tablesorter.addWidget({ $c = $(this).children(); if (!$(this).find('.tablesorter-wrapper').length) { // Firefox needs this inner div to position the resizer correctly - $c.wrapInner('
') + $c.wrapInner('
'); } $c = $c.slice(0,-1); // don't include the last column of the row $cols = $cols ? $cols.add($c) : $c; diff --git a/js/jquery.tablesorter.widgets.min.js b/js/jquery.tablesorter.widgets.min.js index 2ea4b6f3..515f10b5 100644 --- a/js/jquery.tablesorter.widgets.min.js +++ b/js/jquery.tablesorter.widgets.min.js @@ -1,12 +1,12 @@ -/*! tableSorter 2.4 widgets - updated 9/27/2012 */ -;(function(b){ -b.tablesorter=b.tablesorter||{}; -b.tablesorter.themes={bootstrap:{table:"table table-bordered table-striped",header:"bootstrap-header",icons:"",sortNone:"bootstrap-icon-unsorted",sortAsc:"icon-chevron-up",sortDesc:"icon-chevron-down",active:"",hover:"",filterRow:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",header:"ui-widget-header ui-corner-all ui-state-default",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"}}; -b.tablesorter.storage=function(c,a,e){var d,h=!1;d={};var f=c.id||b(".tablesorter").index(b(c)),g=window.location.pathname;try{h=!!localStorage.getItem}catch(l){}b.parseJSON&&(h?d=b.parseJSON(localStorage[a])||{}:(d=document.cookie.split(/[;\s|=]/),c=b.inArray(a,d)+1,d=0!==c?b.parseJSON(d[c])||{}:{}));if(e&&JSON&&JSON.hasOwnProperty("stringify")){if(!d[g]||!d[g][f])d[g]||(d[g]={});d[g][f]= e;h?localStorage[a]=JSON.stringify(d):(c=new Date,c.setTime(c.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(d).replace(/\"/g,'"')+"; expires="+c.toGMTString()+"; path=/")}else return d&&d.hasOwnProperty(g)&&d[g].hasOwnProperty(f)?d[g][f]:{}}; -b.tablesorter.addWidget({id:"uitheme",format:function(c){var a,e,d,h,f=b(c),g=c.config,l=g.widgetOptions,m="object"===typeof l.uitheme?"jui":l.uitheme||"jui",j="object"===typeof l.uitheme&&!Object.prototype.toString.call(l.uitheme).test("Array")?l.uitheme: b.tablesorter.themes[b.tablesorter.themes.hasOwnProperty(m)?m:"jui"],q=b(g.headerList),p="tr."+(l.stickyHeaders||"tablesorter-stickyHeader"),r=j.sortNone+" "+j.sortDesc+" "+j.sortAsc;g.debug&&(a=new Date);if(!f.hasClass("tablesorter-"+m)||g.theme===m||!c.hasInitialized)""!==j.even&&(l.zebra[0]+=" "+j.even),""!==j.odd&&(l.zebra[1]+=" "+j.odd),f.removeClass(""===g.theme?"":"tablesorter-"+g.theme).addClass("tablesorter-"+m+" "+j.table),g.theme="",q.addClass(j.header).filter(":not(.sorter-false)").hover(function(){b(this).addClass(j.hover)}, function(){b(this).removeClass(j.hover)}),g.cssIcon&&q.find("."+g.cssIcon).addClass(j.icons),f.hasClass("hasFilters")&&q.find(".tablesorter-filter-row").addClass(j.filterRow);b.each(q,function(a){d=b(this);h=g.cssIcon?d.find("."+g.cssIcon):d;this.sortDisabled?(d.removeClass(r),h.removeClass(r+" tablesorter-icon "+j.icons)):(f.hasClass("hasStickyHeaders")&&f.find(p).find("th").eq(a).add(d),e=d.hasClass(g.cssAsc)?j.sortDesc:d.hasClass(g.cssDesc)?j.sortAsc:d.hasClass(g.cssHeader)?j.sortNone:"",d[e=== j.sortNone?"removeClass":"addClass"](j.active),h.removeClass(r).addClass(e))});g.debug&&b.tablesorter.benchmark("Applying "+m+" theme",a)},remove:function(c,a,e){var c=b(c),d="object"===typeof e.uitheme?"jui":e.uitheme||"jui",e="object"===typeof e.uitheme?e.uitheme:b.tablesorter.themes[b.tablesorter.themes.hasOwnProperty(d)?d:"jui"],h=c.children("thead").children(),f=e.sortNone+" "+e.sortDesc+" "+e.sortAsc;c.removeClass("tablesorter-"+d+" "+e.table).find(a.cssHeader).removeClass(e.header);h.unbind("mouseenter mouseleave").removeClass(e.hover+ " "+f+" "+e.active).find(".tablesorter-filter-row").removeClass(e.filterRow);h.find(".tablesorter-icon").removeClass(e.icons)}}); -b.tablesorter.addWidget({id:"columns",format:function(c){var a,e,d,h,f,g,l,m,j,q=b(c),p=c.config,r=p.widgetOptions,n=q.children("tbody:not(."+p.cssInfoBlock+")"),t=p.sortList,v=t.length,k=["primary","secondary","tertiary"],k=p.widgetColumns&&p.widgetColumns.hasOwnProperty("css")?p.widgetColumns.css||k:r&&r.hasOwnProperty("columns")?r.columns||k:k;g=k.length-1;l=k.join(" "); p.debug&&(f=new Date);for(j=0;j=]/g],L= B.map(function(a){return z.getData?"parsed"===z.getData(B.filter('[data-column="'+a+'"]:last'),s.headers[a],"filter"):b(this).hasClass("filter-parsed")}).get(),G,H,C=function(a){var d=b.isArray(a),e=u.find("thead").eq(0).children("tr").find("select."+y+", input."+y),c=d?a:e.map(function(){return b(this).val()||""}).get(),f=(c||[]).join("");d&&e.each(function(c,d){b(d).val(a[c]||"")});!0===i.filter_hideFilters&&u.find(".tablesorter-filter-row").trigger(""===f?"mouseleave":"mouseenter");if(!(F===f&& !1!==a))if(u.trigger("filterStart",[c]),s.showProcessing)setTimeout(function(){I(a,c,f);return!1},30);else return I(a,c,f),!1},I=function(g,h,j){var n,q,p,r,x,w,y;s.debug&&(y=new Date);for(d=0;d]=?/.test(f)?(t=b.tablesorter.formatFloat(m.replace(A[5], ""),c),isNaN(t)&&(t=m),v=b.tablesorter.formatFloat(f.replace(A[5],"").replace(A[6],""),c),/>/.test(f)&&(w=/>=/.test(f)?t>=v:t>v),/'+(B.filter('[data-column="'+a+'"]:last').attr("data-placeholder")||"")+"";for(d=0;d'+n[d]+"";u.find("thead").find("select."+y+'[data-column="'+a+'"]')[f?"html":"append"](g)},K=function(b){for(a=0;a';for(a=0;a":">")+"";u.find("thead").eq(0).append(k+="")}u.bind(["addRows","updateCell","update","appendCache","search"].join(".tsfilter "),function(b,a){"search"!==b.type&&K(!0);C("search"===b.type?a:"");return!1}).find("input."+y).bind("keyup search",function(b,a){if(!(32> b.which&&8!==b.which||37<=b.which&&40>=b.which)){if("undefined"!==typeof a)return C(a),!1;clearTimeout(H);H=setTimeout(function(){C()},i.filter_searchDelay||300)}});i.filter_reset&&b(i.filter_reset).length&&b(i.filter_reset).bind("click",function(){u.find("."+y).val("");C();return!1});if(i.filter_functions)for(x in i.filter_functions)if(i.filter_functions.hasOwnProperty(x)&&"string"===typeof x)if(k=B.filter('[data-column="'+x+'"]:last'),g="",!0===i.filter_functions[x]&&!k.hasClass("filter-false"))J(x); else if("string"===typeof x&&!k.hasClass("filter-false")){for(q in i.filter_functions[x])"string"===typeof q&&(g+=""===g?'":"",g+='");u.find("thead").find("select."+y+'[data-column="'+x+'"]').append(g)}K();u.find("select."+y).bind("change search",function(){C()});!0===i.filter_hideFilters&&u.find(".tablesorter-filter-row").addClass("hideme").bind("mouseenter mouseleave",function(a){var c;p=b(this);clearTimeout(j); j=setTimeout(function(){/enter|over/.test(a.type)?p.removeClass("hideme"):b(document.activeElement).closest("tr")[0]!==p[0]&&(c=u.find("."+(i.filter_cssFilter||"tablesorter-filter")).map(function(){return b(this).val()||""}).get().join(""),""===c&&p.addClass("hideme"))},200)}).find("input, select").bind("focus blur",function(a){r=b(this).closest("tr");clearTimeout(j);j=setTimeout(function(){if(""===u.find("."+(i.filter_cssFilter||"tablesorter-filter")).map(function(){return b(this).val()||""}).get().join(""))r["focus"=== a.type?"removeClass":"addClass"]("hideme")},200)});s.showProcessing&&u.bind("filterStart filterEnd",function(a,c){var d=c?u.find("."+s.cssHeader).filter("[data-column]").filter(function(){return""!==c[b(this).data("column")]}):"";z.isProcessing(u[0],"filterStart"===a.type,c?d:"")});s.debug&&z.benchmark("Applying Filter widget",G);u.trigger("filterInit")}},remove:function(c,a,e){var d,h;d=b(c);a=d.children("tbody:not(."+a.cssInfoBlock+")");d.removeClass("hasFilters").unbind(["addRows","updateCell", "update","appendCache","search"].join(".tsfilter")).find(".tablesorter-filter-row").remove();for(d=0;db.top&&c').not(":last");f=f?f.add(h):h});f.each(function(){a=b(this);e=parseInt(a.css("padding-right"),10)+8;a.find(".tablesorter-wrapper").append('
')}).bind("mousemove.tsresize",function(b){if(0!==j&&q){var a=b.pageX-j;q.width(q.width()+a);p.width(p.width()-a);j=b.pageX}}).bind("mouseup.tsresize",function(){b.tablesorter.storage&&q&&(d[q.index()]=q.width(),d[p.index()]=p.width(),!1!==m.resizable&&b.tablesorter.storage(c,"tablesorter-resizable",d));r()}).find(".tablesorter-resizer").bind("mousedown",function(a){q=b(a.target).closest("th");p=q.next();j=a.pageX});g.find("thead:first").bind("mouseup.tsresize mouseleave.tsresize", function(){r()}).bind("contextmenu.tsresize",function(){b.tablesorter.resizableReset(c);var a=b.isEmptyObject(d);d={};return a})}},remove:function(c){b(c).removeClass("hasResizable").find("thead").unbind("mouseup.tsresize mouseleave.tsresize contextmenu.tsresize").find("tr").children().unbind("mousemove.tsresize mouseup.tsresize").find(".tablesorter-wrapper").each(function(){b(this).find(".tablesorter-resizer").remove();b(this).replaceWith(b(this).contents())});b.tablesorter.resizableReset(c)}}); b.tablesorter.resizableReset=function(c){b(c.config.headerList).width("auto");b.tablesorter.storage(c,"tablesorter-resizable",{})}; -b.tablesorter.addWidget({id:"saveSort",init:function(b,a){a.format(b,!0)},format:function(c,a){var e,d,h=c.config;e=!1!==h.widgetOptions.saveSort;var f={sortList:h.sortList};h.debug&&(d=new Date);b(c).hasClass("hasSaveSort")?e&&(c.hasInitialized&&b.tablesorter.storage)&&(b.tablesorter.storage(c,"tablesorter-savesort",f),h.debug&&b.tablesorter.benchmark("saveSort widget: Saving last sort: "+ h.sortList,d)):(b(c).addClass("hasSaveSort"),f="",b.tablesorter.storage&&(f=(e=b.tablesorter.storage(c,"tablesorter-savesort"))&&e.hasOwnProperty("sortList")&&b.isArray(e.sortList)?e.sortList:"",h.debug&&b.tablesorter.benchmark('saveSort: Last sort loaded: "'+f+'"',d)),a&&f&&0'),g.cssIcon&&n.find("."+g.cssIcon).addClass(j.icons),f.hasClass("hasFilters")&&n.find(".tablesorter-filter-row").addClass(j.filterRow);a.each(n,function(b){c=a(this);h=g.cssIcon?c.find("."+g.cssIcon):c;this.sortDisabled?(c.removeClass(r),h.removeClass(r+" tablesorter-icon "+j.icons)):(f.hasClass("hasStickyHeaders")&& f.find(q).find("th").eq(b).add(c),e=c.hasClass(g.cssAsc)?j.sortDesc:c.hasClass(g.cssDesc)?j.sortAsc:c.hasClass(g.cssHeader)?j.sortNone:"",c[e===j.sortNone?"removeClass":"addClass"](j.active),h.removeClass(r).addClass(e))});g.debug&&a.tablesorter.benchmark("Applying "+m+" theme",b)},remove:function(d,b,e){var d=a(d),c="object"===typeof e.uitheme?"jui":e.uitheme||"jui",e="object"===typeof e.uitheme?e.uitheme:a.tablesorter.themes[a.tablesorter.themes.hasOwnProperty(c)?c:"jui"],h=d.children("thead").children(), f=e.sortNone+" "+e.sortDesc+" "+e.sortAsc;d.removeClass("tablesorter-"+c+" "+e.table).find(b.cssHeader).removeClass(e.header);h.unbind("mouseenter mouseleave").removeClass(e.hover+" "+f+" "+e.active).find(".tablesorter-filter-row").removeClass(e.filterRow);h.find(".tablesorter-icon").removeClass(e.icons)}}); +a.tablesorter.addWidget({id:"columns",format:function(d){var b,e,c,h,f,g,l,m,j,n=a(d),q=d.config,r=q.widgetOptions,p=n.children("tbody:not(."+q.cssInfoBlock+")"),t=q.sortList,v=t.length,k=["primary", "secondary","tertiary"],k=q.widgetColumns&&q.widgetColumns.hasOwnProperty("css")?q.widgetColumns.css||k:r&&r.hasOwnProperty("columns")?r.columns||k:k;g=k.length-1;l=k.join(" ");q.debug&&(f=new Date);for(j=0;j=]/g],L=B.map(function(b){return z.getData?"parsed"===z.getData(B.filter('[data-column="'+b+'"]:last'),s.headers[b],"filter"):a(this).hasClass("filter-parsed")}).get(),G,H,C=function(b){var c=a.isArray(b),e=u.find("thead").eq(0).children("tr").find("select."+y+", input."+y),d=c?b:e.map(function(){return a(this).val()||""}).get(),f=(d|| []).join("");c&&e.each(function(c,d){a(d).val(b[c]||"")});!0===i.filter_hideFilters&&u.find(".tablesorter-filter-row").trigger(""===f?"mouseleave":"mouseenter");if(!(F===f&&!1!==b))if(u.trigger("filterStart",[d]),s.showProcessing)setTimeout(function(){I(b,d,f);return!1},30);else return I(b,d,f),!1},I=function(g,h,j){var p,n,q,r,x,w,y;s.debug&&(y=new Date);for(c=0;c]=?/.test(f)?(t=a.tablesorter.formatFloat(m.replace(A[5],""),d),isNaN(t)&&(t=m),v=a.tablesorter.formatFloat(f.replace(A[5],"").replace(A[6],""),d),/>/.test(f)&&(w=/>=/.test(f)?t>=v:t>v),/'+(B.filter('[data-column="'+b+'"]:last').attr("data-placeholder")||"")+"";for(c=0;c'+p[c]+"";u.find("thead").find("select."+y+'[data-column="'+b+'"]')[f?"html":"append"](g)},K=function(a){for(b=0;b';for(b=0;b":">")+"";u.find("thead").eq(0).append(k+="")}u.bind(["addRows","updateCell","update", "appendCache","search"].join(".tsfilter "),function(a,b){"search"!==a.type&&K(!0);C("search"===a.type?b:"");return!1}).find("input."+y).bind("keyup search",function(a,b){if(!(32>a.which&&8!==a.which||37<=a.which&&40>=a.which)){if("undefined"!==typeof b)return C(b),!1;clearTimeout(H);H=setTimeout(function(){C()},i.filter_searchDelay||300)}});i.filter_reset&&a(i.filter_reset).length&&a(i.filter_reset).bind("click",function(){u.find("."+y).val("");C();return!1});if(i.filter_functions)for(x in i.filter_functions)if(i.filter_functions.hasOwnProperty(x)&& "string"===typeof x)if(k=B.filter('[data-column="'+x+'"]:last'),g="",!0===i.filter_functions[x]&&!k.hasClass("filter-false"))J(x);else if("string"===typeof x&&!k.hasClass("filter-false")){for(n in i.filter_functions[x])"string"===typeof n&&(g+=""===g?'":"",g+='");u.find("thead").find("select."+y+'[data-column="'+x+'"]').append(g)}K();u.find("select."+y).bind("change search",function(){C()});!0===i.filter_hideFilters&& u.find(".tablesorter-filter-row").addClass("hideme").bind("mouseenter mouseleave",function(b){var c;q=a(this);clearTimeout(j);j=setTimeout(function(){/enter|over/.test(b.type)?q.removeClass("hideme"):a(document.activeElement).closest("tr")[0]!==q[0]&&(c=u.find("."+(i.filter_cssFilter||"tablesorter-filter")).map(function(){return a(this).val()||""}).get().join(""),""===c&&q.addClass("hideme"))},200)}).find("input, select").bind("focus blur",function(b){r=a(this).closest("tr");clearTimeout(j);j=setTimeout(function(){if(""=== u.find("."+(i.filter_cssFilter||"tablesorter-filter")).map(function(){return a(this).val()||""}).get().join(""))r["focus"===b.type?"removeClass":"addClass"]("hideme")},200)});s.showProcessing&&u.bind("filterStart filterEnd",function(b,c){var d=c?u.find("."+s.cssHeader).filter("[data-column]").filter(function(){return""!==c[a(this).data("column")]}):"";z.isProcessing(u[0],"filterStart"===b.type,c?d:"")});s.debug&&z.benchmark("Applying Filter widget",G);u.trigger("filterInit")}},remove:function(d,b, e){var c,h;c=a(d);b=c.children("tbody:not(."+b.cssInfoBlock+")");c.removeClass("hasFilters").unbind(["addRows","updateCell","update","appendCache","search"].join(".tsfilter")).find(".tablesorter-filter-row").remove();for(c=0;ca.top&&c');h=h.slice(0,-1);f=f?f.add(h):h});f.each(function(){b= a(this);e=parseInt(b.css("padding-right"),10)+8;b.find(".tablesorter-wrapper").append('
')}).bind("mousemove.tsresize",function(a){if(0!==j&&n){var b=a.pageX-j;n.width(n.width()+b);q.width(q.width()-b);j=a.pageX}}).bind("mouseup.tsresize",function(){a.tablesorter.storage&&n&&(c[n.index()]=n.width(),c[q.index()]=q.width(),!1!==m.resizable&&a.tablesorter.storage(d,"tablesorter-resizable", c));r()}).find(".tablesorter-resizer").bind("mousedown",function(b){n=a(b.target).parents("th:last");q=n.next();j=b.pageX});g.find("thead:first").bind("mouseup.tsresize mouseleave.tsresize",function(){r()}).bind("contextmenu.tsresize",function(){a.tablesorter.resizableReset(d);var b=a.isEmptyObject?a.isEmptyObject(c):c==={};c={};return b})}},remove:function(d){a(d).removeClass("hasResizable").find("thead").unbind("mouseup.tsresize mouseleave.tsresize contextmenu.tsresize").find("tr").children().unbind("mousemove.tsresize mouseup.tsresize").find(".tablesorter-wrapper").each(function(){a(this).find(".tablesorter-resizer").remove(); a(this).replaceWith(a(this).contents())});a.tablesorter.resizableReset(d)}});a.tablesorter.resizableReset=function(d){a(d.config.headerList).width("auto");a.tablesorter.storage(d,"tablesorter-resizable",{})}; +a.tablesorter.addWidget({id:"saveSort",init:function(a,b){b.format(a,!0)},format:function(d,b){var e,c,h=d.config;e=!1!==h.widgetOptions.saveSort;var f={sortList:h.sortList};h.debug&&(c=new Date);a(d).hasClass("hasSaveSort")?e&&(d.hasInitialized&&a.tablesorter.storage)&&(a.tablesorter.storage(d, "tablesorter-savesort",f),h.debug&&a.tablesorter.benchmark("saveSort widget: Saving last sort: "+h.sortList,c)):(a(d).addClass("hasSaveSort"),f="",a.tablesorter.storage&&(f=(e=a.tablesorter.storage(d,"tablesorter-savesort"))&&e.hasOwnProperty("sortList")&&a.isArray(e.sortList)?e.sortList:"",h.debug&&a.tablesorter.benchmark('saveSort: Last sort loaded: "'+f+'"',c)),b&&f&&0