mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Merge pull request #7658 from dannon/fix_tags_in_select2picker
Bugfix for input selection w/ tag representation in ui-select-default
This commit is contained in:
@@ -5,6 +5,7 @@ import $ from "jquery";
|
||||
import _ from "underscore";
|
||||
import Backbone from "backbone";
|
||||
import Utils from "utils/utils";
|
||||
import { keyedColorScheme } from "utils/color";
|
||||
import Buttons from "mvc/ui/ui-buttons";
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
@@ -211,9 +212,10 @@ var View = Backbone.View.extend({
|
||||
${_.reduce(
|
||||
filteredTags.slice(0, 5),
|
||||
(memo, tag) => {
|
||||
return `${memo} <div style="${Utils.generateTagStyle(
|
||||
tag.slice(5)
|
||||
)}" class="badge badge-primary badge-tags">${_.escape(tag)}</div>`;
|
||||
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>`;
|
||||
},
|
||||
""
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user