Replace loading text by a spinner
This commit is contained in:
parent
06f836e13f
commit
0f61b3bece
|
@ -72,7 +72,7 @@
|
||||||
let day_elem = document.getElementById('day')
|
let day_elem = document.getElementById('day')
|
||||||
let result_elem = document.getElementById('result')
|
let result_elem = document.getElementById('result')
|
||||||
document.getElementById('form').addEventListener('submit', () => {
|
document.getElementById('form').addEventListener('submit', () => {
|
||||||
result_elem.innerHTML = 'Chargement…'
|
result_elem.innerHTML = '<div class="spinner-border" role="status"><span class="visually-hidden">Chargement…</span></div>'
|
||||||
fetch('/api/routes/' + day_elem.value + '/' + origin_elem.value + '/' + (destination_elem.value || 'undefined') + '/')
|
fetch('/api/routes/' + day_elem.value + '/' + origin_elem.value + '/' + (destination_elem.value || 'undefined') + '/')
|
||||||
.then(resp => resp.json())
|
.then(resp => resp.json())
|
||||||
.then(routes => {
|
.then(routes => {
|
||||||
|
|
Loading…
Reference in New Issue