From b874b22e5b6816ab52012094671dda68d1b2b33c Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 25 Feb 2016 16:37:25 +0100 Subject: Hide Plan button if no (more) plans are available --- js/codeq/prolog.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js index 9a674e8..11958ce 100644 --- a/js/codeq/prolog.js +++ b/js/codeq/prolog.js @@ -190,7 +190,12 @@ along with this program. If not, see . */ [problemDef.language, problemDef.group, problemDef.problem]); codeq.tr.registerDictionary('prolog', problemDef.translations); codeq.tr.translateDom(jqScreen); - jqBtnPlan.prop('disabled', !hinter.hasNextPlan()); + if (hinter.hasNextPlan()) { + jqBtnPlan.show(); + } + else { + jqBtnPlan.hide(); + } editor.on('change', function (instance, changeObj) { var doc = editor.getDoc(), @@ -210,7 +215,7 @@ along with this program. If not, see . */ jqBtnPlan.on('click', function () { if (!hinter.planNext()) { - jqBtnPlan.prop('disabled', true).blur(); + jqBtnPlan.hide(); } }); -- cgit v1.2.1