summaryrefslogtreecommitdiff
path: root/js/codeq/language.js
blob: 2864098b2895623cc29d62893f4e7ebebee07a11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * Created by robert on 9/18/15.
 */

(function(){
    codeq.globalStateMachine.register('language',{
        'enter': function(){
            $("#screen_language").css('display', '');
            $('#submit_language').on('click',function(){
                codeq.globalStateMachine.transition('problem',$('#language').val());
            });
        },
        'exit' : function(){
            $("#submit_language").off();
            $("#screen_language").css('display', 'none');
            $('#language').val("prolog");//reset to the default value
        }
    });
})();