aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/static
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim/webui/static')
-rw-r--r--fg21sim/webui/static/js/console.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/fg21sim/webui/static/js/console.js b/fg21sim/webui/static/js/console.js
index 6392b96..86062a7 100644
--- a/fg21sim/webui/static/js/console.js
+++ b/fg21sim/webui/static/js/console.js
@@ -200,9 +200,16 @@ $(document).ready(function () {
* Start the simulation task on the server
*/
$("#task-start").on("click", function () {
+ var button = $(this);
if ($("#conf-status").data("validity")) {
+ button.disable(true);
+ console.log("Disable button:", button[0]);
updateTaskStatus({running: true, finished: false});
startServerTask(ajax_url)
+ .always(function () {
+ button.disable(false);
+ console.log("Enable button:", button[0]);
+ })
.done(function () {
getServerTaskStatus(ajax_url)
.done(function (response) {