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. 36
      frontend/app/work_packages/controllers/work-package-show-controller.js
  2. 15
      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,38 +348,24 @@ 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(),
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});
$state.go('work-packages.list.details.overview', {
projectPath: $scope.projectIdentifier,
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});
};
$scope.closeShowView = function() {
var queryProps = $state.params['query_props'];
$state.go('work-packages.list',
{
projectPath: getProjectPath(),
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});
$state.go('work-packages.list', {
projectPath: $scope.projectIdentifier,
workPackageId: $scope.workPackage.props.id,
'query_props': queryProps
});
};
function getFocusAnchorLabel(tab, workPackage) {

@ -309,17 +309,12 @@ 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,
workPackageId: id,
'query_props': queryProps
});
$state.go('work-packages.show.activity', {
projectPath: $scope.projectIdentifier || '',
workPackageId: id,
'query_props': queryProps
});
};
$scope.getFilterCount = function() {

Loading…
Cancel
Save