diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/codeq/startup.js | 6 | ||||
-rw-r--r-- | js/codeq/stateMachine.js | 41 |
2 files changed, 4 insertions, 43 deletions
diff --git a/js/codeq/startup.js b/js/codeq/startup.js index 9a0473c..2f7df97 100644 --- a/js/codeq/startup.js +++ b/js/codeq/startup.js @@ -1,5 +1,5 @@ $(document).ready(function () { - codeq.comms.connect().then(function () { + /*codeq.comms.connect().then(function () { return codeq.comms.send({'action': 'list_problems'}); }).then( function success(data) { @@ -93,7 +93,7 @@ $(document).ready(function () { $('#disabled').css('cursor', ''); alert('Request to obtain list of problems failed: ' + reason); } - ).done(); + ).done();*/ - //codeq.globalStateMachine.transition('login'); + codeq.globalStateMachine.transition('login'); });
\ No newline at end of file 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(); |