aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2017-11-22 14:26:27 +0000
committerZarino Zappia <mail@zarino.co.uk>2017-11-27 12:14:11 +0000
commit1eb9ecc877e4923616b03e596ea5692c7eef14a8 (patch)
treedd63a52bb1313f0275f5dbe122a72b68556f9b15 /web/js/map-OpenLayers.js
parent583af99116f35138868063fb61fc49686a770986 (diff)
Second, more prominent Hide Pins link
An experiment towards fixing #525.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index d7e692a13..31f5f49d8 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -614,16 +614,19 @@ $.extend(fixmystreet.utils, {
zoomToBounds( fixmystreet.markers.getDataExtent() );
}
- $('#hide_pins_link').click(function(e) {
+ $('#hide_pins_link, .big-hide-pins-link').click(function(e) {
e.preventDefault();
if (this.innerHTML == translation_strings.show_pins) {
fixmystreet.markers.setVisibility(true);
fixmystreet.select_feature.activate();
- this.innerHTML = translation_strings.hide_pins;
+ $('#hide_pins_link, .big-hide-pins-link').html(translation_strings.hide_pins);
} else if (this.innerHTML == translation_strings.hide_pins) {
fixmystreet.markers.setVisibility(false);
fixmystreet.select_feature.deactivate();
- this.innerHTML = translation_strings.show_pins;
+ $('#hide_pins_link, .big-hide-pins-link').html(translation_strings.show_pins);
+ }
+ if (typeof ga !== 'undefined') {
+ ga('send', 'event', 'toggle-pins-on-map', 'click');
}
});
}