aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2018-03-19 12:09:57 +0000
committerZarino Zappia <mail@zarino.co.uk>2018-03-20 10:06:42 +0000
commit3d012b7007a44d3be01400c0acb4166d0f73ba3f (patch)
treee0f5e60858493e7bca45b1c5fb66e6203ea0b8e0 /web
parentff2a390dda475c24607365103e3ef72adc73aa63 (diff)
Clicking "big green banner" on /around begins a report
Data collected by #2001 has shown that some people are clicking the big green "Click map to report a problem" banner on fixmystreet.com/around. We assume the same is true for other cobrands. As suggested in #2016, this commit adds a click handler to that banner element, which will begin a new report at the centre of the screen. It might not be the exact right location, but the pin can be repositioned from the /report/new form, and beginning a report is better than just soaking up the click and doing nothing.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index c187c218c..443d7d986 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -669,6 +669,14 @@ $.extend(fixmystreet.set_up, {
});
},
+ clicking_banner_begins_report: function() {
+ $('.big-green-banner').on('click', function(){
+ if (fixmystreet.map.getCenter) {
+ fixmystreet.display.begin_report( fixmystreet.map.getCenter() );
+ }
+ });
+ },
+
map_controls: function() {
//add permalink on desktop, force hide on mobile
//add links container (if its not there)