From d7d03438ad84376c516a7bd7b2ae28b746637c1c Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Wed, 16 Sep 2015 17:57:10 +0200 Subject: Enabled the state machine and the UI improvments and removed some debug loging --- js/codeq/stateMachine.js | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'js/codeq/stateMachine.js') diff --git a/js/codeq/stateMachine.js b/js/codeq/stateMachine.js index 720400d..229c8ff 100644 --- a/js/codeq/stateMachine.js +++ b/js/codeq/stateMachine.js @@ -45,22 +45,6 @@ var loginFun = function(){ //$('#screen_prolog').css('display', ''); codeq.globalStateMachine.transition('prolog'); window.phandler = codeq.createPrologHandler(data.data); - - var jq = $('#console textarea').on('focus',function(){ - codeq.log.debug('focus'); - }).on('blur',function(){ - codeq.log.debug('blur'); - }); - - var c = $('#console').on('focus',function(){ - codeq.log.debug('console focus'); - }).on('blur',function(){ - codeq.log.debug('console blur'); - }); - - codeq.log.debug("textareas: "+jq.length ); - codeq.log.debug("consols: "+c.length ); - break; case 'python': // TODO: assignment to window for debug only @@ -68,13 +52,6 @@ var loginFun = function(){ //$('#screen_prolog').css('display', ''); codeq.globalStateMachine.transition('prolog'); window.phandler = codeq.createPythonHandler(data.data); - $('#console textarea').on('focus',function(){ - codeq.log.debug('focus'); - }); - $('#console textarea').on('blur',function(){ - codeq.log.debug('blur'); - }); - break; default: alert('Unknown language: ' + identifier[0]); @@ -87,7 +64,7 @@ var loginFun = function(){ }) .done(); } -} +}; codeq.globalStateMachine = codeq.makeStateMachine({ 'login':{ @@ -213,19 +190,6 @@ var problems,//this will the actual state machine if(current !== code)code.on( eventName,mouseDownEventFunctionCode); if(current !== info)info.on( eventName,mouseDownEventFunctionInfo); if(current !== consoleDiv)consoleDiv.on( eventName,mouseDownEventFunctionConsole); - - /*if(current !== description)description.on( eventName,function(){ - problems.transition('instructions'); - }); - if(current !== info)info.on( eventName,function(){ - problems.transition('info'); - }); - if(current !== code)code.on( eventName,function(){ - problems.transition('code'); - }); - if(current !== consoleDiv)consoleDiv.on( eventName,function(){ - problems.transition('console'); - });*/ }, removeFocusFromElements = function(){ @@ -279,7 +243,6 @@ var problems,//this will the actual state machine setTransitionsBetweenDivs(info); }, 'exit': function(){ - //$('div.col-lg-3.col-md-6.col-sm-12').addClass('block'); removeFocusFromElements(); removeChangedClassesFromDivs(); removeListenersFromDivs(); @@ -297,8 +260,6 @@ var problems,//this will the actual state machine setTransitionsBetweenDivs(consoleDiv); }, 'exit': function(){ - //$('span.cursor.blink').removeClass('blink'); - removeFocusFromElements(); removeChangedClassesFromDivs(); removeListenersFromDivs(); -- cgit v1.2.1