Add a roles directive and properly recolor the roles

This commit is contained in:
Joseph Schorr 2013-11-05 14:47:46 -05:00
parent 1cd4fa8d9b
commit a79b181496
6 changed files with 105 additions and 20 deletions

View file

@ -436,6 +436,34 @@ quayApp.directive('entitySearch', function () {
});
quayApp.directive('roleGroup', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/role-group.html',
replace: false,
transclude: false,
restrict: 'C',
scope: {
'roles': '=roles',
'currentRole': '=currentRole',
'roleChanged': '&roleChanged'
},
controller: function($scope, $element) {
$scope.setRole = function(role) {
$scope.currentRole = role;
if ($scope.roleChanged) {
if ($scope.changeParams) {
$scope.changeParams();
}
$scope.roleChanged({'role': role});
}
};
}
};
return directiveDefinitionObject;
});
quayApp.directive('namespaceSelector', function () {
var directiveDefinitionObject = {
priority: 0,