Sha256: c3815b05b7f8b6799e14ff6ae310b60cd55ebd0fac46fbaf12464880cc4b45ac
Contents?: true
Size: 761 Bytes
Versions: 6
Compression:
Stored size: 761 Bytes
Contents
= select_tag 'task_label_ids', options_for_select(normal_labels.map { |l| [l.name, l.id, { color: l.color }] }, selected_label_ids), { multiple: true, class: 'select2 col-12' } :javascript $('#task_label_ids').select2({ dropdownCssClass: 'labeling', templateSelection: function(data, container) { if (data.id == '') { return data.text; } else { return $('<span class="label-colors lc-' + $(data.element).attr('color') + '">' + data.text + '</span>'); } }, templateResult: function(data, container) { if (data.id == '') { return data.text; } else { return $('<span class="badge label-colors lc-' + $(data.element).attr('color') + '">' + data.text + '</span>'); } } });
Version data entries
6 entries across 6 versions & 1 rubygems