Implement deletion

pull/1782/head
Hagen Schink 10 years ago
parent 8d75e1a2d7
commit d83bbeaed9
  1. 7
      app/assets/javascripts/angular/work_packages/controllers/work-package-details-controller.js
  2. 2
      public/templates/work_packages.list.details.html

@ -65,7 +65,8 @@ angular.module('openproject.workPackages.controllers')
'CommonRelationsHandler',
'ChildrenRelationsHandler',
'ParentRelationsHandler',
function($scope, latestTab, workPackage, I18n, VISIBLE_LATEST, RELATION_TYPES, RELATION_IDENTIFIERS, $q, WorkPackagesHelper, PathHelper, UsersHelper, ConfigurationService, CommonRelationsHandler, ChildrenRelationsHandler, ParentRelationsHandler) {
'WorkPackageService',
function($scope, latestTab, workPackage, I18n, VISIBLE_LATEST, RELATION_TYPES, RELATION_IDENTIFIERS, $q, WorkPackagesHelper, PathHelper, UsersHelper, ConfigurationService, CommonRelationsHandler, ChildrenRelationsHandler, ParentRelationsHandler, WorkPackageService) {
$scope.$on('$stateChangeSuccess', function(event, toState){
latestTab.registerState(toState.name);
});
@ -183,5 +184,9 @@ angular.module('openproject.workPackages.controllers')
// TODO: Temporarily going to the old edit dialog until we get in-place editing done
window.location = "/work_packages/" + $scope.workPackage.props.id;
};
$scope.deleteSelectedWorkPackage = function() {
WorkPackageService.performBulkDelete([$scope.workPackage.props.id], true);
};
}
]);

@ -77,7 +77,7 @@
</a>
</li>
<li>
<a href ng-click="">
<a href ng-click="deleteSelectedWorkPackage()">
<i class="icon-delete"></i>
Delete
</a>

Loading…
Cancel
Save