Fix panel toggle when switching tabs on embedded details pane

pull/1590/head
Till Breuer 10 years ago
parent 4419c9f87d
commit 98b3a52b04
  1. 4
      app/assets/javascripts/angular/work_packages/controllers/work-packages-controller.js
  2. 1
      karma/tests/controllers/work-packages-controller-test.js
  3. 4
      public/templates/work_packages.list.html

@ -30,12 +30,14 @@ angular.module('openproject.workPackages.controllers')
.controller('WorkPackagesController', [ .controller('WorkPackagesController', [
'$scope', '$scope',
'$state',
'$stateParams', '$stateParams',
'QueryService', 'QueryService',
'ProjectService', 'ProjectService',
function($scope, $stateParams, QueryService, ProjectService) { function($scope, $state, $stateParams, QueryService, ProjectService) {
// Setup // Setup
$scope.$state = $state;
$scope.selectedTitle = I18n.t('js.toolbar.unselected_title'); $scope.selectedTitle = I18n.t('js.toolbar.unselected_title');
if ($stateParams.projectPath.indexOf('/projects') === 0) { if ($stateParams.projectPath.indexOf('/projects') === 0) {

@ -47,6 +47,7 @@ describe('WorkPackagesController', function() {
ctrl = $controller("WorkPackagesController", { ctrl = $controller("WorkPackagesController", {
$scope: scope, $scope: scope,
$window: win, $window: win,
$state: {},
$stateParams: testParams, $stateParams: testParams,
project: {}, project: {},
availableTypes: {} availableTypes: {}

@ -34,8 +34,8 @@
</li> </li>
<li feature-flag="detailsView"> <li feature-flag="detailsView">
<button class="button" <button class="button"
ui-sref="work-packages.list.details.overview({workPackageId: preselectedWorkPackageId})" ng-class="{ active: $state.includes('work-packages.list.details') }"
ui-sref-active="active"> ui-sref="work-packages.list.details.overview({workPackageId: preselectedWorkPackageId})">
<i class="icon-table-detail-view icon-buttons"></i> <i class="icon-table-detail-view icon-buttons"></i>
</button> </button>
</li> </li>

Loading…
Cancel
Save