edit-task
Home
Up
Delete
Task Name:
Task Description:
PAGE ] PBR register/login - menu problem ] modularize menu code
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;">v-005-001</h1> <h2 style="text-align: center;">menuMain module</h2> <h2>[previously]</h2> <ol> <li><strong>[2015-06-14] NEW task IN outline</strong></li> <ol> <li>i] # # - PRB - PAGE Register/Login - ERROR - menu undefined, this happens b/c we are not passing the menu into the view for register, therefore the layout file which is using menu variables, craps out.</li> <li>] build the menu as a standalone module,</li> <li>] replace calls to buildMenu function and pass menuMain var defined in home.js, with call to mainMenu() module from pass</li> <li>] TRY - with /register, /login - entry point is in code in server.js,</li> <li>] TRY - pass var into template layout.jade VS passing into each view </li> </ol> <li><strong>[00:00] NEW task IN PAGE menuMain.js, </strong></li> <ol> <li>x] CREATE new module 'mainMenu' in /routes, returns menu object</li> </ol> <li><strong>[00:00] NEW task IN PAGE server.js</strong></li> <ol> <li>x] ADD requires to server.js in /routes section</li> </ol> <li><strong>[00:00] NEW task IN home.js</strong></li> <ol> <li>x] ADD var mainMenu = requires('./mainMain) to PAGE routes/home(index).js</li> <li>x] CALL mainMenu() in pass data to each view, example - menu: mainMenu() </li> <ol> <li>*] re JSON.stringify - in module, return json vs return obj, not necessary</li> <li>*] using menuMain VS menuMain() - will return the function text as string</li> </ol></ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] REPLACE existing menu object in index.js</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] REPLACE call to build mainMenu in each app.get/page/:param</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] # # - deprecate 'home.js(index) versions -v-001, -v-002, -v-003</li> <li>x] # # - deprecate 'entrants.js' -v-001, -v-002, -v-003 - module create</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] # # - remove greenspace - aka previous code - like the menu object, build menu function, calls to build menu, ... x] TEST = pass</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>]</li> </ol></ol> <h2>[currently]</h2> <ol> <li>] # # - update menu - get current race is currently hardcoded B/C functions getCurrentRace are in index.js</li> <ol> <li>] function</li> </ol> <li>] # # - races module</li> <ol> <li>] contains races data, races methods ( getCurrentRace, setCurrentRace, )</li> </ol></ol> <h2>[next]</h2> <ol> <li>] art = pass vars into jade template</li> <li><strong>[2015-06-14][09:00] NEW task IN /prj-4800</strong></li> <ol> <li>x] # # - PASS results - added entry for team "YOU", selections, results, teams</li> </ol> <li><strong>[09:30] NEW task IN </strong></li> <ol> <li>x] # # - REM code for writing 'rankings1.json' file, put into standalone function, only need to write file once,</li> </ol></ol> <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;"><span style="color: #af6326; font-weight: bold;">block</span> vars - <span style="color: #4f76ac;">var</span> pageTitle <span style="color: #4f76ac;">=</span> <span style="color: #4f76ac;">'hello register'</span></pre> <p> </p>