Simplify Identity

This commit is contained in:
manzerbredes 2016-02-24 15:02:14 +01:00
parent 7676509fcd
commit 211ebb0e43
3 changed files with 37 additions and 18 deletions

View file

@ -13,13 +13,18 @@ mainApp.controller('loginCtrl', ['$scope','$sce','Identity', function ($scope,$s
if(!Identity.isAlreadyLogin()){
$('#loginModal').modal({backdrop: 'static', keyboard: false});
}
// Manager logout event
$scope.$on('logoutEvent', function(){
$('#loginModal').modal({backdrop: 'static', keyboard: false});
});
// Hide loading button and message alert
$('#loadingLoginButton').hide();
$('#failedToLoginAlert').hide();
// Defined function for login
$scope.loginAction=function(){
// Begin login state for template

View file

@ -10,7 +10,7 @@ mainApp.controller('statusCtrl', ['$scope','Identity', '$rootScope', function ($
{
// Give profile to model
$scope.profile=Identity.profile;
$scope.profile=Identity.getProfile();
// Function to logout
$scope.logout=function(){