diff options
-rw-r--r-- | js/codeq/language.js | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/js/codeq/language.js b/js/codeq/language.js index 97691e6..45dffdc 100644 --- a/js/codeq/language.js +++ b/js/codeq/language.js @@ -1,28 +1,28 @@ -/**
- * Created by robert on 9/18/15.
- */
-
-(function(){
- var jqScreen = $('#screen_language'),
- jqProlog = $('#choose-prolog'),
- jqPython = $('#choose-python'),
- jqRobot = $('#choose-robot'),
- choose = function (language) {
- codeq.globalStateMachine.transition('problem_list', language);
- };
-
- codeq.globalStateMachine.register('language',{
- 'enter': function(){
- jqScreen.css('display', '');
- jqProlog.on('click', function (e) { e.preventDefault(); choose('prolog') });
- jqPython.on('click', function (e) { e.preventDefault(); choose('python') });
- jqRobot.on('click', function (e) { e.preventDefault(); choose('robot') });
- },
- 'exit' : function(){
- jqProlog.off();
- jqPython.off();
- jqRobot.off();
- jqScreen.css('display', 'none');
- }
- });
-})();
+/** + * Created by robert on 9/18/15. + */ + +(function(){ + var jqScreen = $('#screen_language'), + jqProlog = $('#choose-prolog'), + jqPython = $('#choose-python'), + jqRobot = $('#choose-robot'), + choose = function (language) { + codeq.globalStateMachine.transition('problem_list', language); + }; + + codeq.globalStateMachine.register('language',{ + 'enter': function(){ + jqScreen.css('display', ''); + jqProlog.on('click', function (e) { e.preventDefault(); choose('prolog') }); + jqPython.on('click', function (e) { e.preventDefault(); choose('python') }); + jqRobot.on('click', function (e) { e.preventDefault(); choose('robot') }); + }, + 'exit' : function(){ + jqProlog.off(); + jqPython.off(); + jqRobot.off(); + jqScreen.css('display', 'none'); + } + }); +})(); |