Merge pull request #168 from taigaio/bug/1622/refresh-tags-colors-after-create-us

fix #1622 refresh tags colors after create an US with a new tag
stable
Jesús Espino 2014-11-19 18:21:01 +01:00
commit 30b9d7f5c7
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)