Correct bugs
This commit is contained in:
parent
b6d7d2c30e
commit
fa5a48bc3a
4 changed files with 17 additions and 24 deletions
|
@ -16,10 +16,11 @@ mainApp.controller('loginCtrl', ['$scope','$sce','Identity', function ($scope,$s
|
|||
|
||||
// Manager logout event
|
||||
$scope.$on('logoutEvent', function(){
|
||||
Identity.logout();
|
||||
$('#loginModal').modal({backdrop: 'static', keyboard: false});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Hide loading button and message alert
|
||||
$('#loadingLoginButton').hide();
|
||||
$('#failedToLoginAlert').hide();
|
||||
|
|
|
@ -11,10 +11,10 @@ mainApp.controller('statusCtrl', ['$scope','Identity', '$rootScope', function ($
|
|||
|
||||
// Give profile to model
|
||||
$scope.profile=Identity.getProfile();
|
||||
|
||||
|
||||
// Function to logout
|
||||
$scope.raiseLogoutEvent=function(){
|
||||
$rootScope.$broadcast('logoutEvent');
|
||||
$scope.logout=function(){
|
||||
Identity.logout();
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
|
||||
mainApp.factory('Identity',[ '$http', '$cookies', '$rootScope', function($http, $cookies, $rootScope){
|
||||
|
||||
/* Create profile structure to store informations
|
||||
* about current session
|
||||
|
@ -51,6 +51,9 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
|
|||
token=null;
|
||||
profile.username=null;
|
||||
profile.projectname=null;
|
||||
|
||||
// Reload Page
|
||||
location.reload();
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,6 +98,7 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
|
|||
else{
|
||||
requestParserResult.failReason="Please check your username, password and project name !";
|
||||
}
|
||||
|
||||
|
||||
return requestParserResult;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue