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- | + | $("#view-all-statuses").click(function(event){ |
− | + | ||
t.column(2).search('').draw(); | t.column(2).search('').draw(); | ||
}); | }); | ||
− | $("#view | + | $("#view-winners").click(function(event) { |
− | + | ||
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> | ||
+ | <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> | ||
+ | <label><input type="radio" name="view-region" id="view-africa"> Africa</label> | ||
+ | <label><input type="radio" name="view-region" id="view-asia"> Asia</label> | ||
+ | <label><input type="radio" name="view-region" id="view-europe"> Europe</label> | ||
+ | <label><input type="radio" name="view-region" id="view-latin-america"> Latin America</label> | ||
+ | <label><input type="radio" name="view-region" id="view-north-america"> North America</label> | ||
+ | </li> | ||
+ | </ul> | ||
Revision as of 02:48, 28 September 2015