aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-24 18:24:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-24 18:24:00 +0200
commit5a24d51879439a787878d8bdf0501db7bfa35ed1 (patch)
tree873dbe06fc6e9280f1998141610a98996b0ea287
parentAbandon UI changes if event create fails. (diff)
downloadcalp-5a24d51879439a787878d8bdf0501db7bfa35ed1.tar.gz
calp-5a24d51879439a787878d8bdf0501db7bfa35ed1.tar.xz
Add untested code for UI update on /remove.
-rw-r--r--static/script.js7
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