summaryrefslogtreecommitdiff
path: root/js/codeq/signup.js
diff options
context:
space:
mode:
authorRobert Zorko <robertz@gurucue.com>2015-10-14 15:29:12 +0200
committerRobert Zorko <robertz@gurucue.com>2015-10-14 15:29:12 +0200
commit751ee468a0f996da42bccc65a9dfee5a7b243352 (patch)
tree2da3d1617e6a9b7f2d2b2e0ecc53f79ad4a5b266 /js/codeq/signup.js
parent2fe1ceebd6287ed4835798c82498834102cb7e18 (diff)
moved the cahnged pass popup to its own screen and enabled the change pass btn in the profile screen
Diffstat (limited to 'js/codeq/signup.js')
-rw-r--r--js/codeq/signup.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/js/codeq/signup.js b/js/codeq/signup.js
index aab831f..bafd690 100644
--- a/js/codeq/signup.js
+++ b/js/codeq/signup.js
@@ -7,21 +7,25 @@
jqName = $("#modalSignUpName"),
jqEmail = $("#modalSignUpEmail"),
jqPassword = $("#modalSignUpPassword"),
- jqVerify = $("#modalSignUpVerify");
+ jqVerify = $("#modalSignUpVerify"),
+ jqFormSignUp = $('#formSignUp'),
+ jqExitSignUpBtn = $('#exit_signup_btn'),
+ jqNavBarRight = $('.nav.navbar-nav.navbar-right'),
+ jqNavigationHomeBtn = $('#navigation-home');
codeq.globalStateMachine.register('signup',{
'enter': function(){
- $('#navigation-home').off('click');//remove the click listener of this element here
- $('.nav.navbar-nav.navbar-right').css('display','none');//hide settings etc.
+ jqNavigationHomeBtn.off('click');//remove the click listener of this element here
+ jqNavBarRight.css('display','none');//hide settings etc.
$('#signed-in-title').html('');
$("#screen_signup").css('display', '');
$('#disabled').css('display', 'none');
- $('#exit_signup_btn').on('click',function(){
+ jqExitSignUpBtn.on('click',function(){
codeq.globalStateMachine.transition('login');
});
//prepare listener for successfull signup
- $('#formSignUp').on('submit',function(event) {
+ jqFormSignUp.on('submit',function(event) {
console.log($(this).serialize());
if (jqPassword.val() != jqVerify.val()) {
alert('Passwords do not match.');
@@ -51,15 +55,15 @@
'exit' : function(){
$("#screen_signup").css('display', 'none');
//re-enable the click listener
- $('#navigation-home').on('click', function(e){
+ jqNavigationHomeBtn.on('click', function(e){
codeq.globalStateMachine.transition('language');
e.preventDefault();
});
//disable listeners on stuff from this page only
- $('#exit_signup_btn').off('click');
- $('#formSignUp').off('submit');
+ jqExitSignUpBtn.off('click');
+ jqFormSignUp.off('submit');
//show the menu buttons
- $('.nav.navbar-nav.navbar-right').css('display','');
+ jqNavBarRight.css('display','');
jqUsername.val('');
jqName.val('');