/*! * TableSorter 2.8.2 min - Client-side table sorting with ease! * Copyright (c) 2007 Christian Bach */ !function(g){g.extend({tablesorter:new function(){function d(c){"undefined"!==typeof console&&"undefined"!==typeof console.log?console.log(c):alert(c)}function w(c,b){d(c+" ("+((new Date).getTime()-b.getTime())+"ms)")}function r(c,b,a){if(!b)return"";var e=c.config,d=e.textExtraction,j="",j="simple"===d?e.supportsTextContent?b.textContent:g(b).text():"function"===typeof d?d(b,c,a):"object"===typeof d&&d.hasOwnProperty(a)?d[a](b,c,a):e.supportsTextContent?b.textContent:g(b).text();return g.trim(j)} function l(c){var b=c.config,a=b.$tbodies=b.$table.children("tbody:not(."+b.cssInfoBlock+")"),e,t,j,h,k,p,m="";if(0===a.length)return b.debug?d("*Empty table!* Not building a parser cache"):"";a=a[0].rows;if(a[0]){e=[];t=a[0].cells.length;for(j=0;j':"";x.$headers=g(c).find(x.selectorHeaders).each(function(c){u=g(this);v=x.headers[c];x.headerContent[c]=this.innerHTML;A=x.headerTemplate.replace(/\{content\}/g,this.innerHTML).replace(/\{icon\}/g,B);x.onRenderTemplate&&(z=x.onRenderTemplate.apply(u,[c,A]))&&"string"===typeof z&&(A=z);this.innerHTML='
'+A+"
";x.onRenderHeader&&x.onRenderHeader.apply(u,[c]);this.column=a[this.parentNode.rowIndex+"-"+ this.cellIndex];var b=f.getData(u,v,"sortInitialOrder")||x.sortInitialOrder;this.order=/^d/i.test(b)||1===b?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;y=f.getData(u,v,"lockedOrder")||!1;"undefined"!==typeof y&&!1!==y&&(this.order=this.lockedOrder=/^d/i.test(y)||1===y?[1,1,1]:[0,0,0]);u.addClass(x.cssHeader);x.headerList[c]=this;u.parent().addClass(x.cssHeaderRow)});E(c);x.debug&&(w("Built headers:",D),d(x.$headers))}function A(c,b,a){var e=g(c);e.find(c.config.selectorRemove).remove();l(c); s(c);D(e,b,a)}function E(c){var b,a=c.config;a.$headers.each(function(c,d){b="false"===f.getData(d,a.headers[c],"sorter");d.sortDisabled=b;g(d)[b?"addClass":"removeClass"]("sorter-false")})}function y(c){var b,a,e,d=c.config,j=d.sortList,h=[d.cssAsc,d.cssDesc],k=g(c).find("tfoot tr").children().removeClass(h.join(" "));d.$headers.removeClass(h.join(" "));e=j.length;for(b=0;bp&&(n.sortList.push([m, p]),1p&&(n.sortList.push([m,p]),1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]};f.benchmark=w;f.construct=function(c){return this.each(function(){if(!this.tHead||0===this.tBodies.length||!0===this.hasInitialized)return this.config&& this.config.debug?d("stopping initialization! No thead, tbody or tablesorter has already been initialized"):"";var b=g(this),a=this,e,t="",j=g.metadata;a.hasInitialized=!1;a.isProcessing=!0;a.config={};e=g.extend(!0,a.config,f.defaults,c);g.data(a,"tablesorter",e);e.debug&&g.data(a,"startoveralltimer",new Date);e.supportsTextContent="x"===g("x")[0].textContent;e.supportsDataObject=1.4<=parseFloat(g.fn.jquery);e.string={max:1,min:-1,"max+":1,"max-":-1,zero:0,none:0,"null":0,top:!0,bottom:!1}; /tablesorter\-/.test(b.attr("class"))||(t=""!==e.theme?" tablesorter-"+e.theme:"");e.$table=b.addClass(e.tableClass+t);e.$tbodies=b.children("tbody:not(."+e.cssInfoBlock+")");z(a);if(a.config.widthFixed&&0===g(a).find("colgroup").length){var h=g(""),k=g(a).width();g(a.tBodies[0]).find("tr:first").children("td").each(function(){h.append(g("").css("width",parseInt(1E3*(g(this).width()/k),10)/10+"%"))});g(a).prepend(h)}l(a);e.delayInit||s(a);I(a);e.supportsDataObject&&"undefined"!==typeof b.data().sortlist? e.sortList=b.data().sortlist:j&&(b.metadata()&&b.metadata().sortlist)&&(e.sortList=b.metadata().sortlist);f.applyWidget(a,!0);0'), a=g.fn.detach?b.detach():b.remove();a=g(c).find("span.tablesorter-savemyplace");b.insertAfter(a);a.remove();c.isProcessing=!1};f.clearTableBody=function(c){g(c)[0].config.$tbodies.empty()};f.restoreHeaders=function(c){var b=c.config;b.$headers.each(function(a){g(this).find(".tablesorter-header-inner").length&&g(this).html(b.headerContent[a])})};f.destroy=function(c,b,a){c=g(c)[0];if(c.hasInitialized){f.refreshWidgets(c,!0,!0);var e=g(c),d=c.config,j=e.find("thead:first"),h=j.find("tr."+d.cssHeaderRow).removeClass(d.cssHeaderRow), k=e.find("tfoot:first > tr").children("th, td");j.find("tr").not(h).remove();e.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave sortBegin sortEnd ".split(" ").join(".tablesorter "));d.$headers.add(k).removeClass(d.cssHeader+" "+d.cssAsc+" "+d.cssDesc).removeAttr("data-column");h.find(d.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter");f.restoreHeaders(c); !1!==b&&e.removeClass(d.tableClass+" tablesorter-"+d.theme);c.hasInitialized=!1;"function"===typeof a&&a(c)}};f.regex=[/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/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];f.sortText=function(c,b,a,e){if(b===a)return 0;var d=c.config,j=d.string[d.empties[e]||d.emptyTo],h=f.regex;if(""===b&&0!==j)return"boolean"===typeof j?j?-1:1:-j||-1;if(""=== a&&0!==j)return"boolean"===typeof j?j?1:-1:j||1;if("function"===typeof d.textSorter)return d.textSorter(b,a,c,e);c=b.replace(h[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");e=a.replace(h[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");b=parseInt(b.match(h[2]),16)||1!==c.length&&b.match(h[1])&&Date.parse(b);if(a=parseInt(a.match(h[2]),16)||b&&a.match(h[1])&&Date.parse(a)||null){if(ba)return 1}d=Math.max(c.length,e.length);for(b=0;bh)return 1}return 0};f.sortTextDesc=function(c,b,a,e){if(b===a)return 0;var d=c.config,j=d.string[d.empties[e]||d.emptyTo];return""===b&&0!==j?"boolean"===typeof j?j?-1:1:j||1:""===a&&0!==j?"boolean"===typeof j?j?1:-1:-j||-1:"function"===typeof d.textSorter?d.textSorter(a,b,c,e):f.sortText(c,a,b)};f.getTextValue=function(c,b,a){if(b){var e= c?c.length:0,d=b+a;for(b=0;bg.inArray(h[e].id,j)))l.debug&&d("Refeshing widgets: Removing "+h[e].id),h[e].hasOwnProperty("remove")&&h[e].remove(c,l,l.widgetOptions);!0!==a&&f.applyWidget(c,b)};f.getData=function(c,b,a){var d="";c=g(c);var f,j;if(!c.length)return"";f=g.metadata?c.metadata():!1;j=" "+(c.attr("class")||""); "undefined"!==typeof c.data(a)||"undefined"!==typeof c.data(a.toLowerCase())?d+=c.data(a)||c.data(a.toLowerCase()):f&&"undefined"!==typeof f[a]?d+=f[a]:b&&"undefined"!==typeof b[a]?d+=b[a]:" "!==j&&j.match(" "+a+"-")&&(d=j.match(RegExp("\\s"+a+"-([\\w-]+)"))[1]||"");return g.trim(d)};f.formatFloat=function(c,b){if("string"!==typeof c||""===c)return c;var a;c=(b&&b.config?!1!==b.config.usNumberFormat:"undefined"!==typeof b?b:1)?c.replace(/,/g,""):c.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(c)&& (c=c.replace(/^\s*\(/,"-").replace(/\)/,""));a=parseFloat(c);return isNaN(a)?g.trim(c):a};f.isDigit=function(c){return isNaN(c)?/^[\-+(]?\d+[)]?$/.test(c.toString().replace(/[,.'"\s]/g,"")):!0}}});var l=g.tablesorter;g.fn.extend({tablesorter:l.construct});l.addParser({id:"text",is:function(){return!0},format:function(d,w){var r=w.config;d&&(d=g.trim(r.ignoreCase?d.toLocaleLowerCase():d),d=r.sortLocaleCompare?l.replaceAccents(d):d);return d},type:"text"});l.addParser({id:"digit",is:function(d){return l.isDigit(d)}, format:function(d,g){return d?l.formatFloat(d.replace(/[^\w,. \-()]/g,""),g):d},type:"numeric"});l.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,g){return d?l.formatFloat(d.replace(/[^\w,. \-()]/g,""),g):d},type:"numeric"});l.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 r,u=d?d.split("."): "",s="",v=u.length;for(r=0;r