-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LGA-1082 quick escape button #933
Conversation
c240851
to
7d363fe
Compare
cla_public/templates/base.html
Outdated
|
||
function flee() { | ||
$("body").hide(); | ||
{# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these comments get rendered on the page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the commented out code then if it's not being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
cla_public/templates/base.html
Outdated
@@ -84,6 +118,36 @@ | |||
|
|||
{% block javascripts %} | |||
<script> | |||
|
|||
var currentLocation = window.location.href; | |||
if (currentLocation.indexOf("n43n3") > 0 || currentLocation.indexOf("n43n14/n97") > 0 || currentLocation.indexOf("n88") > 0 || currentLocation.indexOf("n149") > 0 || currentLocation.indexOf("n86") > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this matching paths in the domestic abuse category? If so you should be able to read the current category with something like session.stored.category (Add the current category as class on the main content wrapper)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used the session.checker.diagnosis_previous_choices
check elsewhere on the page for this reason. Is that enough?
Should I use session.stored.category
instead of session.checker.diagnosis_previous_choices
?
{# The below are all other possibilities but not necessarily the best approach. var histLength = history.length; window.history.go(-histLength); history.pushState({page: 1}, "Cookies", "/cookies") history.pushState({page: 2}, "Bank Holidays in the UK", "/bank-holidays") #}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
What does this pull request do?
Adds a quick escape button to the service for certain routes:
Any other changes that would benefit highlighting?
Intentionally left blank.
Checklist