From fbd97fa0a236a50cd07a1194c8f32c5445e685b9 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 26 Feb 2016 11:56:08 +0100 Subject: Simplify description+hints blocks markup --- js/codeq/python.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'js/codeq/python.js') 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 . */ "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 . */ 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 . */ }); 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 . */ 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; -- cgit v1.2.1