From c0b55b449868a4b07b5361735192390392728b93 Mon Sep 17 00:00:00 2001 From: Devin Weaver Date: Fri, 1 Jul 2016 05:40:37 -0400 Subject: [PATCH] Show tags with contrast colour in edit template (#2484) Closes #2483 Copy the same pattern from core/ui/TagTemplate.tid and use it in core/ui/EditTemplate/tags.tid --- core/ui/EditTemplate/tags.tid | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index c9f65e4c5..e806fd90c 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -4,13 +4,24 @@ tags: $:/tags/EditTemplate \define lingo-base() $:/language/EditTemplate/ \define tag-styles() background-color:$(backgroundColor)$; +fill:$(foregroundColor)$; +color:$(foregroundColor)$; +\end +\define tag-body-inner(colour,fallbackTarget,colourA,colourB) +<$vars foregroundColor=<> backgroundColor="""$colour$"""> +> class="tc-tag-label"> +<$view field="title" format="text" /> +<$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible tc-remove-tag-button">× + + +\end +\define tag-body(colour,palette) +<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/> \end
<$fieldmangler> -<$list filter="[all[current]tags[]sort[title]]" storyview="pop"><$set name="backgroundColor" value={{!!color}}>> class="tc-tag-label"> -<$view field="title" format="text" /> -<$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible tc-remove-tag-button">× - +<$list filter="[all[current]tags[]sort[title]]" storyview="pop"> +<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>