summaryrefslogtreecommitdiff
path: root/js/codeq/prolog.js
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-10-01 14:41:47 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-10-01 14:41:47 +0200
commit02dd8336417cb89500905e98f954b9c97111096b (patch)
treef218b7d72856a8b5201f70aae1913631f57c8afd /js/codeq/prolog.js
parent4445c72f8034c8d569b8ac57a308e8703b7dbda2 (diff)
Use 'value' option in CM constructor to set initial content
Diffstat (limited to 'js/codeq/prolog.js')
-rw-r--r--js/codeq/prolog.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index 6447b86..c549f09 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -260,7 +260,8 @@
jqTerminal = jqConsole.find('.console'),
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0], {
- mode: 'prolog'
+ mode: 'prolog',
+ value: currentSolution || ''
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makePrologTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
@@ -271,7 +272,6 @@
codeq.tr.registerDictionary('prolog', problemDef.translations);
codeq.tr.translateDom(jqScreen);
- if (currentSolution) editor.setValue(currentSolution);
// $('#screen_prolog .title').text(problem.slug);
// jqDescriptionContent.html(problem.description);
jqBtnPlan.prop('disabled', !hinter.hasNextPlan());