Only select right clicked WP row

pull/1746/head
Hagen Schink 10 years ago
parent 1d07a807df
commit 99b662ec52
  1. 5
      app/assets/javascripts/angular/services/work-packages-table-service.js
  2. 4
      app/assets/javascripts/angular/work_packages/directives/work-packages-table-directive.js
  3. 1
      app/assets/javascripts/angular/work_packages/work-package-context-menu.js

@ -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) {
row.checked = state;
},

@ -79,9 +79,7 @@ angular.module('openproject.workPackages.directives')
});
scope.setCheckedStateForAllRows = function(state) {
angular.forEach(scope.rows, function(row) {
row.checked = state;
});
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());
});

Loading…
Cancel
Save