Simplify Identity
This commit is contained in:
parent
7676509fcd
commit
211ebb0e43
3 changed files with 37 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue