From 5a24d51879439a787878d8bdf0501db7bfa35ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 24 Jul 2020 18:24:00 +0200 Subject: Add untested code for UI update on /remove. --- static/script.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/script.js b/static/script.js index ef71b6b8..0f0775fb 100644 --- a/static/script.js +++ b/static/script.js @@ -246,6 +246,13 @@ async function remove_event (element) { }); console.log(response); + if (response.status < 200 || response.status >= 300) { + alert(`Error removing event ${response.status}\n${response.statusText}`) + } + + toggle_child_popup(element); + element.style.background = "black !important"; + element.style.color = "black !important"; } var bar_object = false -- cgit v1.2.3