Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Fix Issue 14 #30

Merged
merged 5 commits into from
Aug 25, 2020
Merged

Fix Issue 14 #30

merged 5 commits into from
Aug 25, 2020

Conversation

Nicholas-Thor-Page
Copy link
Member

Issue resolved: #14

Fixed issue by doing the following:

When processing a CRN, add a hash to the url so that when the course page is loaded, the section with the CRN will be jumped to. (app/controllers/search_controller.rb)

Additionally, with CSS, highlight the target course with a green color (#afa) to signify that it is the desired course.
(app/assets/stylesheets/application.scss)

Turbolink messes with the behaviour of anchors, so when the page is loaded, a script makes sure that the hash is acted upon. (app/views/courses/show.html)

Issue: #14

Fixed issue by doing the following:
When processing a CRN, add a hash to the url so that when the course page is loaded, the section with the CRN will be jumped to. (app/controllers/search_controller.rb)

Additionally, with CSS, highlight the target course with a green color (#afa) to signify that it is the desired course. (app/assets/stylesheets/application.scss)

Turbolink messes with the behaviour of anchors, so when the page is loaded, a script makes sure that the hash is acted upon. (app/views/courses/show.html)
file got messed up during merge, just downloaded the original again and added my lines back
Copy link
Member

@zacwood9 zacwood9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- thanks for the PR!!

@zacwood9 zacwood9 merged commit 5d0c07c into master Aug 25, 2020
When not using the CRN to search for a course, window.location.hash is not set, causing the page to reload when updating window.location
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When searching by CRN, highlight course section found
3 participants