From 0977874bac2a1ec5a7fee0c276b1da74ce2e1c90 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Tue, 13 Oct 2015 15:27:01 +0200 Subject: moved login from a popup to its own page and made some changes to the logout button --- js/codeq/login.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'js/codeq/login.js') diff --git a/js/codeq/login.js b/js/codeq/login.js index d127fe3..902f1b8 100644 --- a/js/codeq/login.js +++ b/js/codeq/login.js @@ -47,6 +47,7 @@ codeq.globalStateMachine.register('login',{ 'enter': function(){ + $('#navigation-home').off('click');//remove the click listener of this element here only - in each other state the listener should exist $('#signed-in-title').html(''); $("#submit").on('click', loginFun); formInputs.on('keyup', function (ev) { @@ -54,16 +55,22 @@ $('#submit').trigger('click'); } }); - $('#modalLogIn').modal(); - //$("#screen_login").css('display', ''); + //$('#modalLogIn').modal(); + $("#screen_login").css('display', ''); $('#disabled').css('display', 'none'); }, 'exit' : function(){ $("#submit").off('click', loginFun); formInputs.off('keyup'); - $('#modalLogIn').modal('hide'); - //$("#screen_login").css('display', 'none'); + //$('#modalLogIn').modal('hide'); + $("#screen_login").css('display', 'none'); + $('#signed-in-title').html('Signed in as '+$('#username').val()); $("#password").val(''); + //re-enable the click listener + $('#navigation-home').on('click', function(e){ + codeq.globalStateMachine.transition('language'); + e.preventDefault(); + }); } }); })(); -- cgit v1.2.1