aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-07-12 13:33:44 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-07-12 16:06:16 +0100
commitc36a425b1aab2245d9aaef66239cb1841aa967a5 (patch)
tree2d7ac744a9401d0af1a7520fa2404f07b555a16f /web/js
parent4f078398fd7d57357366e284784cf64efc625aa4 (diff)
Fix a few JavaScript issues with reports pages.
Don't stringify pin problem ID, as get_marker_by_id assumes it will be an integer; only activate the bounding box strategy if it exists; make sure a refresh of the markers happens when going back to the list; set the Back link on a pulled-in report to the current URL.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index f6e7e8a62..e1f152820 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -27,12 +27,17 @@ var fixmystreet = fixmystreet || {};
fixmystreet.map.updateSize();
// Dragging the map should fetch new local reports from server
- fixmystreet.bbox_strategy.activate();
+ if (fixmystreet.bbox_strategy) {
+ fixmystreet.bbox_strategy.activate();
+ }
// Should not be able to drag normal pins!!
drag.deactivate();
// Force a redraw to return (de)selected marker to normal size
+ // Redraw for all pages, kick off a refresh too for around
+ // TODO Put 'new report' pin in different layer to simplify this and elsewhere
+ fixmystreet.maps.markers_resize();
fixmystreet.markers.refresh({force: true});
},