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/timeline-table-row-directiv...

21 lines
802 B

openprojectApp.directive('timelineTableRow', [function() {
return {
restrict: 'A',
// TODO restrict to 'E' once https://github.com/angular/angular.js/issues/1459 is solved
scope: true,
link: function(scope, element, attributes) {
var rowObject = scope.row.payload;
scope.rowObject = rowObject;
scope.changeDetected = rowObject.objectType === 'PlanningElement' && (rowObject.hasAlternateDates() || rowObject.isNewlyAdded() || rowObject.isDeleted());
scope.indent = scope.hideTreeRoot ? scope.row.level-1 : scope.row.level;
// set dom element
scope.row.dom_element = element;
scope.$watch('row.expanded', function(expanded, formerlyExpanded) {
if(expanded !== formerlyExpanded) scope.timeline.rebuildAll();
});
}
};
}]);