summaryrefslogtreecommitdiff
path: root/js/codeq
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-26 11:56:08 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-26 11:56:08 +0100
commitfbd97fa0a236a50cd07a1194c8f32c5445e685b9 (patch)
tree2184608f5587a4da78f40ba389b171420c2ca6e0 /js/codeq
parent8b0c40506319c4c94bc4a431edacb7b91ac6caed (diff)
Simplify description+hints blocks markup
Diffstat (limited to 'js/codeq')
-rw-r--r--js/codeq/prolog.js11
-rw-r--r--js/codeq/python.js11
-rw-r--r--js/codeq/robot.js11
3 files changed, 9 insertions, 24 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index a4a916f..111ea68 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -18,11 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
"use strict";
var jqScreen = $('#screen_prolog'), // the screen container element
// quadrants
- jqDescription = jqScreen.find('.block1'),
jqCode = jqScreen.find('.block2'),
jqConsole = jqScreen.find('.block3'),
- jqInfo = jqScreen.find('.block4'),
- jqAllQuadrants = jqDescription.add(jqCode).add(jqConsole).add(jqInfo), // all the quadrants
+ jqInfo = jqScreen.find('.block-left'),
+ jqAllQuadrants = jqCode.add(jqConsole).add(jqInfo), // all the quadrants
// buttons
jqBtnPlan = jqScreen.find('.btn-plan'),
jqBtnTest = jqScreen.find('.btn-test').ladda(),
@@ -61,7 +60,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
jqScreen.css('display', 'none');
prologHandler.destroy();
prologHandler = null;
- jqScreen.addClass('block1');
$('#navigation-problem_list').css('display', 'none');
var navigationProlog = $("#navigation-prolog");
@@ -166,8 +164,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
});
var createPrologHandler = function (problemDef, commonDef, currentSolution) {
- var jqDescriptionContent = jqDescription.find('.description'),
- jqEditor = jqCode.find('.code_editor'),
+ var jqEditor = jqCode.find('.code_editor'),
jqTerminal = jqConsole.find('.console'),
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0],
@@ -270,10 +267,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
activityHandler.flush();
hinter.destroy();
terminal.destroy();
- jqDescriptionContent.empty();
jqEditor.empty(); // TODO: perhaps you do not want to "free" the editor, just empty it
jqTerminal.empty(); // TODO: the same with the console
- jqDescriptionContent = null;
jqEditor = null;
jqTerminal = null;
jqHints = null;
diff --git a/js/codeq/python.js b/js/codeq/python.js
index 302a0fb..ab557e5 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -18,11 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
"use strict";
var jqScreen = $('#screen_python'), // the screen container element
// quadrants
- jqDescription = jqScreen.find('.block1'),
jqCode = jqScreen.find('.block2'),
jqConsole = jqScreen.find('.block3'),
- jqInfo = jqScreen.find('.block4'),
- jqAllQuadrants = jqDescription.add(jqCode).add(jqConsole).add(jqInfo), // all the quadrants
+ jqInfo = jqScreen.find('.block-left'),
+ jqAllQuadrants = jqCode.add(jqConsole).add(jqInfo), // all the quadrants
// buttons
jqBtnPlan = jqScreen.find('.btn-plan'),
jqBtnTest = jqScreen.find('.btn-test').ladda(),
@@ -64,7 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
jqScreen.css('display', 'none');
pythonHandler.destroy();
pythonHandler = null;
- jqScreen.addClass('block1');
$('#navigation-problem_list').css('display', 'none');
var navigationPhython = $("#navigation-python");
@@ -115,8 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
});
var createPythonHandler = function (problemDef, commonDef, currentSolution) {
- var jqDescriptionContent = jqDescription.find('.description'),
- jqEditor = jqCode.find('.code_editor'),
+ var jqEditor = jqCode.find('.code_editor'),
jqTerminal = jqConsole.find('.console'),
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0],
@@ -234,10 +231,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
activityHandler.flush();
hinter.destroy();
terminal.destroy();
- jqDescriptionContent.empty();
jqEditor.empty(); // TODO: perhaps you do not want to "free" the editor, just empty it
jqTerminal.empty(); // TODO: the same with the console
- jqDescriptionContent = null;
jqEditor = null;
jqTerminal = null;
jqHints = null;
diff --git a/js/codeq/robot.js b/js/codeq/robot.js
index 338abe7..43bfb12 100644
--- a/js/codeq/robot.js
+++ b/js/codeq/robot.js
@@ -18,11 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
"use strict";
var jqScreen = $('#screen_robot'), // the screen container element
// quadrants
- jqDescription = jqScreen.find('.block1'),
jqCode = jqScreen.find('.block2'),
jqConsole = jqScreen.find('.block3'),
- jqInfo = jqScreen.find('.block4'),
- jqAllQuadrants = jqDescription.add(jqCode).add(jqConsole).add(jqInfo), // all the quadrants
+ jqInfo = jqScreen.find('.block-left'),
+ jqAllQuadrants = jqCode.add(jqConsole).add(jqInfo), // all the quadrants
// buttons
jqBtnPlan = jqScreen.find('.btn-plan'),
jqBtnHint = jqScreen.find('.btn-hint').ladda(),
@@ -65,7 +64,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
jqScreen.css('display', 'none');
robotHandler.destroy();
robotHandler = null;
- jqScreen.addClass('block1');
$('#navigation-problem_list').css('display', 'none');
var navigationRobot = $("#navigation-robot");
@@ -90,8 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
});
var createRobotHandler = function (problemDef, commonDef, currentSolution) {
- var jqDescriptionContent = jqDescription.find('.description'),
- jqEditor = jqCode.find('.code_editor'),
+ var jqEditor = jqCode.find('.code_editor'),
jqTerminal = jqConsole.find('.console'),
jqHints = jqInfo.find('.hints'),
jqStatus = jqConsole.find('.status'),
@@ -232,9 +229,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
activityHandler.queueTrace({'typ': 'close'});
activityHandler.flush();
hinter.destroy();
- jqDescriptionContent.empty();
jqEditor.empty(); // TODO: perhaps you do not want to "free" the editor, just empty it
- jqDescriptionContent = null;
jqEditor = null;
jqHints = null;
codeq.tr.registerDictionary('robot', codeq.tr.emptyDictionary);