diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-01 19:12:17 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-01 19:12:47 +0100 |
commit | 868733bb9f0721fbaebc51dfa766d329ed7ce840 (patch) | |
tree | b10ef860f7f5c927140e730b0e806ba0187d1a72 /js/codeq/python.js | |
parent | cd612c54926ea3b0d2400a3ca9e4e9e8babcfaff (diff) |
Simplify {prolog,python,robot}.js
Diffstat (limited to 'js/codeq/python.js')
-rw-r--r-- | js/codeq/python.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/js/codeq/python.js b/js/codeq/python.js index edf0f46..893110b 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -17,18 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function() { "use strict"; var jqScreen = $('#screen-python'), // the screen container element - // quadrants - jqCode = jqScreen.find('.block2'), jqConsole = jqScreen.find('.block3'), - 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(), jqBtnRun = jqScreen.find('.btn-run'), jqBtnStop = jqScreen.find('.btn-stop'), - jqInfoButtons = jqBtnPlan.add(jqBtnTest), // all info-focusing buttons - jqAllButtons = jqInfoButtons.add(jqBtnRun).add(jqBtnStop), // all buttons + jqAllButtons = jqBtnPlan.add(jqBtnTest).add(jqBtnRun).add(jqBtnStop), // all buttons pythonHandler; // created when we enter the python state and destroyed once we leave it var enterFun = function(problemDef, commonDef, currentSolution) { @@ -58,8 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ .done(); }, 'exit': function () { - jqAllButtons.off(); // unregister all event handlers - jqAllQuadrants.off(); jqScreen.css('display', 'none'); pythonHandler.destroy(); pythonHandler = null; @@ -113,9 +105,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ }); var createPythonHandler = function (problemDef, commonDef, currentSolution) { - var jqEditor = jqCode.find('.code_editor'), + var jqEditor = jqScreen.find('.code_editor'), + jqHints = jqScreen.find('.hints'), jqTerminal = jqConsole.find('.console'), - jqHints = jqInfo.find('.hints'), editor = codeq.makeEditor(jqEditor[0], { mode: 'python', |