aboutsummaryrefslogtreecommitdiff
path: root/static/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/static/script.js b/static/script.js
index 0f0775fb..35e927f5 100644
--- a/static/script.js
+++ b/static/script.js
@@ -151,6 +151,7 @@ class EventCreator {
/* [0, 1) -- where are we in the container */
/* Ronud to force steps of quarters */
+ /* TODO possibly have floor_time instead */
let time = round_time(pos_in(this, e), round_to);
event.dataset.time1 = time;
@@ -246,13 +247,14 @@ async function remove_event (element) {
});
console.log(response);
+ toggle_child_popup(element);
+
if (response.status < 200 || response.status >= 300) {
- alert(`Error removing event ${response.status}\n${response.statusText}`)
+ let body = await response.text();
+ alert(`HTTP error ${response.status}\n${body}`)
+ } else {
+ element.remove();
}
-
- toggle_child_popup(element);
- element.style.background = "black !important";
- element.style.color = "black !important";
}
var bar_object = false