diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-18 14:35:15 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-18 14:35:15 +0800 |
commit | dc59c7d18975a744ceac484eccf25225ef4ab583 (patch) | |
tree | 0bf258b881d8b8b8316ff20ffe080516e9d0bb2f /fg21sim/webui/static/js/console.js | |
parent | 89c1a1835b090408e571dbdfc07fe820d8474557 (diff) | |
download | fg21sim-dc59c7d18975a744ceac484eccf25225ef4ab583.tar.bz2 |
webui: console.js: Disable the "Start" button when task started
Diffstat (limited to 'fg21sim/webui/static/js/console.js')
-rw-r--r-- | fg21sim/webui/static/js/console.js | 7 |
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) { |