summaryrefslogtreecommitdiff
path: root/js/codeq/login.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq/login.js')
-rw-r--r--js/codeq/login.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/js/codeq/login.js b/js/codeq/login.js
index a3158ae..53a422c 100644
--- a/js/codeq/login.js
+++ b/js/codeq/login.js
@@ -48,9 +48,16 @@
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
- $('.nav.navbar-nav.navbar-right').css('display','none');
+ $('#navigation-home').off('click');//remove the click listener of this element here
+ $('.nav.navbar-nav.navbar-right').css('display','none');//hide settings etc.
$('#signed-in-title').html('');
+
+ //setup the signup button
+ $('#signup_button').on('click', function(e){
+ codeq.globalStateMachine.transition('signup');
+ e.preventDefault();
+ });
+
$("#submit").on('click', loginFun);
formInputs.on('keyup', function (ev) {
if ((ev.keyCode || ev.which) == 13) {
@@ -74,6 +81,9 @@
e.preventDefault();
});
$('.nav.navbar-nav.navbar-right').css('display','');
+
+ //remove the listener from the signup button
+ $('#signup_button').off('click');
}
});
})();