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-OpenLayers.js | |
parent | 7dd6af65ce6988585bbd47268a1532c8844c4d25 (diff) | |
parent | 82350c8df0cb088e5d1eaf26833f9880700b496d (diff) |
Merge branch '1752-show-hide-js'
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 549da6ebe..97507ea4a 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -566,23 +566,14 @@ var fixmystreet = fixmystreet || {}; $('#hide_pins_link').click(function(e) { e.preventDefault(); - var showhide = [ - 'Show pins', 'Hide pins', - 'Dangos pinnau', 'Cuddio pinnau', - "Vis nåler", "Skjul nåler", - "Zeige Stecknadeln", "Stecknadeln ausblenden", - 'Visa kartnålar', 'Göm kartnålar' - ]; - for (var i=0; i<showhide.length; i+=2) { - if (this.innerHTML == showhide[i]) { - fixmystreet.markers.setVisibility(true); - fixmystreet.select_feature.activate(); - this.innerHTML = showhide[i+1]; - } else if (this.innerHTML == showhide[i+1]) { - fixmystreet.markers.setVisibility(false); - fixmystreet.select_feature.deactivate(); - this.innerHTML = showhide[i]; - } + if (this.innerHTML == translation_strings.show_pins) { + fixmystreet.markers.setVisibility(true); + fixmystreet.select_feature.activate(); + this.innerHTML = 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; } }); |