mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
Improve rendering of color options
This commit is contained in:
parent
053e02d4d7
commit
80b49aa6b2
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -18,7 +18,9 @@ export function initStaticSelects(): void {
|
|||||||
// Initialize color selection fields
|
// Initialize color selection fields
|
||||||
export function initColorSelects(): void {
|
export function initColorSelects(): void {
|
||||||
function renderColor(item: TomOption, escape: typeof escape_html) {
|
function renderColor(item: TomOption, escape: typeof escape_html) {
|
||||||
return `<div><span class="dropdown-item-indicator color-label" style="background-color: #${escape(item.value)}"></span> ${escape(item.text)}</div>`
|
return `<div><span class="dropdown-item-indicator color-label" style="background-color: #${escape(
|
||||||
|
item.value,
|
||||||
|
)}"></span> ${escape(item.text)}</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const select of getElements<HTMLSelectElement>('select.color-select')) {
|
for (const select of getElements<HTMLSelectElement>('select.color-select')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user