From 7e6cb6877a08c86d118e847d4b2ec638d733a69f Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 23 Nov 2016 10:23:28 +0100 Subject: [PATCH] fix issue #4789 - fix kanban headers --- app/coffee/modules/kanban/main.coffee | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index be2a2ab2..b8e7f4fb 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -409,12 +409,8 @@ module.directive("tgKanbanArchivedStatusIntro", ["$translate", "tgKanbanUserstor ## Kanban Squish Column Directive ############################################################################# -KanbanSquishColumnDirective = (rs) -> +KanbanSquishColumnDirective = (rs, projectService) -> link = ($scope, $el, $attrs) -> - $scope.$on "project:loaded", (event, project) -> - $scope.folds = rs.kanban.getStatusColumnModes(project.id) - updateTableWidth() - $scope.foldStatus = (status) -> $scope.folds[status.id] = !!!$scope.folds[status.id] rs.kanban.storeStatusColumnModes($scope.projectId, $scope.folds) @@ -432,9 +428,12 @@ KanbanSquishColumnDirective = (rs) -> $el.find('.kanban-table-inner').css("width", totalWidth) + $scope.folds = rs.kanban.getStatusColumnModes(projectService.project.get('id')) + updateTableWidth() + return {link: link} -module.directive("tgKanbanSquishColumn", ["$tgResources", KanbanSquishColumnDirective]) +module.directive("tgKanbanSquishColumn", ["$tgResources", "tgProjectService", KanbanSquishColumnDirective]) ############################################################################# ## Kanban WIP Limit Directive