From 87e76e6c588635686649a0138a625f4152afd835 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 19 Nov 2014 18:03:05 +0100 Subject: [PATCH] fix #1622 refresh tags colors after create an US with a new tag --- app/coffee/modules/common/tags.coffee | 2 +- app/coffee/modules/kanban/main.coffee | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/common/tags.coffee b/app/coffee/modules/common/tags.coffee index 97aa8fd6..3e910882 100644 --- a/app/coffee/modules/common/tags.coffee +++ b/app/coffee/modules/common/tags.coffee @@ -111,7 +111,7 @@ LbTagLineDirective = ($rs) -> # Tags template (rendered manually using lodash) templateTags = _.template(""" <% _.each(tags, function(tag) { %> - + style="border-left: 5px solid <%- tag.color %>;"<% } %>> <%- tag.name %> diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index 32acbd99..d8ba9db5 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -83,13 +83,17 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi initializeEventHandlers: -> @scope.$on "usform:new:success", => @.loadUserstories() + @.refreshTagsColors() @analytics.trackEvent("userstory", "create", "create userstory on kanban", 1) @scope.$on "usform:bulk:success", => @.loadUserstories() @analytics.trackEvent("userstory", "create", "bulk create userstory on kanban", 1) - @scope.$on("usform:edit:success", @.loadUserstories) + @scope.$on "usform:edit:success", => + @.loadUserstories() + @.refreshTagsColors() + @scope.$on("assigned-to:added", @.onAssignedToChanged) @scope.$on("kanban:us:move", @.moveUs)