-
Notifications
You must be signed in to change notification settings - Fork 0
/
remoteProjectsIconDirective.js
34 lines (31 loc) · 1.09 KB
/
remoteProjectsIconDirective.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
app.directive('remoteProjectsIcon', function ($controller) {
return {
templateUrl: 'views/directives/remoteProjectsIcon.html',
restrict: 'E',
scope: {
type: '@',
width: '@',
height: '@'
},
link: function ($scope, element, attr) {
$scope.typeIcon = false;
$scope.tooltip = "";
if ($scope.type === 'GITHUB_MILESTONE') {
$scope.typeIcon = 'github-milestone.png';
$scope.tooltip = "Github Milestone";
} else if ($scope.type === 'GITHUB_PROJECT') {
$scope.typeIcon = 'github-project.png';
$scope.tooltip = "Github Project";
} else if ($scope.type === 'VERSION_ONE') {
$scope.typeIcon = 'versionone.png';
$scope.tooltip = "Versione One";
}
if (angular.isUndefined($scope.width)) {
$scope.width = "16";
}
if (angular.isUndefined($scope.height)) {
$scope.height = "16";
}
}
};
});