Abstract out the display of entities (users, robot accounts, and teams) into a nice directive to ensure that we always display the correctly formatted entity information (icon and name)

This commit is contained in:
Joseph Schorr 2013-11-26 14:37:55 -05:00
parent 72acc8769b
commit d5c0f768c2
8 changed files with 63 additions and 35 deletions

View file

@ -427,16 +427,6 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
$scope.permissions = {'team': [], 'user': []};
$scope.getPrefix = function(name) {
var plus = name.indexOf('+');
return name.substr(0, plus + 1);
};
$scope.getShortenedName = function(name) {
var plus = name.indexOf('+');
return name.substr(plus + 1);
};
$scope.grantRole = function() {
$('#confirmaddoutsideModal').modal('hide');
var entity = $scope.currentAddEntity;