aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm1
-rw-r--r--templates/web/base/report/_inspect.html1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js1
-rw-r--r--web/js/map-OpenLayers.js4
4 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 48cf53eb3..a410c2d91 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -460,6 +460,7 @@ sub inspect : Private {
lon => $problem->longitude,
};
$params->{filter_category} = $categories if $categories;
+ $params->{js} = 1 if $c->get_param('js');
$redirect_uri = $c->uri_for( "/around", $params );
}
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 58b50a3ae..cd34b147b 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -7,6 +7,7 @@
[% INCLUDE 'errors.html' %]
<form id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id ) %]" class="validate">
+ <input type="hidden" name="js" value="">
<div class="inspect-section">
<p>
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;
}