From 5c87d98c0b3383c7ad63f0b69e36110b915e36c2 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Tue, 22 Sep 2015 18:13:31 +0200 Subject: enabled buttons in the navigation header (at least buttons on the left side of the bar), renamed stateMachine to navigation --- js/codeq/python.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'js/codeq/python.js') diff --git a/js/codeq/python.js b/js/codeq/python.js index e5b59c2..66f0371 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -69,6 +69,12 @@ var pythonHandler; //created when we enter the python state and destroyed once we leave it codeq.globalStateMachine.register('python', { 'enter': function (data) { + $('#navigation-login').css('display', ''); + $('#navigation-language').css('display', ''); + $('#navigation-problem').css('display', ''); + $("#navigation-python").addClass("active"); + $('#navigation-python').css('display', ''); + jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly pythonHandler = createPythonHandler(data.data); subScreens = codeq.makeStateMachine(substates); @@ -93,7 +99,13 @@ pythonHandler = null; subScreens.destroy(); subScreens = null; - jqScreen.addClass('.block1'); + jqScreen.addClass('block1'); + + $('#navigation-login').css('display', 'none'); + $('#navigation-language').css('display', 'none'); + $('#navigation-problem').css('display', 'none'); + $("#navigation-python").removeClass("active"); + $('#navigation-python').css('display', 'none'); } }); @@ -268,6 +280,7 @@ return { destroy: function () { + $('#title').text('');//empty the title text jqAllButtons.off(); editor.off('change'); codeq.comms.off('terminal_output'); // stop listening for the terminal events from server -- cgit v1.2.1