Difference between revisions of "Dev/Awards2"

Line 293: Line 293:
 
for( x=0; x< awards_set.length; x++) {
 
for( x=0; x< awards_set.length; x++) {
  
 +
//reset variables
 
award_name="";
 
award_name="";
 
trim = 0;
 
trim = 0;
 
 
// is this a nomination ?
+
// is this a nomination or a winner?
 
if ( (awards_set[x].award).substring(0,9) == "Nominated" ) {
 
if ( (awards_set[x].award).substring(0,9) == "Nominated" ) {
 
trim = 19;
 
trim = 19;
 
}  
 
}  
 
+
else if ( (awards_set[x].award).substring(0,4) == "Best" ) {  
 
+
// is this a winner ?
+
if ( (awards_set[x].award).substring(0,4) == "Best" ) {  
+
 
trim = 5;
 
trim = 5;
 
}
 
}
  
 
+
//remove from the beginning of the string ( "Best or Nominated for Best" )
 
award_name = (awards_set[x].award).substring( trim,  (awards_set[x].award).length );
 
award_name = (awards_set[x].award).substring( trim,  (awards_set[x].award).length );
award_name = award_name.substring( 0 , award_name.indexOf( ' ') );
+
 
 +
//check if the award is a track
 +
if ( award_name.indexOf('Project') > -1) {
 +
//its a track, trim at the first empty space
 +
award_name = award_name.substring( 0 , award_name.indexOf(' ') );
 +
}
 +
else {
 +
//its a special award, trim at the first comma
 +
award_name = award_name.substring( 0 , award_name.indexOf(',') );
 +
}
 +
 
  
 
//append winner to their section
 
//append winner to their section

Revision as of 20:11, 7 November 2017

MENU

AWARDS

Best Diagnostics Project

Nominations

Best Energy Project

Nominations

Best Environment Project

Nominations

Best Food and Nutrition Project

Nominations

Best Foundational Advance Project

Nominations

Best Information Processing Project

Nominations

Best Manufacturing Project

Nominations

Best New Application Project

Nominations

Best Therapeutics Project

Nominations

Best Hardware Project

Nominations

Best SoftwareProject

Nominations

Best Measurement Project

Nominations

Best Wiki

Nominations

GOLD

SILVER

BRONZE