Difference between revisions of "Dev/Results"

(better error reporting)
(Added hidden region column for searching; made filtering radio buttons; started working on click bindings for said radio buttons)
Line 201: Line 201:
 
}
 
}
 
}
 
}
 +
}
 +
{ //Region Column (hidden)
 +
'className': 'region-column',
 +
'data': row.region,
 +
'visible': false
 
}
 
}
 
]
 
]
Line 224: Line 229:
 
} );
 
} );
 
 
$("#view-all-teams").click(function(event){
+
$("#view-all-statuses").click(function(event){
console.log("view all teams");
+
 
t.column(2).search('').draw();
 
t.column(2).search('').draw();
 
});
 
});
$("#view-award-winners").click(function(event) {
+
$("#view-winners").click(function(event) {
console.log("view award winners");
+
 
t.column(2).search('.', true, false).draw();
 
t.column(2).search('.', true, false).draw();
 
});
 
});
 
+
$("#view-all-regions").click(function(event) {
 +
t.column(3).search('').draw();
 +
});
 +
$("#view-africa").click(function(event) {
 +
t.column(3).search('africa').draw();
 +
});
 
});
 
});
  
Line 248: Line 256:
 
<h2>Comprehensive Results from iGEM <span id="title-year"></span></h2>
 
<h2>Comprehensive Results from iGEM <span id="title-year"></span></h2>
  
<p>View: <input type="button" id="view-all-teams" value="All Teams"> <input type="button" id="view-award-winners" value="Award Winners"> | [Africa] [Asia] [Europe] [Latin America][other?]</p>
+
<!-- <p>View: <input type="button" id="view-all-teams" value="All Teams"> <input type="button" id="view-award-winners" value="Award Winners"> | [Africa] [Asia] [Europe] [Latin America][other?]</p> -->
 +
 
 +
<h4>View:</h4>
 +
<ul style="list-style: none;">
 +
<li>
 +
<label><input type="radio" name="view-status" id="view-all-statuses"> All Teams</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-status" id="view-winners"> Award Winners</label>
 +
</li>
 +
<li>
 +
<label><input type="radio" name="view-region" id="view-all-regions"> All Regions</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-region" id="view-africa"> Africa</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-region" id="view-asia"> Asia</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-region" id="view-europe"> Europe</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-region" id="view-latin-america"> Latin America</label> &nbsp;&nbsp;&nbsp;
 +
<label><input type="radio" name="view-region" id="view-north-america"> North America</label>
 +
</li>
 +
</ul>
  
  

Revision as of 02:48, 28 September 2015

Comprehensive Results from iGEM

View:

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