Fix switching back to list view from fullscreen view.

pull/3563/head
Tim Habermaas 9 years ago committed by Stefan Botzenhart
parent 93475fba1b
commit 44624eb3cd
  1. 2
      config/routes.rb
  2. 4
      frontend/app/routing.js
  3. 4
      frontend/app/work_packages/controllers/work-package-show-controller.js
  4. 4
      frontend/app/work_packages/controllers/work-packages-list-controller.js

@ -306,7 +306,7 @@ OpenProject::Application.routes.draw do
end
# states managed by client-side routing on work_package#index
get '/*state' => 'work_packages#index', on: :member, id: /\d+/
get '/*state' => 'work_packages#index', on: :collection
# explicitly define index for preserving the order in which
# the path helpers are created - this otherwise leads to

@ -42,7 +42,7 @@ angular.module('openproject')
encode: valToString,
decode: valFromString,
is: regexpMatches,
pattern: /\/projects\/.*/
pattern: /.*/
});
})();
@ -111,7 +111,7 @@ angular.module('openproject')
})
.state('work-packages.list', {
url: '/projects/:projectIdentifier/work_packages?query_id',
url: '{projectPath:projectPathType}/work_packages?query_id',
controller: 'WorkPackagesListController',
templateUrl: '/templates/work_packages.list.html'
})

@ -195,11 +195,11 @@ module.exports = function($scope,
};
$scope.showWorkPackageDetails = function() {
$state.go('work-packages.list.details.overview', {workPackageId: $scope.workPackage.props.id, projectIdentifier: $scope.projectIdentifier});
$state.go('work-packages.list.details.overview', {workPackageId: $scope.workPackage.props.id, projectPath: PathHelper.staticBase + '/projects/' + $scope.projectIdentifier});
};
$scope.closeDetailsView = function() {
$state.go('work-packages.list', {projectIdentifier: $scope.projectIdentifier});
$state.go('work-packages.list', {projectPath: PathHelper.staticBase + '/projects/' + $scope.projectIdentifier});
};
function getFocusAnchorLabel(tab, workPackage) {

@ -32,7 +32,9 @@ module.exports = function($scope, $rootScope, $state, $stateParams, $location, l
AuthorisationService, UrlParamsHelper, PathHelper, Query,
OPERATORS_AND_LABELS_BY_FILTER_TYPE, NotificationsService) {
$scope.projectIdentifier = $stateParams.projectIdentifier;
if ($stateParams.projectPath.indexOf(PathHelper.staticBase + '/projects') === 0) {
$scope.projectIdentifier = $stateParams.projectPath.replace(PathHelper.staticBase + '/projects/', '');
}
// Setup
function initialSetup() {

Loading…
Cancel
Save