diff --git a/app/assets/javascripts/angular/models/planning_element.js b/app/assets/javascripts/angular/models/planning_element.js index a66996a8d5..e21fdda7ab 100644 --- a/app/assets/javascripts/angular/models/planning_element.js +++ b/app/assets/javascripts/angular/models/planning_element.js @@ -40,11 +40,12 @@ openprojectApp.factory('PlanningElement', [function() { PlanningElement = { + objectType: 'PlanningElement', + identifier: 'planning_elements', is: function(t) { if (t === undefined) return false; return PlanningElement.identifier === t.identifier; }, - identifier: 'planning_elements', hide: function () { return false; }, diff --git a/app/assets/javascripts/angular/models/project.js b/app/assets/javascripts/angular/models/project.js index aad17fd717..3c2e21336d 100644 --- a/app/assets/javascripts/angular/models/project.js +++ b/app/assets/javascripts/angular/models/project.js @@ -40,11 +40,12 @@ openprojectApp.factory('Project', [function() { Project = { + objectType: 'Project', + identifier: 'projects', is: function(t) { if (t === undefined) return false; return Project.identifier === t.identifier; }, - identifier: 'projects', hide: function () { var hidden = this.hiddenForEmpty() || this.hiddenForTimeFrame(); diff --git a/public/templates/timelines/tree.html b/public/templates/timelines/tree.html index 3bcbc317f0..4fe0af9ec0 100644 --- a/public/templates/timelines/tree.html +++ b/public/templates/timelines/tree.html @@ -3,11 +3,11 @@ 'tl-first-row': $first, 'tl-last-row': $last, 'tl-grouping': timeline.isGrouping(), - 'tl-project-row': node.payload.node.payload.identifier === 'projects' + 'tl-project-row': node.payload.objectType === 'Project' }" ng-show="node.ancestors | ancestorsExpanded"> -