Difference between revisions of "Dev/Awards2"

Line 129: Line 129:
  
  
// awards
+
// awards set
  
 
var awards_set = [
 
var awards_set = [
Line 155: Line 155:
  
  
//alert( awards_set[1].team_name);
 
//page_name.substring(0,4) == "Team"){
 
 
 
var award_name_temp;
 
  
 +
//sort awards
 
for( x=0; x< awards_set.length; x++) {
 
for( x=0; x< awards_set.length; x++) {
  
// was the team nominated for an award?  
+
// is this a nomination ?
 
if ( (awards_set[x].award).substring(0,9) == "Nominated" ) {
 
if ( (awards_set[x].award).substring(0,9) == "Nominated" ) {
  
//what award was it ?
+
//append to that award's nominations ul
award_name_temp = "#" + (awards_set[x].award).substring(19,  ( (awards_set[x].award).length - 8 )) + "_nominations" ;
+
$( "#" + (awards_set[x].award).substring(19,  ( (awards_set[x].award).length - 8 )) + "_nominations" ).append( "<li>" + awards_set[x].team_name + "</li>" );
console.log(award_name_temp);
+
 
+
//append to that award nominations
+
$( award_name_temp).append( "<li>" + awards_set[x].team_name + "</li>" );
+
+
//clean award temp
+
award_name_temp ="";
+
 
}  
 
}  
 +
 +
// is this a winner ?
 +
if ( (awards_set[x].award).substring(0,4) == "Best" ) {
 +
 +
console.log(  awards_set[x].award).substring( 5, ( (awards_set[x].award).length - 8 )) );
 +
 +
}
 +
 
}
 
}
  
 +
 +
 +
 +
 +
//medals
 
// to use this function send the "source page" and then send the div's id to where you want to send it  
 
// to use this function send the "source page" and then send the div's id to where you want to send it  
  

Revision as of 21:58, 6 November 2017

MENU

AWARDS

Best Diagnostics Project

Nominations

Best Energy Project

Nominations

Best Environment Project

Nominations

GOLD

SILVER

BRONZE