mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°3593 Fix file import variable usage in theme compilation
This commit is contained in:
@@ -2827,7 +2827,8 @@ EOF;
|
||||
$sThemeId = $oTheme->getAttribute('id');
|
||||
$aThemeParameters = array(
|
||||
'variables' => array(),
|
||||
'imports' => array(),
|
||||
'imports_variable' => array(),
|
||||
'imports_utility' => array(),
|
||||
'stylesheets' => array(),
|
||||
'precompiled_stylesheet' => '',
|
||||
);
|
||||
@@ -2845,7 +2846,14 @@ EOF;
|
||||
foreach($oImports as $oImport)
|
||||
{
|
||||
$sImportId = $oImport->getAttribute('id');
|
||||
$aThemeParameters['imports'][$sImportId] = $oImport->GetText();
|
||||
if($oImport->getAttribute('xsi:type') === 'variable')
|
||||
{
|
||||
$aThemeParameters['imports_variable'][$sImportId] = $oImport->GetText();
|
||||
}
|
||||
else if($oImport->getAttribute('xsi:type') === 'utility')
|
||||
{
|
||||
$aThemeParameters['imports_utility'][$sImportId] = $oImport->GetText();
|
||||
}
|
||||
}
|
||||
|
||||
/** @var \DOMNodeList $oStylesheets */
|
||||
|
||||
@@ -833,6 +833,12 @@ class iTopDesignFormat
|
||||
|
||||
$sTestRedBannerTextContentPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-content"]';
|
||||
$this->SetNodeAttribute($sTestRedBannerTextContentPath, 'id', 'ibo-page-banner-text-content');
|
||||
|
||||
// Add new attribute to theme import nodes
|
||||
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme/imports/import');
|
||||
foreach ($oNodeList as $oNode) {
|
||||
$oNode->setAttribute('xsi:type', 'utility');
|
||||
}
|
||||
|
||||
// Add Class Style
|
||||
$oNodeList = $oXPath->query("/itop_design/classes//class/properties");
|
||||
@@ -930,7 +936,13 @@ class iTopDesignFormat
|
||||
|
||||
$sTestRedBannerTextContentPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-text-content"]';
|
||||
$this->SetNodeAttribute($sTestRedBannerTextContentPath, 'id', 'backoffice-environment-banner-text-content');
|
||||
|
||||
// Add new attribute to theme import nodes
|
||||
|
||||
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme/imports/import');
|
||||
foreach ($oNodeList as $oNode) {
|
||||
$oNode->removeAttribute('xsi:type');
|
||||
}
|
||||
|
||||
// Remove class style
|
||||
$oNodeList = $oXPath->query("/itop_design/classes//class/properties");
|
||||
foreach ($oNodeList as $oNode) {
|
||||
|
||||
Reference in New Issue
Block a user