From 98b3a52b043336651250f139ba243f9c3eb127e8 Mon Sep 17 00:00:00 2001 From: Till Breuer Date: Thu, 10 Jul 2014 17:12:29 +0200 Subject: [PATCH] Fix panel toggle when switching tabs on embedded details pane --- .../work_packages/controllers/work-packages-controller.js | 4 +++- karma/tests/controllers/work-packages-controller-test.js | 1 + public/templates/work_packages.list.html | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/angular/work_packages/controllers/work-packages-controller.js b/app/assets/javascripts/angular/work_packages/controllers/work-packages-controller.js index b452f9cac2..10877ea893 100644 --- a/app/assets/javascripts/angular/work_packages/controllers/work-packages-controller.js +++ b/app/assets/javascripts/angular/work_packages/controllers/work-packages-controller.js @@ -30,12 +30,14 @@ angular.module('openproject.workPackages.controllers') .controller('WorkPackagesController', [ '$scope', + '$state', '$stateParams', 'QueryService', 'ProjectService', - function($scope, $stateParams, QueryService, ProjectService) { + function($scope, $state, $stateParams, QueryService, ProjectService) { // Setup + $scope.$state = $state; $scope.selectedTitle = I18n.t('js.toolbar.unselected_title'); if ($stateParams.projectPath.indexOf('/projects') === 0) { diff --git a/karma/tests/controllers/work-packages-controller-test.js b/karma/tests/controllers/work-packages-controller-test.js index 495b9ce0cf..34faf5362e 100644 --- a/karma/tests/controllers/work-packages-controller-test.js +++ b/karma/tests/controllers/work-packages-controller-test.js @@ -47,6 +47,7 @@ describe('WorkPackagesController', function() { ctrl = $controller("WorkPackagesController", { $scope: scope, $window: win, + $state: {}, $stateParams: testParams, project: {}, availableTypes: {} diff --git a/public/templates/work_packages.list.html b/public/templates/work_packages.list.html index 930bf259fe..7909d71d3d 100644 --- a/public/templates/work_packages.list.html +++ b/public/templates/work_packages.list.html @@ -34,8 +34,8 @@