From 3507c6565bb16b5f45c6f269f7376902f8b1ff37 Mon Sep 17 00:00:00 2001 From: Kenton Hamaluik Date: Sat, 10 Oct 2015 23:08:50 -0600 Subject: Made colours light grey in the labels dropdown --- client/components/lists/listBody.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index e248f203..a60ffe25 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -214,14 +214,19 @@ BlazeComponent.extendComponent({ })); }, template(value) { + // XXX the following is duplicated from editor.js and should be + // abstracted to keep things DRY // add a "colour badge" in front of the label name // but first, get the colour's name from its value const colorName = currentBoard.labels.find((label) => { return value === label.name || value === label.color; }).color; + const valueSpan = (colorName === value) + ? `${value}` + : value; return (colorName && colorName !== '') ? `
${value}` + title="${value}"> ${valueSpan}` : value; }, replace(label) { -- cgit v1.2.3-1-g7c22