fix #1622 refresh tags colors after create an US with a new tag

stable
Juanfran 2014-11-19 18:03:05 +01:00
parent d41d4df625
commit 87e76e6c58
2 changed files with 6 additions and 2 deletions

View File

@ -111,7 +111,7 @@ LbTagLineDirective = ($rs) ->
# Tags template (rendered manually using lodash)
templateTags = _.template("""
<% _.each(tags, function(tag) { %>
<span class="tag" style="border-left: 5px solid <%- tag.color %>;">
<span class="tag" <% if (tag.color) { %> style="border-left: 5px solid <%- tag.color %>;"<% } %>>
<span class="tag-name"><%- tag.name %></span>
<a href="" title="delete tag" class="icon icon-delete"></a>
</span>

View File

@ -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)