@ -131,6 +131,11 @@ angular.module('openproject.workPackages.services')
});
},
setCheckedStateForAllRows: function(rows, state) {
angular.forEach(rows, function(row) {
row.checked = state;
setRowSelection: function(row, state) {
@ -79,9 +79,7 @@ angular.module('openproject.workPackages.directives')
scope.setCheckedStateForAllRows = function(state) {
angular.forEach(scope.rows, function(row) {
WorkPackagesTableService.setCheckedStateForAllRows(scope.rows, state);
};
var groupableColumns = WorkPackagesTableService.getGroupableColumns();
@ -55,6 +55,7 @@ angular.module('openproject.workPackages')
$scope.hideResourceActions = true;
$scope.$watch('row', function() {
WorkPackagesTableService.setCheckedStateForAllRows($scope.rows, false);
$scope.row.checked = true;
$scope.permittedActions = WorkPackageContextMenuHelper.getPermittedActions(getSelectedWorkPackages());