Have tags selected be handled universally throughout the entire repository view page.

This commit is contained in:
Joseph Schorr 2015-03-12 12:22:47 -07:00
parent ea61a68bcb
commit 347bf31f2d
9 changed files with 154 additions and 85 deletions

View file

@ -30,9 +30,14 @@ angular.module('quay').directive('tagOperationsDialog', function () {
ApiService.listRepositoryImages(null, params).then(function(resp) {
$scope.images = resp.images;
$scope.tagChanged({
'data': { 'added': added, 'removed': removed }
});
// Note: We need the timeout here so that Angular can $digest the images change
// on the parent scope before the tagChanged callback occurs.
$timeout(function() {
$scope.tagChanged({
'data': { 'added': added, 'removed': removed }
});
}, 1);
})
});
};
@ -72,7 +77,6 @@ angular.module('quay').directive('tagOperationsDialog', function () {
ApiService.changeTagImage(data, params).then(function(resp) {
$element.find('#createOrMoveTagModal').modal('hide');
$scope.addingTag = false;
markChanged([tag], []);
}, errorHandler);
};