diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 18:24:00 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-24 18:24:00 +0200 |
commit | 5a24d51879439a787878d8bdf0501db7bfa35ed1 (patch) | |
tree | 873dbe06fc6e9280f1998141610a98996b0ea287 /static/script.js | |
parent | Abandon UI changes if event create fails. (diff) | |
download | calp-5a24d51879439a787878d8bdf0501db7bfa35ed1.tar.gz calp-5a24d51879439a787878d8bdf0501db7bfa35ed1.tar.xz |
Add untested code for UI update on /remove.
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 7 |
1 files changed, 7 insertions, 0 deletions
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 |