summaryrefslogtreecommitdiff
path: root/js/codeq/login.js
diff options
context:
space:
mode:
authorRobert Zorko <robertz@gurucue.com>2015-10-14 14:04:11 +0200
committerRobert Zorko <robertz@gurucue.com>2015-10-14 14:04:11 +0200
commit2fe1ceebd6287ed4835798c82498834102cb7e18 (patch)
tree4ab2e83c7f5d5b08389bc6626cdc205420b09398 /js/codeq/login.js
parent7a98e5ed234e5a7a0dc2a8e04b1ebccf7ea2fb29 (diff)
moved the signup to its own screen (and file)
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');
}
});
})();