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 00:59:22 +02:00
parent 39d71c9c43
commit b15c8e30bc
8 changed files with 91 additions and 64 deletions

View File

@@ -52,7 +52,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_NEUTRAL);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_NEUTRAL);
return $oPanel;
}
@@ -71,7 +71,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_INFORMATION);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_INFORMATION);
return $oPanel;
}
@@ -90,7 +90,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_SUCCESS);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_SUCCESS);
return $oPanel;
}
@@ -109,7 +109,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_WARNING);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_WARNING);
return $oPanel;
}
@@ -128,7 +128,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_DANGER);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_DANGER);
return $oPanel;
}
@@ -147,7 +147,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_FAILURE);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_FAILURE);
return $oPanel;
}
@@ -166,7 +166,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_PRIMARY);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_PRIMARY);
return $oPanel;
}
@@ -185,7 +185,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
if (!is_null($sSubTitle)) {
$oPanel->SetSubTitle($sSubTitle);
}
$oPanel->SetColor(Panel::ENUM_COLOR_SECONDARY);
$oPanel->SetColorFromSemantic(Panel::ENUM_COLOR_SECONDARY);
return $oPanel;
}