OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/assets/javascripts/angular/directives/components/progress-bar-directive.js

24 lines
581 B

// TODO move to UI components
angular.module('openproject.uiComponents')
.directive('progressBar', [function() {
return {
restrict: 'EA',
replace: true,
scope: {
progress: '=',
width: '@',
legend: '@'
},
templateUrl: '/templates/components/progress_bar.html',
link: function(scope) {
// apply defaults
scope.progress = scope.progress || 0;
scope.width = scope.width || '100px';
scope.legend = scope.legend || '';
scope.scaleLength = 100;
scope.progress = Math.round(scope.progress);
}
};
}]);