mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge pull request #9281 from dannon/fix-tag-display-in-select
[20.01] Tag display fixes for ui-select.
This commit is contained in:
@@ -211,18 +211,17 @@ var View = Backbone.View.extend({
|
||||
return `
|
||||
${_.escape(result.text)}
|
||||
<div>
|
||||
${_.reduce(
|
||||
filteredTags.slice(0, 5),
|
||||
(memo, tag) => {
|
||||
const tagColors = keyedColorScheme(tag.slice(5));
|
||||
return `${memo} <div style="background-color: ${tagColors.primary}; color: ${
|
||||
tagColors.contrasting
|
||||
}; border: 1px solid ${
|
||||
tagColors.darker
|
||||
}" class="badge badge-primary badge-tags">${_.escape(tag)}</div>`;
|
||||
},
|
||||
""
|
||||
)}
|
||||
${filteredTags.slice(0, 5).reduce((memo, tag) => {
|
||||
const tagColors = keyedColorScheme(tag);
|
||||
const isNametag = tag.indexOf("name:") === 0;
|
||||
const tagDisplayText = isNametag ? `#${tag.slice(5)}` : tag;
|
||||
const styleBlock = isNametag
|
||||
? `style="background-color: ${tagColors.primary}; color: ${tagColors.contrasting}; border: 1px solid ${tagColors.darker}"`
|
||||
: "";
|
||||
return `${memo} <div ${styleBlock} class="badge badge-primary badge-tags">${_.escape(
|
||||
tagDisplayText
|
||||
)}</div>`;
|
||||
}, "")}
|
||||
${extraTagWarning}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user