diff options
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 9 |
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'); } }); } |