Skip to content
Snippets Groups Projects
Commit 301091cc authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #10339: minor fix in enabling/disabling dependencies

parent a9bea38c
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS ...@@ -141,7 +141,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
var numTasks = tasks.length; var numTasks = tasks.length;
//only enable dependencies (arrows between tasks) in detailed view //only enable dependencies (arrows between tasks) in detailed view
$scope.options.dependencies = (fullTimespanInMinutes <= 6*60 && numTasks <= 100) || numTasks < 20; $scope.options.dependencies = false;
var has_any_task_with_dependencies = false; var has_any_task_with_dependencies = false;
var ganttRows = []; var ganttRows = [];
...@@ -153,6 +153,8 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS ...@@ -153,6 +153,8 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
$scope.options.toDate = upperViewBound; $scope.options.toDate = upperViewBound;
var fullTimespanInMinutes = (upperViewBound - lowerViewBound) / (60 * 1000); var fullTimespanInMinutes = (upperViewBound - lowerViewBound) / (60 * 1000);
$scope.options.dependencies = (fullTimespanInMinutes <= 6*60 && numTasks <= 100) || numTasks < 20;
if(fullTimespanInMinutes > 28*24*60) { if(fullTimespanInMinutes > 28*24*60) {
$scope.options.viewScale = '7 days'; $scope.options.viewScale = '7 days';
} else if(fullTimespanInMinutes > 14*24*60) { } else if(fullTimespanInMinutes > 14*24*60) {
...@@ -279,7 +281,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS ...@@ -279,7 +281,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
ganttProjectTypeRows.push(availableRow); ganttProjectTypeRows.push(availableRow);
ganttRows.push(availableRow); ganttRows.push(availableRow);
} }
// Scheduled tasks that are blocked tasks are shown differently and use a tooltip // Scheduled tasks that are blocked tasks are shown differently and use a tooltip
var css_class = "task-status-"; var css_class = "task-status-";
if (task.blocked_by_ids.length > 0) { if (task.blocked_by_ids.length > 0) {
...@@ -295,10 +297,10 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS ...@@ -295,10 +297,10 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
from: task.starttime, from: task.starttime,
to: task.endtime, to: task.endtime,
raTask: task, raTask: task,
// Leave color property undefined; it is now defined by CSS // Leave color property undefined; it is now defined by CSS
//color: self.taskStatusColors[task.status], //color: self.taskStatusColors[task.status],
classes: css_class, classes: css_class,
movable: $.inArray(task.status_id, editableTaskStatusIds) > -1 movable: $.inArray(task.status_id, editableTaskStatusIds) > -1
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment