From d034f3c1447ea91cb4333365ce123d58deb2de0d Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 17 Aug 2017 15:50:07 +0100 Subject: Refactor /around list code to share with others. Both /reports and /my share an ID and a /reports/ajax function, use these also on /around (and share ajax/non-ajax code). --- web/js/map-google.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'web/js/map-google.js') diff --git a/web/js/map-google.js b/web/js/map-google.js index 8819697eb..596e4f8ee 100644 --- a/web/js/map-google.js +++ b/web/js/map-google.js @@ -114,12 +114,9 @@ fixmystreet.maps = {}; /* Pan data handler */ function read_pin_json(obj) { - var current, current_near; - if (typeof(obj.current) != 'undefined' && (current = document.getElementById('current'))) { - current.innerHTML = obj.current; - } - if (typeof(obj.current_near) != 'undefined' && (current_near = document.getElementById('current_near'))) { - current_near.innerHTML = obj.current_near; + var reports_list; + if (typeof(obj.reports_list) != 'undefined' && (reports_list = document.getElementById('js-reports-list'))) { + reports_list.innerHTML = obj.reports_list; } fixmystreet.markers = markers_list( obj.pins, false ); } -- cgit v1.2.3