From 6040e7bf2c1fa139dd854314a29926f59b43ddf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 25 Sep 2017 15:07:55 +0200 Subject: [PATCH] [backport] Issue#5243 show correctly the wip limit line --- app/coffee/modules/kanban/main.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index b7ad0597..865f64a8 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -315,6 +315,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi if headers && headers['taiga-info-order-updated'] order = JSON.parse(headers['taiga-info-order-updated']) @kanbanUserstoriesService.assignOrders(order) + @scope.$broadcast("redraw:wip") return promise @@ -463,13 +464,13 @@ module.directive("tgKanbanSquishColumn", ["$tgResources", "tgProjectService", Ka ## Kanban WIP Limit Directive ############################################################################# -KanbanWipLimitDirective = -> +KanbanWipLimitDirective = ($timeout) -> link = ($scope, $el, $attrs) -> status = $scope.$eval($attrs.tgKanbanWipLimit) redrawWipLimit = => $el.find(".kanban-wip-limit").remove() - timeout 200, => + $timeout => element = $el.find("tg-card")[status.wip_limit] if element angular.element(element).before("
") @@ -485,4 +486,4 @@ KanbanWipLimitDirective = -> return {link: link} -module.directive("tgKanbanWipLimit", KanbanWipLimitDirective) +module.directive("tgKanbanWipLimit", ["$timeout", KanbanWipLimitDirective])