From 3ae1aeaefa875153e4abbe7a54c06b89ac1f875e Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 25 Feb 2016 18:43:00 +0100 Subject: Gray-out the editor while waiting for test results --- js/codeq/robot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/codeq/robot.js') diff --git a/js/codeq/robot.js b/js/codeq/robot.js index 8754c82..338abe7 100644 --- a/js/codeq/robot.js +++ b/js/codeq/robot.js @@ -169,7 +169,8 @@ along with this program. If not, see . */ } }); jqBtnHint.on('click', function () { - editor.setOption('readOnly', true); + $(editor.getWrapperElement()).addClass('disabled'); + editor.setOption('readOnly', 'nocursor'); jqBtnHint.ladda('start'); codeq.comms.sendHint({ 'program': editor.getDoc().getValue(), @@ -186,6 +187,7 @@ along with this program. If not, see . */ .fail(commError) .fin(function () { editor.setOption('readOnly', false); + $(editor.getWrapperElement()).removeClass('disabled'); jqBtnHint.ladda('stop'); }) .done(); -- cgit v1.2.1