Get full actions working in the repo changes tab
This commit is contained in:
parent
89e71b75dd
commit
a18148b058
9 changed files with 490 additions and 54 deletions
32
static/js/directives/ui/image-info-sidebar.js
Normal file
32
static/js/directives/ui/image-info-sidebar.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* An element which displays sidebar information for a image. Primarily used in the repo view.
|
||||
*/
|
||||
angular.module('quay').directive('imageInfoSidebar', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/image-info-sidebar.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'tracker': '=tracker',
|
||||
'image': '=image',
|
||||
|
||||
'tagSelected': '&tagSelected',
|
||||
'addTagRequested': '&addTagRequested'
|
||||
},
|
||||
controller: function($scope, $element, ImageMetadataService) {
|
||||
$scope.$watch('image', function(image) {
|
||||
if (!image || !$scope.tracker) { return; }
|
||||
$scope.imageData = $scope.tracker.lookupImage(image);
|
||||
});
|
||||
|
||||
$scope.parseDate = function(dateString) {
|
||||
return Date.parse(dateString);
|
||||
};
|
||||
|
||||
$scope.getFormattedCommand = ImageMetadataService.getFormattedCommand;
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
Reference in a new issue