InteractiveMechanics / nmai-nk360-interactives

0 stars 0 forks source link

[x] Question about updating nk360 nav in JS file #638

Closed amberreeves closed 6 years ago

amberreeves commented 6 years ago

Question from Laurie We had our developers review the instructions provided in Google Docs, and although we can identify where we need to update the “Back to Module” button in the timeline completion overlay in the JS file, it is not clear how we can update the “Return to Module Lesson” link in the top left navigation for each instance/Era created. It appears that the top left navigation is controlled in the index file. Is there a solution where we can update the top left navigation link in the JS file as well?

cahdeemer commented 6 years ago

That top left navigation is controlled in the JS file. The variables at the top of Init.js (line 6, 7, 8, and 9). There isn't a set value to the href in the index file.

amberreeves commented 6 years ago

sent to laurie. awaiting feedback

amberreeves commented 6 years ago

From Laurie I spoke to our developer who is making these updates, and she did follow the instructions given below. I’ve taken a snapshot of the updates we made to the JS file so you have a visual for your developer in case they can point out any issues.

Updated JS file (line 6,7,8, and 9) updated-js-file-20171127

However, even with this update and running Grunt again, the “Back to Lesson” button after a user completed the timeline does not work nor does the top left navigation links work. We noticed that the top left navigation is updated directly in the index.html file, which is consistent for all of the interactives. However, each instance/Era version of the timeline will need a different URL implemented in the top left navigation. We are not sure how this is possible when the top left navigation code is in the one index file.

Any additional clarification is appreciated-I’m also happy to discuss further on the phone is that is easier. We are hope to have the timeline completed and ready to go as soon as possible this week.

amberreeves commented 6 years ago

From Deanna the developer

Yes, I’m using the four links below to test the updates:

http://nmai-webdev01.si.edu:84/nk360/pnw-fish-wars/pnw2-timeline/index.html?era=1 http://nmai-webdev01.si.edu:84/nk360/pnw-fish-wars/pnw2-timeline/index.html?era=2 http://nmai-webdev01.si.edu:84/nk360/pnw-fish-wars/pnw2-timeline/index.html?era=3 http://nmai-webdev01.si.edu:84/nk360/pnw-fish-wars/pnw2-timeline/index.html?era=4

Could you tell us where in the JavaScript file we can set the top left navigation’s URL for each Era querystring? I’m assuming it is different than the lines 6,7,8 & 9 that we updated in the init.js file?

cahdeemer commented 6 years ago

The variables in init.js dynamically update the value of the href for #return-to-lesson-link (line 81 of index.html).

The variables in lines 7,8,9, and 10 of detail.js update the value of the href for #back-to-module-btn (line 276 of index.html).

I'm curious to know what values she is seeing for each of those elements (#back-to-module-btn and #return-to-lesson-link)

amberreeves commented 6 years ago

@mtedeschi can you jump in here and confirm what kind of response/questions/request for more info i can ask the client for at this point?

amberreeves commented 6 years ago

i have asked Deanna to push her code up to a new branch

amberreeves commented 6 years ago

from deanna Regarding the timeline, I worked with our developer and we were able to resolve the issues and it now appears to be working. To note, we end up updating the init.js and the detail.js file to complete the updates regarding the “Return to Lesson” button and the top left navigation.

closing this issue now.