mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-08 18:27:50 +02:00
43 lines
847 B
JavaScript
43 lines
847 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.details')
|
|
.directive('switchPaneProjects', switchPaneProjects);
|
|
|
|
function SwitchPaneProjectsController() {
|
|
var vm = this;
|
|
vm.projectName = "myrepo1";
|
|
vm.open = false;
|
|
vm.switchPane = switchPane;
|
|
|
|
function switchPane() {
|
|
if(vm.open) {
|
|
vm.open = false;
|
|
}else{
|
|
vm.open = true;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
function switchPaneProjects() {
|
|
var directive = {
|
|
restrict: 'E',
|
|
templateUrl: '/static/ng/resources/js/components/details/switch-pane-projects.directive.html',
|
|
replace: true,
|
|
scope: {
|
|
'projectName': '@',
|
|
'open': '='
|
|
},
|
|
controller: SwitchPaneProjectsController,
|
|
controllerAs: 'vm',
|
|
bindToController: true
|
|
}
|
|
|
|
return directive;
|
|
|
|
}
|
|
|
|
})(); |