summaryrefslogtreecommitdiff
path: root/js/codeq/prolog.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq/prolog.js')
-rw-r--r--js/codeq/prolog.js21
1 files changed, 1 insertions, 20 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index a3779d7..4ec453d 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -105,9 +105,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
var prologHandler; //created when we enter the prolog state and destroyed once we leave it
codeq.globalStateMachine.register('prolog', {
'jqScreen': jqScreen,
- //'enter': function (problemDef, commonDef, currentSolution) {
- 'enter': function (ref, data) {//function (problemDef, commonDef, currentSolution) {//
-
+ 'enter': function (ref, data) {
codeq.loadProblemData(ref,data).then(function(problem){
//codeq.log.debug("then:"+JSON.stringify(problem));
enterFun(problem.generalProblemData,data.commonDef,problem.solution);
@@ -119,28 +117,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
history.back();//TODO test
})
.done();
- /*$('#navigation-problem_list').css('display', '');
- $("#navigation-prolog").addClass("active");
- $('#navigation-prolog').css('display', '');
-
- jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly
- prologHandler = createPrologHandler(problemDef, commonDef, currentSolution);
- subScreens = codeq.makeStateMachine(substates);
- subScreens.transition(jqDescription.data(stateNameTag));
-
- jqAllButtons.on(transitionEventName, function (event) {
- subScreens.transition('info'); // set focus on the hints quadrant
- event.stopPropagation(); // don't allow the event to go on and trigger further transition
- });
- jqAllQuadrants.on(transitionEventName, function () {
- subScreens.transition($(this).data(stateNameTag));
- });*/
},
'exit': function () {
jqAllButtons.off(); // unregister all event handlers
jqAllQuadrants.off();
jqScreen.css('display', 'none');
-// jqAllQuadrants.removeClass('transition');
prologHandler.destroy();
prologHandler = null;
subScreens.destroy();