summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-25 16:37:25 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-25 16:37:25 +0100
commitb874b22e5b6816ab52012094671dda68d1b2b33c (patch)
tree111e493c548769152097791723929e473dff895e /js
parentb7cb6ffc3f81bb8c6d37d187bb41e5e7118ab09e (diff)
Hide Plan button if no (more) plans are available
Diffstat (limited to 'js')
-rw-r--r--js/codeq/prolog.js9
1 files 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 <http://www.gnu.org/licenses/>. */
[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 <http://www.gnu.org/licenses/>. */
jqBtnPlan.on('click', function () {
if (!hinter.planNext()) {
- jqBtnPlan.prop('disabled', true).blur();
+ jqBtnPlan.hide();
}
});