Line 15: | Line 15: | ||
.title_award_track.nominees_section{ | .title_award_track.nominees_section{ | ||
− | border-bottom: 1px solid #dcdcdc; | + | border-bottom: 1px solid #dcdcdc; |
width: 85%; | width: 85%; | ||
} | } | ||
Line 855: | Line 855: | ||
{'team_name':'ZJUT-China', 'wiki_link':'https://2018.igem.org/Team:ZJUT-China','location':'China', 'institution':'Zhejiang University of Technology','section':'Undergrad', 'track':'Environment','region':'Asia','medal':'Gold','award':'-','nomination':'-'}]; | {'team_name':'ZJUT-China', 'wiki_link':'https://2018.igem.org/Team:ZJUT-China','location':'China', 'institution':'Zhejiang University of Technology','section':'Undergrad', 'track':'Environment','region':'Asia','medal':'Gold','award':'-','nomination':'-'}]; | ||
///////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////// | ||
− | |||
− | |||
− | |||
Line 864: | Line 861: | ||
for( x=0; x< data.length; x++) { | for( x=0; x< data.length; x++) { | ||
+ | //append team based on what medal they won, if a team didn't get a medal('-'), they aren't appended | ||
$("#"+data[x].medal+"_medals").append("<a href='"+data[x].wiki_link+"'><li>"+data[x].team_name+"</li></a>"); | $("#"+data[x].medal+"_medals").append("<a href='"+data[x].wiki_link+"'><li>"+data[x].team_name+"</li></a>"); | ||
Line 869: | Line 867: | ||
− | // | + | //create a list of unique prizes |
− | + | var all_awards_str =""; | |
− | + | //generate a string with all the prizes | |
− | + | for (x=0; x< data.length; x++){ | |
− | + | if(data[x].award != '-'){ | |
− | + | all_awards_str = all_awards_str + data[x].award +", "; | |
− | + | } | |
− | } | + | |
− | //split the string into an array | + | } |
− | + | ||
+ | //split the string into an array | ||
+ | var all_awards_ar = all_awards_str.split(', '); | ||
− | + | //get all the unique values of the array | |
− | + | const unique = (value, index, self) => { | |
− | + | return self.indexOf(value) === index; | |
− | + | } | |
− | + | const unique_awards = all_awards_ar.filter(unique); | |
− | + | //sort the unique values alphabetically | |
− | + | unique_awards.sort(); | |
− | + | ||
− | + | //for each prize on the list, find what teams won or were nominated and append them | |
+ | //note: this will be this starts in 1 since the array has an empty spot at the beginning because of the ',' | ||
+ | for (z=1; z < unique_awards.length; z++){ | ||
+ | //arrays to hold award winners and nominees | ||
+ | var temp_array_awards=[]; | ||
+ | var temp_array_nominations=[]; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | //search each team for current prize | |
− | + | for(x=0; x< data.length; x++){ | |
− | + | ||
− | + | //this array will hold 'section' and 'team name' | |
− | + | var temp_array=[]; | |
− | + | ||
− | + | //get all the winners for this prize | |
+ | if( (data[x].award).includes(unique_awards[z]) ){ | ||
− | + | temp_array[0] = data[x].section; | |
− | + | temp_array[1] = data[x].team_name; | |
− | + | temp_array_awards.push(temp_array); | |
− | + | } | |
− | + | ||
− | + | //get all the nominees for this prize | |
− | + | if( (data[x].nomination).includes(unique_awards[z]) ){ | |
− | + | ||
− | + | ||
− | + | ||
− | + | temp_array[0] = data[x].section; | |
+ | temp_array[1] = data[x].team_name; | ||
− | } | + | temp_array_nominations.push(temp_array); |
+ | } | ||
− | + | } | |
+ | |||
+ | //sort the awards and nominations by section | ||
+ | temp_array_awards.sort(); | ||
+ | temp_array_nominations.sort(); | ||
+ | //replace all spaces with '_' to properly append nominees and winners to that prize | ||
+ | var appendable_name = (unique_awards[z]).replace(/ /g, "_"); | ||
+ | |||
+ | |||
+ | //append awards | ||
+ | for(x=0; x< temp_array_awards.length; x++ ){ | ||
+ | |||
+ | $("#"+appendable_name+ "> .winners_box_wrapper").append("<div class='winning_team'><div class='team_section'>" | ||
+ | +temp_array_awards[x][0]+"</div><div class='team_name'><a href=''>" | ||
+ | +temp_array_awards[x][1]+"</a></div></div>"); | ||
+ | } | ||
− | + | ||
− | + | //append nominations | |
− | + | for(x=0; x< temp_array_nominations.length; x++ ){ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | //if this is high school team | |
− | + | if(temp_array_awards[x][0] == "High School"){ | |
− | + | (temp_array_awards[x][0]).replace(/ /g, "_"); | |
− | + | ||
− | + | ||
} | } | ||
+ | var temp = "#"+appendable_name+" > .nominees_box_wrapper > .nominated_teams > .section_"+temp_array_awards[x][0]; | ||
− | + | if ($(temp).length){ | |
− | + | $(temp).append("<a href=''><li>"+temp_array_awards[x][1]+"</li></a>"); | |
+ | } | ||
+ | else { | ||
+ | $("#"+appendable_name+"> .nominees_box_wrapper").append("<div class='nominated_teams'> <div class='team_section'>" | ||
+ | +temp_array_awards[x][0]+"</div><ul class='section_" | ||
+ | +temp_array_awards[x][0]+"'><a href=''><li>" | ||
+ | +temp_array_awards[x][1]+"</li></a></ul></div>"); | ||
} | } | ||
− | + | ||
− | + | ||
} | } | ||
+ | |||
+ | } | ||
Revision as of 15:42, 19 September 2019
iGEM 2019 Results - Coming soon!
Congratulations to all participants in the 2019 International Genetically Engineered Machine competition!
Your hard work and achievements are truly worthy of celebration!
On this page you will find the winners and nominees for the: Track Prizes, the Awards, Medals: Gold, Silver, and Bronze, and Awards and Medals by Team