Difference between revisions of "Dev/Results"

(I htink because of the double ajax request I get to do my OWN loading message.)
(reordered columns & tweaked styling/alignment)
Line 6: Line 6:
  
 
<style type="text/css">
 
<style type="text/css">
#table_team th, #table_team td {
+
#table_team th{
 
text-align: center;
 
text-align: center;
 
font-size: larger;
 
font-size: larger;
 +
padding: 7px;
 +
}
 +
#table_team td {
 +
padding: 7px;
 +
font-size: larger;
 +
}
 +
td.team-name-column {
 +
text-align: right;
 +
}
 +
td.medal-column {
 +
text-align: center;
 +
}
 +
td.award-column {
 +
text-align: left;
 
}
 
}
 
#table_team tbody img {
 
#table_team tbody img {
Line 114: Line 128:
 
'order': [[1, 'asc']], //I think this sorts by team-name by default
 
'order': [[1, 'asc']], //I think this sorts by team-name by default
 
'data': arrayOfTeamAwards,
 
'data': arrayOfTeamAwards,
'columns': [
+
'columnDefs': [
 +
{ //Team Name Column
 +
'targets': 0,
 +
'className': 'team-name-column',
 +
'data': function(row, type, val, meta) {
 +
if (type == 'display') {
 +
return "<a class='team-info-control' style='cursor: pointer;'>" + row.team_name + "</a>";
 +
}
 +
else {
 +
return row.team_name;
 +
}
 +
}
 +
},
 
{ //Medal Column
 
{ //Medal Column
 +
'targets': '1',
 +
'className': 'medal-column',
 
'width': "10%",
 
'width': "10%",
 
'data': function(row, type, val, meta) {
 
'data': function(row, type, val, meta) {
Line 153: Line 181:
 
else {
 
else {
 
return medals_info[row.medal].html;
 
return medals_info[row.medal].html;
}
 
}
 
},
 
{ //Team Name Column
 
'data': function(row, type, val, meta) {
 
if (type == 'display') {
 
return "<a class='team-info-control' style='cursor: pointer;'>" + row.team_name + "</a>";
 
}
 
else {
 
return row.team_name;
 
 
}
 
}
 
}
 
}
 
},
 
},
 
{ //Award Column
 
{ //Award Column
//'defaultContent': '',
+
'targets': 2,
 +
'className': 'award-column',
 
'data': function(row, type, val, meta) {
 
'data': function(row, type, val, meta) {
 
if (type == 'sort') {
 
if (type == 'sort') {
Line 222: Line 241:
 
<THEAD>
 
<THEAD>
 
<TR>
 
<TR>
<TH>Medal</TH>
 
 
<TH>Team</TH>
 
<TH>Team</TH>
 +
<TH>Medal</TH>
 
<TH>Award</TH>
 
<TH>Award</TH>
 
</TR>
 
</TR>

Revision as of 21:32, 23 September 2015

Comprehensive Results from iGEM

View: [All Teams] [Award Winners] | [Africa] [Asia] [Europe] [Latin America][other?]

Team Medal Award
Please enable JavaScript in your browser to view results.