N°3791 - Panel: Use style defined in the DM for classes

Note that for now, semantic colors cannot be used directly in a <main_color> or <complementary_color> tag. Only valid CSS color (hexa, hsla, ...)
This commit is contained in:
Molkobain
2021-09-26 13:58:48 +02:00
parent 21545da062
commit 3214ae91c7
5 changed files with 327 additions and 85 deletions

View File

@@ -434,10 +434,10 @@ class Panel extends UIContentBlock
*/
public function SetColorFromOrmStyle(ormStyle $oStyle)
{
if (strlen($oStyle->GetStyleClass()) === 0) {
$this->SetColorFromColorSemantic(static::DEFAULT_COLOR_SCHEME);
} else {
if ($oStyle->HasStyleClass()) {
$this->SetCSSColorClass($oStyle->GetStyleClass());
} else {
$this->SetColorFromColorSemantic(static::DEFAULT_COLOR_SCHEME);
}
return $this;