Add repo-list-grid directive
This commit is contained in:
parent
5f2bff43e7
commit
3da0228aaa
5 changed files with 95 additions and 95 deletions
|
@ -6663,7 +6663,6 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
return directiveDefinitionObject;
|
||||
});
|
||||
|
||||
|
||||
quayApp.directive('fallbackSrc', function () {
|
||||
return {
|
||||
restrict: 'A',
|
||||
|
|
|
@ -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.
|
||||
|
|
14
static/js/directives/repo-list-grid.js
Normal file
14
static/js/directives/repo-list-grid.js
Normal 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'
|
||||
},
|
||||
};
|
||||
});
|
Reference in a new issue