Commit 20fab2b3 authored by Michał Woźniak's avatar Michał Woźniak
Browse files

various fixes

parent a5563dfe
Pipeline #92 passed with stage
in 0 seconds
......@@ -249,6 +249,15 @@ document.addEventListener('DOMContentLoaded', (e)=>{
// since at that point there is only one sites select
sitesSelects[0].appendChild(cOpt);
}
// now we can add more sites
var addSite = document.getElementById('add-site')
addSite.classList.add('visible')
addSite.addEventListener('click', (e)=>{
var newSite = sitesSelects[sitesSelects.length - 1].parentElement.parentElement.cloneNode(true)
newSite.getElementsByClassName('site-data')[0].innerHTML="";
sitesSelects[0].parentElement.parentElement.parentElement.appendChild(newSite)
sitesSelects[sitesSelects.length - 1].addEventListener('change', selectSite);
})
return sites
})
// at this point we have all the sites ready,
......@@ -273,13 +282,6 @@ document.addEventListener('DOMContentLoaded', (e)=>{
}
}
}, false);
document.getElementById('add-site').addEventListener('click', (e)=>{
var newSite = sitesSelects[sitesSelects.length - 1].parentElement.parentElement.cloneNode(true)
newSite.getElementsByClassName('site-data')[0].innerHTML="";
sitesSelects[0].parentElement.parentElement.parentElement.appendChild(newSite)
sitesSelects[sitesSelects.length - 1].addEventListener('change', selectSite);
})
});
// https://en.wikipedia.org/wiki/File:Epidemic_curve_update_18_march_20.png
......@@ -59,6 +59,7 @@
#covid-stats .value {
font-weight: bold;
font-family: "Play Bold";
align-self: end;
}
#covid-stats h2,
.site-data-container h2 {
......@@ -165,12 +166,15 @@
border: dotted 1px springgreen;
width: 1em;
height: 0.97em;
display: inline-block;
line-height: 90%;
outline:none;
text-align: Center;
margin-top: 0.47em;
color: springgreen;
display:none;
}
#add-site.visible {
display: inline-block;
}
</style>
</head>
......
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