|
|
|
@ -16,6 +16,10 @@ function attachmentList(json){
@@ -16,6 +16,10 @@ function attachmentList(json){
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function goHome(){ |
|
|
|
|
window.location.href = '/'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function handleEventData(response){ |
|
|
|
|
if (response.ok){ |
|
|
|
|
var event = await response.json(); |
|
|
|
@ -52,6 +56,13 @@ function loadEventData(){
@@ -52,6 +56,13 @@ function loadEventData(){
|
|
|
|
|
const urlParams = new URLSearchParams(window.location.search); |
|
|
|
|
var id = urlParams.get('id'); |
|
|
|
|
if (id) fetch('/api/event?id='+id).then(handleEventData); |
|
|
|
|
if (window.self == window.top){ |
|
|
|
|
var btn = document.createElement('button'); |
|
|
|
|
btn.innerHTML = '⌂ home'; |
|
|
|
|
btn.onclick = goHome; |
|
|
|
|
btn.setAttribute('class','home'); |
|
|
|
|
element('buttons').appendChild(btn); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function handleDeleted(response){ |
|
|
|
|