Fix project identifier check in timeline table

Fix modal class in timelines tree

Finally fix identifier check in timelines table
pull/913/head
Till Breuer 11 years ago
parent 73f90058c1
commit 09eeabd36b
  1. 3
      app/assets/javascripts/angular/models/planning_element.js
  2. 3
      app/assets/javascripts/angular/models/project.js
  3. 12
      public/templates/timelines/tree.html

@ -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;
},

@ -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();

@ -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">
<td ng-if="timeline.isGrouping() && node.payload.identifier === 'projects' && node.level === 0 && node.group !== nodes[$index-1].group" class="tl-grouping" colspan="{{timeline.options.columns.length + 1}}">
<td ng-if="timeline.isGrouping() && node.payload.objectType === 'Project' && node.level === 0 && node.group !== nodes[$index-1].group" class="tl-grouping" colspan="{{timeline.options.columns.length + 1}}">
<span class="tl-word-ellipsis">
{{timeline.escape(node.payload.getFirstLevelGroupingName())}}
</span>
@ -27,14 +27,14 @@
<span>
<a title="{{I18n.t('js.timelines.change')}}"
ng-class="{
'icon tl-icon-added': node.payload.identifier === 'planning_elements' && node.payload.isNewlyAdded(),
'icon tl-icon-deleted': node.payload.identifier === 'planning_elements' && node.payload.isDeleted(),
'icon tl-icon-changed': node.payload.identifier === 'planning_elements' && node.payload.hasAlternateDates()
'icon tl-icon-added': node.payload.objectType === 'PlanningElement' && node.payload.isNewlyAdded(),
'icon tl-icon-deleted': node.payload.objectType === 'PlanningElement' && node.payload.isDeleted(),
'icon tl-icon-changed': node.payload.objectType === 'PlanningElement' && node.payload.hasAlternateDates()
}" />
</span>
<span>
<a modal title="{{node.text}}" target="node.url" ng-class="{'tl-discreet-link': true, 'tl-project': node.payload.node.payload.identifier === 'projects'}">
<a modal title="{{node.text}}" target="node.url" ng-class="{'tl-discreet-link': true, 'tl-project': node.payload.objectType === 'Project'}">
{{node.text}}
</a>
</span>

Loading…
Cancel
Save