Merge lp:~dangarner/xibo/392847 into lp:xibo/1.0

Proposed by Dan Garner
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dangarner/xibo/392847
Merge into: lp:xibo/1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~dangarner/xibo/392847
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+7983@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'server/3rdparty/jQuery/jquery.tablesorter.pack.js'
2--- server/3rdparty/jQuery/jquery.tablesorter.pack.js 2008-12-14 14:42:52 +0000
3+++ server/3rdparty/jQuery/jquery.tablesorter.pack.js 2009-06-27 10:56:12 +0000
4@@ -1,8 +1,7 @@
5 /*
6 *
7 * TableSorter 2.0 - Client-side table sorting with ease!
8- * Version 2.0
9- * @requires jQuery v1.1.3
10+ * Version 2.0.3
11 *
12 * Copyright (c) 2007 Christian Bach
13 * Examples and docs at: http://tablesorter.com
14@@ -11,4 +10,4 @@
15 * http://www.gnu.org/licenses/gpl.html
16 *
17 */
18-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.1z({w:y 6(){7 k=[],12=[];u.2r={2g:"3c",2s:"2V",1P:"3L",2G:"3E",2x:"3w",1y:14,1l:"3b",1q:{},12:[],19:{16:["1X","1U"]},K:{},1Q:F,2I:W,H:[],1t:[],1g:"2u",L:F};6 1f(a,b){18(a+","+(y T().15()-b.15())+"3h")}6 18(s){q(1o 1O!="26"&&1o 1O.L!="26"){1O.18(s)}M{30(s)}}6 23(a,b){q(a.8.L){7 c=""}7 d=[],V=a.13[0].N[0].V,l=V.x;B(7 i=0;i<l;i++){7 p=F;q($.1w&&($(b[i]).Y()&&$(b[i]).Y().17)){p=1L($(b[i]).Y().17)}M q((a.8.K[i]&&a.8.K[i].17)){p=1L(a.8.K[i].17)}q(!p){p=2E(a.8,V[i])}q(a.8.L){c+="1u:"+i+" 3C:"+p.C+"\\n"}d.O(p)}q(a.8.L){18(c)}m d};6 2E(a,b){7 l=k.x;B(7 i=1;i<l;i++){q(k[i].I($.1G(1F(a,b)))){m k[i]}}m k[0]}6 1L(a){7 l=k.x;B(7 i=0;i<l;i++){q(k[i].C.Z()==a.Z()){m k[i]}}m F}6 1K(a){q(a.8.L){7 b=y T()}7 d=(a.13[0]&&a.13[0].N.x)||0,2m=a.13[0].N[0].V.x,k=a.8.1q,R={1x:[],1k:[]};B(7 i=0;i<d;++i){7 c=a.13[0].N[i],1d=[];R.1x.O($(c));B(7 j=0;j<2m;++j){1d.O(k[j].D(1F(a.8,c.V[j]),a,c.V[j]))}1d.O(i);R.1k.O(1d);1d=14};q(a.8.L){1f("3i R B "+d+" N:",b)}m R};6 1F(a,b){q(!b)m"";7 t="";q(1o(a.1l)=="6"){t=a.1l(b)}M q(a.1l=="3e"){t=$(b).1b()}M{q(b.1A[0]&&b.1A[0].3a()){t=b.1A[0].2a}M{t=b.2a}}m t}6 1n(a,b){q(a.8.L){7 d=y T()}7 c=b,r=c.1x,n=c.1k,29=n.x,1B=(n[0].x-1),2d=$("1p:1c",a).32();N=[];B(7 i=0;i<29;i++){N.O(r[n[i][1B]]);q(a.8.1D==14){2d.2k(r[n[i][1B]])}}q(a.8.1D!=14){a.8.1D(a,N)}N=14;1E(a);q(a.8.L){1f("2X 1h:",d)}};6 20(b){q(b.8.L){7 c=y T()}7 d=($.1w)?W:F,1H=[];B(7 i=0;i<b.1e.N.x;i++){1H[i]=0};$1s=$(1J(b,1H,0,b.1e.N[0].V.x));$1s.1r(6(a){u.11=0;u.1u=a;u.1j=1T(b.8.2G);q(1S(u)||1R(b,a))u.1i=W;q(!u.1i){$(u).1m(b.8.2g)}b.8.1t[a]=u});q(b.8.L){1f("2O K:",c);18($1s)}m $1s};6 1J(a,b,d){7 e=[],r=a.1e.N,c=r[d].V;B(7 i=b[d];i<c.x;i++){7 f=c[i];q(f.2N>1){e=e.3K(1J(a,b,d+f.2K))}M{q(a.1e.x==1||(f.2K>1||!r[d+1])){e.O(f)}b[d]=(i+d)}}m e};6 1S(a){q(($.1w)&&($(a).Y().17===F)){m W};m F}6 1R(a,i){q((a.8.K[i])&&(a.8.K[i].17===F)){m W};m F}6 1E(a){7 c=a.8.12;7 l=c.x;B(7 i=0;i<l;i++){2J(c[i]).D(a)}}6 2J(a){7 l=12.x;B(7 i=0;i<l;i++){q(12[i].C.Z()==a.Z()){m 12[i]}}};6 1T(v){q(1o(v)!="3J"){i=(v.Z()=="3I")?1:0}M{i=(v==(0||1))?v:0}m i}6 2H(v,a){7 l=a.x;B(7 i=0;i<l;i++){q(a[i][0]==v){m W}}m F}6 1N(b,c,d,e){c.1v(e[0]).1v(e[1]);7 h=[];c.1r(6(a){q(!u.1i){h[u.1u]=$(u)}});7 l=d.x;B(7 i=0;i<l;i++){h[d[i][0]].1m(e[d[i][1]])}}6 2F(a,b){7 c=a.8;q(c.1Q){7 d=$(\'<3H>\');$("1p:1c 1M:1c 3G",a).1r(6(){d.2k($(\'<3F>\').16(\'2D\',$(u).2D()))});$(a).3D(d)}}6 2B(a,b){7 c=a.8,l=b.x;B(7 i=0;i<l;i++){7 s=b[i],o=c.1t[s[0]];o.11=s[1];o.11++}}6 1I(a,b,d){q(a.8.L){7 f=y T()}7 g="7 2A = 6(a,b) {",l=b.x;B(7 i=0;i<l;i++){7 c=b[i][0];7 h=b[i][1];7 s=(2z(a.8.1q,c)=="1b")?((h==0)?"2y":"2w"):((h==0)?"2v":"2t");7 e="e"+i;g+="7 "+e+" = "+s+"(a["+c+"],b["+c+"]); ";g+="q("+e+") { m "+e+"; } ";g+="M { "}B(7 i=0;i<l;i++){g+="}; "}g+="m 0; ";g+="}; ";3B(g);d.1k.3A(2A);q(a.8.L){1f("3z 3y "+b.3x()+" 3v 3u "+h+" 2q:",f)}m d};6 2y(a,b){m((a<b)?-1:((a>b)?1:0))};6 2w(a,b){m((b<a)?-1:((b>a)?1:0))};6 2v(a,b){m a-b};6 2t(a,b){m b-a};6 2z(a,i){m a[i].J};u.2o=6(f){m u.1r(6(){7 c,$3t,$K,R,8,3s=0,3r;u.8={};8=$.1z(u.8,$.w.2r,f);q(!u.1e||!u.13)m W;c=$(u);$K=20(u);u.8.1q=23(u,$K);R=1K(u);7 d=[8.1P,8.2s];2F(u);$K.3p(6(e){q(!u.1i){7 b=$(u);7 i=u.1u;u.1j=u.11++%2;q(!e[8.2x]){8.H=[];q(8.1y!=14){7 a=8.1y;B(7 j=0;j<a.x;j++){8.H.O(a[j])}}8.H.O([i,u.1j])}M{q(2H(i,8.H)){B(7 j=0;j<8.H.x;j++){7 s=8.H[j],o=8.1t[s[0]];q(s[0]==i){o.11=s[1];o.11++;s[1]=o.11%2}}}M{8.H.O([i,u.1j])}};1N(c[0],$K,8.H,d);1n(c[0],1I(c[0],8.H,R));m F}}).3o(6(){q(8.2I){u.3n=6(){m F};m F}});c.1C("3m",6(){R=1K(u)}).1C("2j",6(e,a){7 b=8.H=a;2B(u,b);1N(u,$K,b,d);1n(u,1I(u,b,R))}).1C("3l",6(){1n(u,R)});q($.1w&&($(u).Y()&&$(u).Y().2i)){8.H=$(u).Y().2i}q(8.H.x>0){c.3k("2j",[8.H])}1E(u)})};u.G=6(b){7 l=k.x,a=W;B(7 i=0;i<l;i++){q(k[i].C.Z()==b.C.Z()){a=F}}q(a){k.O(b)}};u.2h=6(a){12.O(a)};u.S=6(s){7 i=3j(s);m(2f(i))?0:i};u.24=6(s){7 i=3g(s);m(2f(i))?0:i}}});$.3f.1z({w:$.w.2o});$.w.G({C:"1b",I:6(s){m W},D:6(s){m $.1G(s.Z())},J:"1b"});$.w.G({C:"2c",I:6(s){m s.25(y Q(/^\\d+$/))},D:6(s){m $.w.24(s)},J:"P"});$.w.G({C:"3d",I:6(s){m/^[£$€?.]/.U(s)},D:6(s){m $.w.S(s.X(y Q(/[^0-9.]/g),""))},J:"P"});$.w.G({C:"2c",I:6(s){m/^\\d+$/.U(s)},D:6(s){m $.w.S(s)},J:"P"});$.w.G({C:"39",I:6(s){m s.25(y Q(/^(\\+|-)?[0-9]+\\.[0-9]+((E|e)(\\+|-)?[0-9]+)?$/))},D:6(s){m $.w.S(s.X(y Q(/,/),""))},J:"P"});$.w.G({C:"38",I:6(s){m/^\\d{2,3}[\\.]\\d{2,3}[\\.]\\d{2,3}[\\.]\\d{2,3}$/.U(s)},D:6(s){7 a=s.37(".");7 r="";B(7 i=0,1a;1a=a[i];i++){q(1a.x==2){r+="0"+1a}M{r+=1a}}m $.w.S(s)},J:"P"});$.w.G({C:"36",I:6(s){m/^(28?|27|2e):\\/\\/$/.U(s)},D:6(s){m 2b.1G(s.X(y Q(/(28?|27|2e):\\/\\//),\'\'))},J:"1b"});$.w.G({C:"35",I:6(s){m/^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.U(s)},D:6(s){m $.w.S((s!="")?y T(s.X(y Q(/-/g),"/")).15():"0")},J:"P"});$.w.G({C:"34",I:6(s){m/^\\d{1,3}%$/.U(s)},D:6(s){m $.w.S(s.X(y Q(/%/g),""))},J:"P"});$.w.G({C:"33",I:6(s){m/^[A-31-z]{3,10}\\.?[0-9]{1,2},([0-9]{4}|\\\'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\\s(2Z|3q)))$/.U(s);\n },\n D: 6(s) {\n m $.w.S(y T(s).15());\n },\n J: "P"\n });\n \n $.w.G({\n C: "2Y",\n I: 6(s) {\n m /\\d{1,2}[\\/-]\\d{1,2}[\\/-]\\d{2,4}/.U(s);\n },\n D: 6(s,1h) {\n 7 c = 1h.8;\n s = s.X(y Q(/-/g),"/");\n q(c.1g == "2u") {\n /** 2l 22 2p 21 2n D */\n s = s.X(y Q(/(\\d{1,2})[\\/-](\\d{1,2})[\\/-](\\d{4})/), "$3/$1/$2");\n } M q(c.1g == "2W") {\n /** 2l 22 2p 21 2n D */\n s = s.X(y Q(/(\\d{1,2})[\\/-](\\d{1,2})[\\/-](\\d{4})/), "$3/$2/$1");\n } M q(c.1g == "2C/1Z/1Y" || c.1g == "2C-1Z-1Y") {\n s = s.X(y Q(/(\\d{1,2})[\\/-](\\d{1,2})[\\/-](\\d{2})/), "$1/$2/$3"); \n }\n m $.w.S(y T(s).15());\n },\n J: "P"\n });\n \n $.w.G({\n C: "2q",\n I: 6(s) {\n m /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\\s(2U|2T)))$/.U(s);\n },\n D: 6(s) {\n m $.w.S(y T("2S/1W/1W " + s).15());\n },\n J: "P"\n });\n \n \n $.w.G({\n C: "2R",\n I: 6(s) {\n m F;\n },\n D: 6(s,1h,2M) {\n 7 c = 1h.8, p = (!c.1V) ? \'2Q\':c.1V;m $(2M).Y()[p]},J:"P"});$.w.2h({C:"2P",D:6(a){$("> 1p:1c/1M:2L:1X",a).1v(a.8.19.16[1]).1m(a.8.19.16[0]);$("> 1p:1c/1M:2L:1U",a).1v(a.8.19.16[0]).1m(a.8.19.16[1])}})})(2b);',62,234,'||||||function|var|config||||||||||||||return||||if||||this||tablesorter|length|new|||for|id|format||false|addParser|sortList|is|type|headers|debug|else|rows|push|numeric|RegExp|cache|formatFloat|Date|test|cells|true|replace|data|toLowerCase||count|widgets|tBodies|null|getTime|css|sorter|log|widgetZebra|item|text|first|cols|tHead|benchmark|dateFormat|table|sortDisabled|order|normalized|textExtraction|addClass|appendToTable|typeof|tbody|parsers|each|tableHeaders|headerList|column|removeClass|meta|row|sortForce|extend|childNodes|checkCell|bind|appender|applyWidget|getElementText|trim|tableHeadersRows|multisort|checkCellColSpan|buildCache|getParserById|tr|setHeadersCss|console|cssDesc|widthFixed|checkHeaderOptions|checkHeaderMetadata|formatSortingOrder|odd|parserMetadataName|01|even|yy|mm|buildHeaders|in|the|buildParserCache|formatInt|match|undefined|ftp|https|totalRows|innerHTML|jQuery|integer|tableBody|file|isNaN|cssHeader|addWidget|sortlist|sorton|append|reformat|totalCells|ISO|construct|string|time|defaults|cssAsc|sortNumericDesc|us|sortNumeric|sortTextDesc|sortMultiSortKey|sortText|getCachedSortType|sortWrapper|updateHeaderSortCount|dd|width|detectParserForColumn|fixColumnWidth|sortInitialOrder|isValueInArray|cancelSelection|getWidgetById|rowSpan|visible|cell|colSpan|Built|zebra|sortValue|metadata|2000|pm|am|headerSortUp|uk|Rebuilt|shortDate|AM|alert|Za|empty|usLongDate|percent|isoDate|url|split|ipAddress|floating|hasChildNodes|simple|header|currency|complex|fn|parseInt|ms|Building|parseFloat|trigger|appendCache|update|onselectstart|mousedown|click|PM|sortOrder|shiftDown|document|dir|and|shiftKey|toString|on|Sorting|sort|eval|parser|prepend|asc|col|td|colgroup|desc|Number|concat|headerSortDown'.split('|'),0,{}))
19\ No newline at end of file
20+(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
21\ No newline at end of file

Subscribers

People subscribed via source and target branches