From a184ad0a8a36c94669b6e07c311f4177a38edb63 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 18 Nov 2015 19:39:28 +0100 Subject: Disable editor while waiting for hint/test results --- js/codeq/python.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/codeq/python.js') 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); }) -- cgit v1.2.1