From 09eeabd36b0857a2b1133ba6f05b6ffeacfaf975 Mon Sep 17 00:00:00 2001 From: Till Breuer Date: Mon, 27 Jan 2014 11:23:27 +0100 Subject: [PATCH] Fix project identifier check in timeline table Fix modal class in timelines tree Finally fix identifier check in timelines table --- .../javascripts/angular/models/planning_element.js | 3 ++- app/assets/javascripts/angular/models/project.js | 3 ++- public/templates/timelines/tree.html | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) 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"> - + {{timeline.escape(node.payload.getFirstLevelGroupingName())}} @@ -27,14 +27,14 @@ - + {{node.text}}