Commit 8866735f authored by Amon's avatar Amon
Browse files

Fixed make plot and populate datatable

parent 924212c9
......@@ -306,11 +306,13 @@ class TrialsMap {
that.map.fitBounds(layer.getBounds())
// add plot only for first map
makePlot(geojsonData.responseJSON, this.plotEl)
populateDataTable(geojsonData.responseJSON, that.trialsEl)
// makePlot a global function
makePlot(geojsonData.responseJSON, that.plotEl)
that.populateDataTable(geojsonData.responseJSON, that.trialsEl)
// add timestamp of date to text
document.getElementById(that.lastUpdateEl).innerHTML = makeCumPlot(geojsonData.responseJSON, this.cumplotEl)
document.getElementById(that.lastUpdateEl).innerHTML = makeCumPlot(geojsonData.responseJSON, that.cumplotEl)
document.getElementById(that.trialsCountEl).innerHTML = geojsonData.responseJSON.features.length
})
}
......@@ -383,9 +385,9 @@ class TrialsMap {
var tableRef = document.getElementById(tableEl).getElementsByTagName('tbody')[0]
geojsonData.features.forEach(function (element) {
tr = tableRef.insertRow()
let tr = tableRef.insertRow()
td = document.createElement('td')
let td = document.createElement('td')
td.innerHTML = '<p><a target="_blank" href="' + element.properties.weburl + '">' + element.properties.name + '</></p>'
tr.appendChild(td)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment