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

Task #9607: bug fix: deselect tasks out of scope

parent b28aa23c
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ angular.module('raeApp').factory("dataService", ['$http', '$q', function($http, ...@@ -61,7 +61,7 @@ angular.module('raeApp').factory("dataService", ['$http', '$q', function($http,
} }
self.isTaskIdSelected = function(task_id) { self.isTaskIdSelected = function(task_id) {
return self.selected_task_ids.indexOf(task_id) != -1; return self.selected_task_ids.includes(task_id);
} }
self.toggleTaskSelection = function(task_id) { self.toggleTaskSelection = function(task_id) {
...@@ -235,8 +235,14 @@ angular.module('raeApp').factory("dataService", ['$http', '$q', function($http, ...@@ -235,8 +235,14 @@ angular.module('raeApp').factory("dataService", ['$http', '$q', function($http,
var visibleTasks = []; var visibleTasks = [];
for(var i = 0; i < numTasks; i++) { for(var i = 0; i < numTasks; i++) {
var task = self.tasks[i]; var task = self.tasks[i];
if(task.endtime >= from && task.starttime <= until) if(task.endtime >= from && task.starttime <= until) {
visibleTasks.push(task); visibleTasks.push(task);
}
else {
if(self.isTaskIdSelected(task.id)) {
self.removeSelectedTaskId(task.id);
}
}
} }
self.tasks = visibleTasks; self.tasks = visibleTasks;
......
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