Merge pull request #39 from cmgustavo/matias/feature/identity

fix top-bar. no test when grunt watch. sidebar for small devices
This commit is contained in:
Matias Alejo Garcia 2014-10-28 14:59:24 -03:00
commit c3e5582fb8
7 changed files with 85 additions and 26 deletions

View file

@ -2,7 +2,7 @@
angular.module('copayApp.controllers').controller('HeadController', function($scope, $rootScope, notification, controllerUtils) {
$scope.username = $rootScope.iden.profile.email;
$scope.username = $rootScope.iden ? $rootScope.iden.fullName || $rootScope.iden.email : 'undefined';
$scope.hoverMenu = false;
$scope.hoverIn = function(){
@ -48,6 +48,9 @@ angular.module('copayApp.controllers').controller('HeadController', function($sc
$rootScope.$watch('title', function(newTitle, oldTitle) {
$scope.title = newTitle;
});
$rootScope.$on('signout', function() {
$scope.signout();
});
}
});

View file

@ -35,6 +35,10 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
}
};
$scope.signout = function() {
$scope.$emit('signout');
};
$scope.isActive = function(item) {
return item.link && item.link == $location.path().split('/')[1];
};