aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-08-10 16:50:30 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-08-10 16:50:30 +0100
commit5d2426e0ca4dfee5f85fd5857f0db3276ed6d6c8 (patch)
treebf68cd40abfe79f8c85a1f135441be0aa296d6c4
parentfa5b25826742b426bf5a6125181425fba7d1ccaa (diff)
Fix "Problems nearby" link on /my and /reports.
Problems nearby should load the /around page from those pages, rather than act like "Back to all reports" but changing to an incorrect URL.
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 52f098b07..ba93a6995 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -951,7 +951,11 @@ fixmystreet.display = {
fixmystreet.set_up.map_controls();
$('.js-back-to-report-list').attr('href', location.href);
- $sideReport.find('#key-tool-problems-nearby').addClass('js-back-to-report-list');
+ // Problems nearby should act the same as 'Back to all reports' on around,
+ // but on /my and /reports should go to that around page.
+ if (fixmystreet.original.page == 'around') {
+ $sideReport.find('#key-tool-problems-nearby').addClass('js-back-to-report-list');
+ }
fixmystreet.set_up.map_sidebar_key_tools();
fixmystreet.set_up.form_validation();
fixmystreet.set_up.email_login_form();