Undo url escaping of work package toolbar-buttons

pull/3563/head
Alex Dik 9 years ago committed by Stefan Botzenhart
parent 691c57a9a4
commit 805880247d
  1. 24
      frontend/app/work_packages/controllers/work-package-show-controller.js
  2. 9
      frontend/app/work_packages/controllers/work-packages-list-controller.js

@ -110,7 +110,7 @@ module.exports = function($scope,
var promise = WorkPackageService.performBulkDelete([$scope.workPackage.props.id], true);
promise.success(function() {
$state.go('work-packages.list', {projectPath: getProjectPath()});
$state.go('work-packages.list', {projectPath: $scope.projectIdentifier});
});
}
$scope.triggerMoreMenuAction = function(action, link) {
@ -348,24 +348,11 @@ module.exports = function($scope,
hideAllAttributes: true
};
function isNestedWithinProject() {
return $stateParams.projectPath.indexOf('/projects/') === 0 || $stateParams.projectPath.indexOf('projects/') === 0;
};
function getProjectPath() {
if (isNestedWithinProject()) {
return PathHelper.projectPath($scope.projectIdentifier);
} else {
return '';
}
}
$scope.showWorkPackageDetails = function() {
var queryProps = $state.params['query_props'];
$state.go('work-packages.list.details.overview',
{
projectPath: getProjectPath(),
$state.go('work-packages.list.details.overview', {
projectPath: $scope.projectIdentifier,
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});
@ -374,9 +361,8 @@ module.exports = function($scope,
$scope.closeShowView = function() {
var queryProps = $state.params['query_props'];
$state.go('work-packages.list',
{
projectPath: getProjectPath(),
$state.go('work-packages.list', {
projectPath: $scope.projectIdentifier,
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});

@ -309,14 +309,9 @@ module.exports = function($scope, $rootScope, $state, $stateParams, $location, l
// browser. This seems to be caused by #maintainUrlQueryState
// where we set the search via $location.search.
queryProps = $location.search()['query_props'];
var projectPath = '';
if ($scope.projectIdentifier) {
projectPath = PathHelper.projectPath($scope.projectIdentifier);
}
$state.go('work-packages.show.activity',
{
projectPath: projectPath,
$state.go('work-packages.show.activity', {
projectPath: $scope.projectIdentifier || '',
workPackageId: id,
'query_props': queryProps
});

Loading…
Cancel
Save