From 33da54afb2f8d5d0d42f188d6d0bb03e6eac3423 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 17 Feb 2016 16:32:41 +0100 Subject: Remove old comments --- css/codeq.css | 102 ----------------------------------------------- js/codeq/core.js | 9 +---- js/codeq/problem_list.js | 27 +------------ js/codeq/prolog.js | 21 +--------- js/codeq/python.js | 28 +------------ js/codeq/robot.js | 28 +------------ 6 files changed, 5 insertions(+), 210 deletions(-) diff --git a/css/codeq.css b/css/codeq.css index 08313e9..aa57292 100644 --- a/css/codeq.css +++ b/css/codeq.css @@ -263,97 +263,12 @@ div.vertical-line{ min-height: 6em; } -/**** animations *****/ -.transition, .quadrants > * > .block { - /*-moz-transition: all 1s ease; - -webkit-transition: all 1s ease; - -o-transition: all 1s ease; - -ms-transition: all 1s ease; - transition: all 1s ease;*/ -} - .block > .scrollable-content-container { padding-left: 1em; padding-right: 1em; } /***** responsiveness *****/ -/* lg */ -@media (min-width: 1200px) { - /*html, body, #gui, #block-row { - height: 100%; - }*/ - - /* default for all quadrants (no focus anywhere) */ - /*.quadrants > * > .block { - overflow: auto; - min-height: 100%; height: 100%; - }*/ - - /* code_editor */ - /*#screen_prolog .block.block2 { - min-height: 100%; height: 100%; - }*/ - - /* console */ - /*#screen_prolog .block.block3 { - min-height: 100%; height: 100%; - }*/ - - /* code_editor */ - /*#screen_python .block.block2 { - min-height: 100%; height: 100%; - }*/ - - /* console */ - /*#screen_python .block.block3 { - min-height: 100%; height: 100%; - }*/ -} - -/* md */ -@media (min-width: 992px) and (max-width: 1199px) { - /*html, body, #gui, #block-row { - height: 100%; - }*/ - - /* default for all quadrants (no focus anywhere) */ - /*.quadrants > * > .block { - overflow: auto; - min-height: 50%; height: 50%; - }*/ - - /*.quadrants#screen_prolog > * > .block { - overflow: auto; - min-height: 100%; height: 100%; - }*/ - - /* code_editor */ - /*#screen_prolog .block.block2 { - min-height: 50%; height: 50%; - }*/ - - /* console */ - /*#screen_prolog .block.block3 { - min-height: 50%; height: 50%; - }*/ - - /*.quadrants#screen_python > * > .block { - overflow: auto; - min-height: 100%; height: 100%; - }*/ - - /* code_editor */ - /*#screen_python .block.block2 { - min-height: 50%; height: 50%; - }*/ - - /* console */ - /*#screen_python .block.block3 { - min-height: 50%; height: 50%; - }*/ -} - /* md & ld */ @media (min-width: 992px) { @@ -480,7 +395,6 @@ div.vertical-line{ /* END layouts */ - .block-left, .block-right { min-height: 100%; height: 100%; } @@ -572,22 +486,6 @@ div.vertical-line{ } /***** helpers *****/ -/** webkit-scrollbar 1 **/ -/*::-webkit-scrollbar { - width: 12px; -} - -::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); - border-radius: 10px; -} - -::-webkit-scrollbar-thumb { - border-radius: 10px; - -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); -}*/ - - /** webkit-scrollbar 2**/ ::-webkit-scrollbar { width: 6px; diff --git a/js/codeq/core.js b/js/codeq/core.js index 50322c0..84bbfa8 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -362,17 +362,10 @@ along with this program. If not, see . */ }, // reset the app - reset: function (reason) { + 'reset': function (reason) { codeq.log.info('App reset: ' + (reason || 'no reason given')); codeq.globalStateMachine.transition('login'); codeq.wait( -/* codeq.comms.getSid() == null ? Q() : codeq.comms.logout() - .finally( - codeq.comms.disconnect - ) - .fail(function (e) { - codeq.log.debug(e) - }) // ignore errors*/ codeq.comms.forceReset() ) .fin(function () { diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js index e28e672..97bac25 100644 --- a/js/codeq/problem_list.js +++ b/js/codeq/problem_list.js @@ -280,32 +280,7 @@ along with this program. If not, see . */ if (!ref) { codeq.log.error('Clicked on a problem link having erroneous index: ' + index); return; - }//TODO - /*codeq.wait( - Q.all([ - codeq.comms.getCurrentSolution(ref.id), // the current user's solution to the selected problem - getProblemData(language, ref.g, ref.p) // the (cached) result of processProblemData() - ]) - .spread(function (userProblemData, generalProblemData) { - if (userProblemData.code !== 0) throw new Error('Failed to obtain user problem data, code: ' + userProblemData.code + ', message: ' + userProblemData.message); - if (!generalProblemData) throw new Error('General problem data is not defined'); - codeq.globalStateMachine.transition(language, generalProblemData, data.commonDef, userProblemData.data.solution); - }) - ) - .fail(function (reason) { - codeq.log.error('Failed to obtain the problem definition: ' + reason, reason); - alert('Failed to obtain the problem definition: ' + reason); - }) - .done();*/ - /*loadProblemData(ref,data).then(function(tmp){ - codeq.log.debug("then:"+JSON.stringify(tmp)); - return tmp; - }) - .fail(function (reason) { - codeq.log.error('Failed to obtain the problem definition: ' + reason, reason); - alert('Failed to obtain the problem definition: ' + reason); - }) - .done(codeq.log.debug("done"));*/ + } codeq.globalStateMachine.transition(language,ref,data); }); }, 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 . */ 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 . */ 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(); diff --git a/js/codeq/python.js b/js/codeq/python.js index c28ee53..4402fa6 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -116,8 +116,7 @@ along with this program. If not, see . */ codeq.globalStateMachine.register('python', { 'jqScreen': jqScreen, - '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); @@ -129,36 +128,11 @@ along with this program. If not, see . */ history.back();//TODO test }) .done(); - - - /*$('#navigation-problem_list').css('display', ''); - var navigationPhython = $("#navigation-python"); - navigationPhython.addClass("active"); - navigationPhython.css('display', ''); - - jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly - pythonHandler = createPythonHandler(problemDef, commonDef, currentSolution); - subScreens = codeq.makeStateMachine(substates); - subScreens.transition(jqDescription.data(stateNameTag)); - - jqInfoButtons.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 - }); - jqBtnRun.on(transitionEventName, function (event) { - subScreens.transition('console'); // 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'); pythonHandler.destroy(); pythonHandler = null; subScreens.destroy(); diff --git a/js/codeq/robot.js b/js/codeq/robot.js index 7f67025..8b23e44 100644 --- a/js/codeq/robot.js +++ b/js/codeq/robot.js @@ -111,9 +111,7 @@ along with this program. If not, see . */ codeq.globalStateMachine.register('robot', { '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); @@ -125,35 +123,11 @@ along with this program. If not, see . */ history.back();//TODO test }) .done(); - - - /*$('#navigation-problem_list').css('display', ''); - $("#navigation-robot").addClass("active"); - $('#navigation-robot').css('display', ''); - - jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly - robotHandler = createRobotHandler(problemDef, commonDef, currentSolution); - subScreens = codeq.makeStateMachine(substates); - subScreens.transition(jqDescription.data(stateNameTag)); - - jqInfoButtons.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 - }); - jqBtnRun.on(transitionEventName, function (event) { - subScreens.transition('console'); // 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'); robotHandler.destroy(); robotHandler = null; subScreens.destroy(); -- cgit v1.2.1