This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/manifest-view-layer.js

31 lines
773 B
JavaScript
Raw Normal View History

2019-11-12 16:09:47 +00:00
/**
* An element which displays a single layer in the manifest view.
*/
angular.module('quay').directive('manifestViewLayer', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/manifest-view-layer.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {
'repository': '=repository',
'manifest': '=manifest',
'layer': '=layer'
},
controller: function($scope, $element) {
$scope.getClass = function() {
if ($scope.layer.index == 0) {
return 'last';
}
if ($scope.layer.index == $scope.manifest.layers.length - 1) {
return 'first';
}
return '';
};
}
};
return directiveDefinitionObject;
});