edit-task
Home
Up
Delete
Task Name:
Task Description:
] dynamic display, ] select by race ]
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">PAGE view/selections.jade</h1> <h1 style="text-align: center;"> </h1> <h2>[WHAT]</h2> <ol> <li>[ def ] this page displays the "race selections", aka the team or group of drivers "selected" from the list of entrants, to compete, in this weeks competition</li> <li>[ args ] none, </li> </ol> <h2>[WHY]</h2> <ol> <li>]</li> </ol> <h2>[WHERE called from]</h2> <ol> <li>]</li> </ol> <h2>[WHEN]</h2> <ol> <li>]</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>] </li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li><strong>[2015-06-dd] index -v-001</strong></li> <ol> <li>] #</li> </ol> <li>]</li> </ol><hr /> <h1 style="text-align: center;">developer implementation</h1> <h2>[process]</h2> <ol> <li> </li> </ol> <h2>[notes]</h2> <ol> <li> </li> </ol> <h2>[by_date]</h2> <ol> <li>[YYYY-mm-DD]</li> </ol><hr /> <h1 style="text-align: center;">status</h1> <h2>[previously]</h2> <ol> <li><strong>[2015-06-04] modify route to add :race paramter</strong></li> <ol> <li>] can now call page with</li> </ol> <li><strong>[2015-06-05] add inline script to template</strong></li> <ol> <li>] use script. tag, indent code</li> </ol> <li><strong>[2015-06-05] add script to return indexOf obj in array</strong></li> <ol> <li>] this will be lookup function, return driverID given teamID, can then lookup driver name and properties from driver</li> </ol> <li><strong>[2015-06-05] </strong></li> <ol> <li>] PRB accessing 'global' variables defined, can access these vars in the page, but NOT in the inline script</li> </ol></ol> <h2>[currently]</h2> <ol> <li><strong>] // GET the array index of the given team, ex team 48= element 6,</strong></li> <li>] next = access teams[6] to get driver id,</li> <li>] next = access drivers with driver id to get driver name</li> <li><strong>[***********]</strong></li> <li>x] replace hardcoded text (for dover selections) with x] selections, x] drivers,</li> <li>] iterate selections, display drivers </li> <li>] PRB - drivers data has no team id, selections are be team id(ie car#)</li> <ol> <li>] add team id param to drivers,</li> <li>] NEED return driver from drivers where driver.teamID=</li> </ol></ol> <h2>[next]</h2> <ol> <li>]</li> </ol> <p> </p> <p> </p> <p> </p> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"> function lookup(teamID) { // alert(teamID); // GET the array index of the given team, ex team 48= element 6, next = access teams[6] to get driver id, next = access drivers with driver id to get driver name // PRB = passing in the array OR trying to access the array variable // return (teams.indexOf(teamID) != -1); // alert ( teams[teamID].id); FAIL } // lookup(2);</pre> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"> </pre> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"><br />// <br /> li(class="two")<br /> h5 18 Kyle Busch<br /> p <br /> | Kyle once dominated an entire weekend here winning in races in all 3 series, this could be his best chance to get the W he needs to get into this years chase.<br /> li(class="three")<br /> h5 19 Carl Edwards<br /> p <br /> | Edwards captured the checkered flag at last weekends Coca Cola 600 and <br /> a(href="<a href="/view/person?id=75">http://sospep.com/view/person?id=75</a>", target="_blank") Learn more...</pre> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"> li(class="four")<br /> h5 20 Matt Kenseth<br /> p <br /> | Matt had a good run at Charlotte last week and qualified especially well here. </pre> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"> li(class="five")<br /> h5 33 Brian Scott<br /> p <br /> | This weeks value selection, Scott qualified in 30th position </pre> <pre style="background: white; color: black; font-family: Consolas; font-size: 10pt;"> </pre>