aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js9
-rw-r--r--web/js/map-google.js9
2 files changed, 12 insertions, 6 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');
}
});
}
diff --git a/web/js/map-google.js b/web/js/map-google.js
index 803ac4f3e..75a1b25a1 100644
--- a/web/js/map-google.js
+++ b/web/js/map-google.js
@@ -206,19 +206,22 @@ fixmystreet.maps = {};
}
*/
- $('#hide_pins_link').click(function(e) {
+ $('#hide_pins_link, .big-hide-pins-link').click(function(e) {
var i, m;
e.preventDefault();
if (this.innerHTML == translation_strings.show_pins) {
for (m=0; m<fixmystreet.markers.length; m++) {
fixmystreet.markers[m].setMap(fixmystreet.map);
}
- 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) {
for (m=0; m<fixmystreet.markers.length; m++) {
fixmystreet.markers[m].setMap(null);
}
- 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');
}
});
}