From 8c2aea06f33a425e0140b9bdca572ed76ba1be09 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 1 Sep 2021 23:32:56 -0700 Subject: [PATCH] Close the spinners after error alerts. --- frontends/ycdl_flask/templates/channel.html | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 4eb89e8..ce6747d 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -603,14 +603,11 @@ function set_automark_form(event) function set_automark_callback(response) { - if (response.meta.status == 200) - { - set_automark_spinner.hide(); - } - else + if (response.meta.status != 200) { alert(JSON.stringify(response)); } + set_automark_spinner.hide(); } function set_queuefile_extension_form(event) @@ -621,14 +618,11 @@ function set_queuefile_extension_form(event) function set_queuefile_extension_callback(response) { - if (response.meta.status == 200) - { - window[set_queuefile_extension_button.dataset.spinnerCloser](); - } - else + if (response.meta.status != 200) { alert(JSON.stringify(response)); } + window[set_queuefile_extension_button.dataset.spinnerCloser](); } if (CHANNEL_ID)