From 7a66aba8e7c73872a1ae7f0e8dd9dbfe48d55a56 Mon Sep 17 00:00:00 2001 From: maurofmferrao Date: Tue, 5 Mar 2024 08:55:15 +0000 Subject: [PATCH] 'Unknown Color' Error with Transparent Background relates to xibosignage/xibo#3341 --- ui/src/core/forms.js | 3 +++ ui/src/templates/forms/inputs/color.hbs | 1 + ui/src/templates/forms/layout.hbs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/core/forms.js b/ui/src/core/forms.js index dc26cd2ab7..255c8752c1 100644 --- a/ui/src/core/forms.js +++ b/ui/src/core/forms.js @@ -1758,6 +1758,9 @@ window.forms = { $(el).colorpicker({ container: $(el).find('.picker-container'), align: 'left', + format: ($(el).data('colorFormat') !== undefined) ? + $(el).data('colorFormat') : + false, }); const $inputElement = $(el).find('input'); diff --git a/ui/src/templates/forms/inputs/color.hbs b/ui/src/templates/forms/inputs/color.hbs index 48fd7a341c..8292633402 100644 --- a/ui/src/templates/forms/inputs/color.hbs +++ b/ui/src/templates/forms/inputs/color.hbs @@ -3,6 +3,7 @@ {{#if visibility}}data-visibility="{{visibility}}"{{/if}} {{#if dependsOn}}data-depends-on="{{dependsOn}}"{{/if}} {{#if isRequired}}data-is-required="{{isRequired}}"{{/if}} + {{#if colorFormat}}data-color-format="{{colorFormat}}"{{/if}} > {{#if title}} diff --git a/ui/src/templates/forms/layout.hbs b/ui/src/templates/forms/layout.hbs index 8f41d3d838..2116c4d992 100644 --- a/ui/src/templates/forms/layout.hbs +++ b/ui/src/templates/forms/layout.hbs @@ -6,7 +6,7 @@
- {{> inputs/color value=layout.backgroundColor id="backgroundColor" title=trans.layout.backgroundColor helpText=trans.layout.backgroundColorHelpText }} + {{> inputs/color value=layout.backgroundColor id="backgroundColor" colorFormat="rgb" title=trans.layout.backgroundColor helpText=trans.layout.backgroundColorHelpText }}