mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°2677 - Add style definition for enums (fix CI)
This commit is contained in:
@@ -1348,7 +1348,7 @@ EOF
|
||||
$sMainColor = $this->GetMandatoryPropString($oStyleNode, 'main_color');
|
||||
$sComplementaryColor = $this->GetMandatoryPropString($oStyleNode, 'complementary_color');
|
||||
$sDecorationClasses = $this->GetPropString($oStyleNode, 'decoration_classes', '');
|
||||
$aValues[] = $sCode;
|
||||
$aValues[] = self::RemoveSurroundingQuotes($sCode);
|
||||
$aStyledValues[] = "$sCode => new ormStyle($sMainColor, $sComplementaryColor, $sDecorationClasses)";
|
||||
}
|
||||
$sValues = '"'.implode(',', $aValues).'"';
|
||||
@@ -3260,4 +3260,14 @@ XML;
|
||||
EOF;
|
||||
$this->WriteFile($sResultFile, $sFileHeader.$sCompiledCode);
|
||||
}
|
||||
|
||||
private static function RemoveSurroundingQuotes($sValue)
|
||||
{
|
||||
if (utils::StartsWith($sValue, '\'') && utils::EndsWith($sValue, '\''))
|
||||
{
|
||||
$sValue = substr($sValue, 1, -1);
|
||||
}
|
||||
|
||||
return $sValue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user