diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-17 21:08:51 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-18 09:13:25 +0100 |
commit | f1859bc10aaa153568ea866142c8535cbf769b87 (patch) | |
tree | e7021148ec8319236430c24aeb6bfdd4ffe2cccc /web | |
parent | 3ae492fdba798fb3e3bbeddc8cc7aaabc5210db5 (diff) |
Make sure /around permalink/redirect have js param
The change in 17e38922 would not deal with the URL construted by the
map permalink code, or the redirect after inspection.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 1 | ||||
-rw-r--r-- | web/js/map-OpenLayers.js | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 49f14f0de..246a97b51 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -259,6 +259,7 @@ $.extend(fixmystreet.set_up, { $('a[href*="around"]').each(function() { this.href = this.href + (this.href.indexOf('?') > -1 ? '&js=1' : '?js=1'); }); + $('input[name="js"]').val(1); $('form[action*="around"]').each(function() { $('<input type="hidden" name="js" value="1">').prependTo(this); }); diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 6a0d938fc..9e02c8ea9 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -746,6 +746,10 @@ OpenLayers.Control.PermalinkFMS = OpenLayers.Class(OpenLayers.Control.Permalink, } href += separator + OpenLayers.Util.getParameterString(this.createParams(center, zoom)); // Could use mlat/mlon here as well if we are on a page with a marker + if (this.base == '/around') { + href += '&js=1'; + } + if (this.anchor && !this.element) { window.location.href = href; } |