wp details controller informs parent to update back URL

pull/1801/head
Richard 10 years ago
parent bd6f2ea235
commit 6f6fe234a0
  1. 3
      app/assets/javascripts/angular/work_packages/controllers/work-package-details-controller.js
  2. 4
      app/assets/javascripts/angular/work_packages/controllers/work-packages-list-controller.js

@ -86,6 +86,9 @@ angular.module('openproject.workPackages.controllers')
}
$scope.refreshWorkPackage = refreshWorkPackage; // expose to child controllers
// Inform parent that work package is loaded so back url can be maintained
$scope.$emit('workPackgeLoaded');
function outputMessage(message, isError) {
$scope.$emit('flashMessage', {
isError: !!isError,

@ -264,6 +264,10 @@ angular.module('openproject.workPackages.controllers')
}
});
$rootScope.$on('workPackgeLoaded', function(event, message) {
$scope.maintainBackUrl();
});
$scope.openLatestTab = function() {
$state.go(latestTab.getStateName(), { workPackageId: $scope.preselectedWorkPackageId });
};

Loading…
Cancel
Save