more work for #179.

Due to changed display of the portal image it now doesn’t flicker anymore,
which simplifies code a lot.
This commit is contained in:
Stefan Breunig
2013-02-16 10:02:18 +01:00
parent 43d9251c57
commit 2023e33567
5 changed files with 120 additions and 124 deletions

View File

@ -216,3 +216,15 @@ window.uniqueArray = function(arr) {
return $.inArray(v, arr) === i;
});
}
window.genFourColumnTable = function(blocks) {
var t = $.map(blocks, function(detail, index) {
if(!detail) return '';
if(index % 2 === 0)
return '<tr><td>'+detail[1]+'</td><th>'+detail[0]+'</th>';
else
return ' <th>'+detail[0]+'</th><td>'+detail[1]+'</td></tr>';
}).join('');
if(t.length % 2 === 1) t + '<td></td><td></td></tr>';
return t;
}