Issue: #4575, #4576, #4578 Missing tag colors

stable
Alejandro Alonso 2016-09-29 13:12:11 +02:00
parent 4e6f49f8a4
commit dc423af0e9
4 changed files with 8 additions and 10 deletions

View File

@ -63,7 +63,7 @@ ColorizeTagsDirective = ->
backlog: _.template(""" backlog: _.template("""
<% _.each(tags, function(tag) { %> <% _.each(tags, function(tag) { %>
<span class="tag" <span class="tag"
<% if (tag[1] === null || tag[1] == undefined) { %> <% if (tag[1] !== null) { %>
style="border-left: 5px solid <%- tag[1] %>" style="border-left: 5px solid <%- tag[1] %>"
<% } %> <% } %>
title="<%- tag[0] %>"><%- tag[0] %></span> title="<%- tag[0] %>"><%- tag[0] %></span>
@ -73,7 +73,7 @@ ColorizeTagsDirective = ->
<% _.each(tags, function(tag) { %> <% _.each(tags, function(tag) { %>
<a class="kanban-tag" <a class="kanban-tag"
href="" href=""
<% if (tag[1] === null || tag[1] == undefined) { %> <% if (tag[1] !== null) { %>
style="border-color: <%- tag[1] %>" style="border-color: <%- tag[1] %>"
<% } %> <% } %>
title="<%- tag[0] %>" /> title="<%- tag[0] %>" />
@ -83,7 +83,7 @@ ColorizeTagsDirective = ->
<% _.each(tags, function(tag) { %> <% _.each(tags, function(tag) { %>
<a class="taskboard-tag" <a class="taskboard-tag"
href="" href=""
<% if (tag[1] === null || tag[1] == undefined) { %> <% if (tag[1] !== null) { %>
style="border-color: <%- tag[1] %>" style="border-color: <%- tag[1] %>"
<% } %> <% } %>
title="<%- tag[0] %>" /> title="<%- tag[0] %>" />

View File

@ -176,8 +176,7 @@ class KanbanUserstoriesService extends taiga.Service
us.id = usModel.id us.id = usModel.id
us.assigned_to = @.usersById[usModel.assigned_to] us.assigned_to = @.usersById[usModel.assigned_to]
us.colorized_tags = _.map us.model.tags, (tag) => us.colorized_tags = _.map us.model.tags, (tag) =>
color = @.project.tags_colors[tag] return {name: tag[0], color: tag[1]}
return {name: tag, color: color}
return us return us

View File

@ -163,8 +163,7 @@ class TaskboardTasksService extends taiga.Service
task.id = taskModel.id task.id = taskModel.id
task.assigned_to = @.usersById[taskModel.assigned_to] task.assigned_to = @.usersById[taskModel.assigned_to]
task.colorized_tags = _.map task.model.tags, (tag) => task.colorized_tags = _.map task.model.tags, (tag) =>
color = @.project.tags_colors[tag] return {name: tag[0], color: tag[1]}
return {name: tag, color: color}
usTasks[taskModel.user_story][taskModel.status].push(task) usTasks[taskModel.user_story][taskModel.status].push(task)