diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-03 10:38:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-03 10:38:00 +0100 |
commit | e412bb46203b6f28cff35780c9c0dcb28ab7414b (patch) | |
tree | 7ca8ef8d6154ea2e3cc21d13ca6f34a1239000f0 /web/js/map-google.js | |
parent | 7dd6af65ce6988585bbd47268a1532c8844c4d25 (diff) | |
parent | 82350c8df0cb088e5d1eaf26833f9880700b496d (diff) |
Merge branch '1752-show-hide-js'
Diffstat (limited to 'web/js/map-google.js')
-rw-r--r-- | web/js/map-google.js | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/web/js/map-google.js b/web/js/map-google.js index 7155a372e..8819697eb 100644 --- a/web/js/map-google.js +++ b/web/js/map-google.js @@ -214,25 +214,16 @@ fixmystreet.maps = {}; $('#hide_pins_link').click(function(e) { var i, m; e.preventDefault(); - var showhide = [ - 'Show pins', 'Hide pins', - 'Dangos pinnau', 'Cuddio pinnau', - "Vis nåler", "Gjem nåler", - "Zeige Stecknadeln", "Stecknadeln ausblenden", - 'Visa kartnålar', 'Göm kartnålar' - ]; - for (i=0; i<showhide.length; i+=2) { - if (this.innerHTML == showhide[i]) { - for (m=0; m<fixmystreet.markers.length; m++) { - fixmystreet.markers[m].setMap(fixmystreet.map); - } - this.innerHTML = showhide[i+1]; - } else if (this.innerHTML == showhide[i+1]) { - for (m=0; m<fixmystreet.markers.length; m++) { - fixmystreet.markers[m].setMap(null); - } - this.innerHTML = showhide[i]; + 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; + } 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; } }); |