Add repo-list-grid directive

This commit is contained in:
Jimmy Zelinskie 2015-01-12 17:43:36 -05:00
parent 5f2bff43e7
commit 3da0228aaa
5 changed files with 95 additions and 95 deletions

View file

@ -6663,7 +6663,6 @@ quayApp.directive('tagSpecificImagesView', function () {
return directiveDefinitionObject;
});
quayApp.directive('fallbackSrc', function () {
return {
restrict: 'A',

View file

@ -47,9 +47,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
};
ApiService.createStar(data).then(function(result) {
updateReposAfterStar(repo);
}, function(result) {
// TODO(jzelinskie): have some kind of pop-up for star failure
});
}, ApiService.errorDisplay('Could not star repository'));
};
var unstarRepo = function(repo) {
@ -58,9 +56,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
};
ApiService.deleteStar(null, data).then(function(result) {
updateReposAfterUnstar(repo);
}, function(result) {
// TODO(jzelinskie): have some kind of pop-up for star failure
});
}, ApiService.errorDisplay('Could not unstar repository'));
};
// Finds a repository within the list of namespaces attached to $scope.

View file

@ -0,0 +1,14 @@
quayApp.directive('repoListGrid', function() {
return {
templateUrl: '/static/directives/repo-list-grid.html',
priority: 0,
restrict: 'C',
scope: {
repositories: '=repositories',
starred: '=starred',
user: "=user",
namespace: '=namespace',
toggleStar: '&toggleStar'
},
};
});