stuff not ready to be pushed to master

This commit is contained in:
Edin Dazdarevic
2015-03-08 22:29:37 +01:00
parent fce49c9f5b
commit cb37ff0391
9 changed files with 234 additions and 49 deletions

View File

@@ -59,6 +59,12 @@ var handleLogoutDone = function() {
}
};
var handleClearLogin = function() {
_loginState = {
loggedIn: false
}
};
// Extend SectionStore with EventEmitter to add eventing capabilities
var UserStore = _.extend({}, EventEmitter.prototype, {
@@ -97,22 +103,25 @@ AppDispatcher.register(function(payload) {
case UserConstants.REGISTRATION_SUCCESS:
handleRegistrationSuccess(action.user);
break;
break;
case UserConstants.REGISTRATION_FAILURE:
handleRegistrationFailure(action.error);
break;
break;
case UserConstants.LOGIN_SUCCESS:
handleLoginSuccess(action.user);
break;
break;
case UserConstants.LOGIN_FAILURE:
handleLoginFailure(action.error);
break;
break;
case UserConstants.CHECK_LOGIN_ARRIVED:
handleCheckLoginArrived(action.user, action.error);
break;
handleCheckLoginArrived(action.user, action.error);
break;
case UserConstants.USER_LOGOUT_DONE:
handleLogoutDone();
break;
handleLogoutDone();
break;
case UserConstants.USER_LOGIN_CLEAR:
handleClearLogin();
break;
default:
return true;
}