diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttprojectcontroller.js b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttprojectcontroller.js index 934afd7b81896ec03c0970f1b86149fa1b569e37..b3e1e2bfb972e2b0a0da68d3f2ef6f99df55ff4f 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttprojectcontroller.js +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttprojectcontroller.js @@ -28,8 +28,6 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS $scope.enabled = true; self.taskStatusColors = dataService.taskStatusColors; - self.lastUpdateTimestamp = new Date(0); - self.waitingForDelayedUpdate = false; $scope.options = { mode: 'custom', @@ -109,18 +107,7 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS }; function updateGanttDataAsync() { - var now = new Date(); - var diff = now.getTime() - self.lastUpdateTimestamp.getTime(); - if(diff > 500) { - self.waitingForDelayedUpdate = false; - $scope.$evalAsync(updateGanttData); - } - else { - if (!self.waitingForDelayedUpdate) { - self.waitingForDelayedUpdate = true; - setTimeout(updateGanttDataAsync, diff); - } - } + $scope.$evalAsync(updateGanttData); }; function updateGanttData() { @@ -322,7 +309,6 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS } $scope.ganttData = ganntRows; - self.lastUpdateTimestamp = new Date(); }; $scope.$watch('dataService.initialLoadComplete', updateGanttDataAsync); diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttresourcecontroller.js b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttresourcecontroller.js index 9c201da4ac806d1cc6f432bd0702935604889848..810d481e29689c779025220b9b23edea27d1854a 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttresourcecontroller.js +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/ganttresourcecontroller.js @@ -26,8 +26,6 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat self.taskStatusColors = dataService.taskStatusColors; self.resourceClaimStatusColors = dataService.resourceClaimStatusColors; - self.lastUpdateTimestamp = new Date(0); - self.waitingForDelayedUpdate = false; $scope.options = { mode: 'custom', @@ -128,18 +126,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat }; function updateGanttDataAsync() { - var now = new Date(); - var diff = now.getTime() - self.lastUpdateTimestamp.getTime(); - if(diff > 500) { - self.waitingForDelayedUpdate = false; - $scope.$evalAsync(updateGanttData); - } - else { - if (!self.waitingForDelayedUpdate) { - self.waitingForDelayedUpdate = true; - setTimeout(updateGanttDataAsync, diff); - } - } + $scope.$evalAsync(updateGanttData); }; function updateGanttData() { @@ -480,7 +467,6 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat ganttRows.push(ganttRowsDict[rowId]); $scope.ganttData = ganttRows; - self.lastUpdateTimestamp = new Date(); }; $scope.$watch('dataService.initialLoadComplete', updateGanttDataAsync); diff --git a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/gridcontroller.js b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/gridcontroller.js index 0c0053601abbe83cddf360e1c9d0c23125f9b5aa..90f61886dffa3c865fc7ff35ec7d380d377bbd3f 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/gridcontroller.js +++ b/SAS/ResourceAssignment/ResourceAssignmentEditor/lib/static/app/controllers/gridcontroller.js @@ -9,8 +9,6 @@ var gridControllerMod = angular.module('GridControllerMod', ['ui.grid', gridControllerMod.controller('GridController', ['$scope', '$window', 'dataService', 'uiGridConstants', function($scope, $window, dataService, uiGridConstants) { var self = this; - self.lastUpdateTimestamp = new Date(0); - self.waitingForDelayedUpdate = false; $scope.dataService = dataService; @@ -368,18 +366,7 @@ gridControllerMod.controller('GridController', ['$scope', '$window', 'dataServic }; function populateListAsync() { - var now = new Date(); - var diff = now.getTime() - self.lastUpdateTimestamp.getTime(); - if(diff > 750) { - self.waitingForDelayedUpdate = false; - $scope.$evalAsync(populateList); - } - else { - if (!self.waitingForDelayedUpdate) { - self.waitingForDelayedUpdate = true; - setTimeout(populateListAsync, diff); - } - } + $scope.$evalAsync(populateList); }; function populateList() { @@ -439,7 +426,6 @@ gridControllerMod.controller('GridController', ['$scope', '$window', 'dataServic fillProjectsColumFilterSelectOptions() fillGroupsColumFilterSelectOptions(); - self.lastUpdateTimestamp = new Date(); }; function jumpToSelectedTaskRows() {