Fix tag colors in kanban, taskboard and backlog
parent
bc951be963
commit
9a1bf4fef2
|
@ -51,15 +51,23 @@ TagsDirective = ->
|
||||||
module.directive("tgTags", TagsDirective)
|
module.directive("tgTags", TagsDirective)
|
||||||
|
|
||||||
|
|
||||||
ColorizeTagDirective = ->
|
ColorizeTagBackgroundDirective = ->
|
||||||
link = ($scope, $el, $attrs, $ctrl) ->
|
link = ($scope, $el, $attrs, $ctrl) ->
|
||||||
text = $scope.$eval($attrs.tgColorizeTag)
|
text = $scope.$eval($attrs.tgColorizeTagBackground)
|
||||||
color = textToColor(text)
|
color = textToColor(text)
|
||||||
$el.css("border-left", "5px solid " + color)
|
$el.css("background", color)
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
module.directive("tgColorizeTag", ColorizeTagDirective)
|
module.directive("tgColorizeTagBackground", ColorizeTagBackgroundDirective)
|
||||||
|
|
||||||
|
|
||||||
|
ColorizeTagBorderLeftDirective = ->
|
||||||
|
link = ($scope, $el, $attrs, $ctrl) ->
|
||||||
|
text = $scope.$eval($attrs.tgColorizeTagBorderLeft)
|
||||||
|
color = textToColor(text)
|
||||||
|
$el.css("border-left", "5px solid #{color}")
|
||||||
|
|
||||||
|
return {link: link}
|
||||||
|
|
||||||
|
module.directive("tgColorizeTagBorderLeft", ColorizeTagBorderLeftDirective)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
div.row.us-item-row(ng-repeat="us in visibleUserstories|orderBy:order track by us.id", tg-draggable)
|
div.row.us-item-row(ng-repeat="us in visibleUserstories|orderBy:order track by us.id", tg-draggable)
|
||||||
div.user-stories
|
div.user-stories
|
||||||
div.user-story-tags
|
div.user-story-tags
|
||||||
span.tag(ng-repeat="tag in us.tags", tg-bind-html="tag", tg-colorize-tag="tag")
|
span.tag(ng-repeat="tag in us.tags", tg-bind-html="tag", tg-colorize-tag-border-left="tag")
|
||||||
div.user-story-name
|
div.user-story-name
|
||||||
input(tg-check-permission, permission="modify_us", type="checkbox", name="")
|
input(tg-check-permission, permission="modify_us", type="checkbox", name="")
|
||||||
a.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref", title="{{ us.subject }}") {{ us.subject }}
|
a.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref", title="{{ us.subject }}") {{ us.subject }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
div.kanban-tagline
|
div.kanban-tagline
|
||||||
a.taskboard-tag(ng-repeat="tag in us.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
a.kanban-tag(ng-repeat="tag in us.tags", href="", tg-bo-title="tag", tg-colorize-tag-background="tag")
|
||||||
div.kanban-task-inner
|
div.kanban-task-inner
|
||||||
div(tg-kanban-user-avatar="us.assigned_to", ng-model="us")
|
div(tg-kanban-user-avatar="us.assigned_to", ng-model="us")
|
||||||
div.task-text
|
div.task-text
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
div.taskboard-tagline
|
div.taskboard-tagline
|
||||||
a.taskboard-tag(ng-repeat="tag in task.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
a.taskboard-tag(ng-repeat="tag in task.tags", href="", tg-bo-title="tag", tg-colorize-tag-background="tag")
|
||||||
div.taskboard-task-inner
|
div.taskboard-task-inner
|
||||||
div(tg-taskboard-user-avatar="task.assigned_to", ng-model="task", click="ctrl.editTaskAssignedTo(task)")
|
div(tg-taskboard-user-avatar="task.assigned_to", ng-model="task", click="ctrl.editTaskAssignedTo(task)")
|
||||||
p.taskboard-text
|
p.taskboard-text
|
||||||
|
|
|
@ -13,8 +13,10 @@
|
||||||
}
|
}
|
||||||
.kanban-tagline {
|
.kanban-tagline {
|
||||||
@include table-flex();
|
@include table-flex();
|
||||||
|
background: $gray-light; //Fallback
|
||||||
|
height: .3rem;
|
||||||
}
|
}
|
||||||
.taskboard-tag {
|
.kanban-tag {
|
||||||
@include table-flex-child(1, 0, 0, 0);
|
@include table-flex-child(1, 0, 0, 0);
|
||||||
background: $postit-hover; //Fallback
|
background: $postit-hover; //Fallback
|
||||||
height: .3rem;
|
height: .3rem;
|
||||||
|
|
Loading…
Reference in New Issue