diff --git a/app/coffee/modules/base/tags.coffee b/app/coffee/modules/base/tags.coffee index 20b314c4..0ce25457 100644 --- a/app/coffee/modules/base/tags.coffee +++ b/app/coffee/modules/base/tags.coffee @@ -51,15 +51,23 @@ TagsDirective = -> module.directive("tgTags", TagsDirective) -ColorizeTagDirective = -> +ColorizeTagBackgroundDirective = -> link = ($scope, $el, $attrs, $ctrl) -> - text = $scope.$eval($attrs.tgColorizeTag) + text = $scope.$eval($attrs.tgColorizeTagBackground) color = textToColor(text) - $el.css("border-left", "5px solid " + color) + $el.css("background", color) 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) diff --git a/app/partials/views/components/backlog-row.jade b/app/partials/views/components/backlog-row.jade index 2d5edb5e..bfb54e35 100644 --- a/app/partials/views/components/backlog-row.jade +++ b/app/partials/views/components/backlog-row.jade @@ -1,7 +1,7 @@ div.row.us-item-row(ng-repeat="us in visibleUserstories|orderBy:order track by us.id", tg-draggable) div.user-stories 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 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 }} diff --git a/app/partials/views/components/kanban-task.jade b/app/partials/views/components/kanban-task.jade index b402555b..11f382c5 100644 --- a/app/partials/views/components/kanban-task.jade +++ b/app/partials/views/components/kanban-task.jade @@ -1,5 +1,5 @@ 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(tg-kanban-user-avatar="us.assigned_to", ng-model="us") div.task-text diff --git a/app/partials/views/components/taskboard-task.jade b/app/partials/views/components/taskboard-task.jade index d7f44fa3..d3af7078 100644 --- a/app/partials/views/components/taskboard-task.jade +++ b/app/partials/views/components/taskboard-task.jade @@ -1,5 +1,5 @@ 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(tg-taskboard-user-avatar="task.assigned_to", ng-model="task", click="ctrl.editTaskAssignedTo(task)") p.taskboard-text diff --git a/app/styles/components/kanban-task.scss b/app/styles/components/kanban-task.scss index afda11c5..7bc7960e 100644 --- a/app/styles/components/kanban-task.scss +++ b/app/styles/components/kanban-task.scss @@ -13,8 +13,10 @@ } .kanban-tagline { @include table-flex(); + background: $gray-light; //Fallback + height: .3rem; } - .taskboard-tag { + .kanban-tag { @include table-flex-child(1, 0, 0, 0); background: $postit-hover; //Fallback height: .3rem;