diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-18 19:39:28 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-18 19:39:28 +0100 |
commit | a184ad0a8a36c94669b6e07c311f4177a38edb63 (patch) | |
tree | 700a7ddfeec039d3fe43bfd6f352d047ffbee935 /js/codeq/python.js | |
parent | 6893733a646d9e697b85feef39dc047c70dd601c (diff) |
Disable editor while waiting for hint/test results
Diffstat (limited to 'js/codeq/python.js')
-rw-r--r-- | js/codeq/python.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/codeq/python.js b/js/codeq/python.js index 3c4caef..fc826a8 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -207,6 +207,7 @@ } }); jqBtnHint.on('click', function () { + editor.setOption('readOnly', true); jqBtnTest.prop('disabled', true); jqBtnHint.ladda('start'); codeq.comms.sendHint({ @@ -225,12 +226,14 @@ }) .fail(commError) .fin(function () { + editor.setOption('readOnly', false); jqBtnHint.ladda('stop'); jqBtnTest.prop('disabled', false); }) .done(); }); jqBtnTest.on('click', function () { + editor.setOption('readOnly', true); jqBtnHint.prop('disabled', true); jqBtnTest.ladda('start'); codeq.comms.sendTest({ @@ -249,6 +252,7 @@ }) .fail(commError) .fin(function () { + editor.setOption('readOnly', false); jqBtnTest.ladda('stop'); jqBtnHint.prop('disabled', false); }) |