|
|
|
|
@@ -825,14 +825,20 @@ class iTopDesignFormat
|
|
|
|
|
$this->RemoveNodeFromXPath('/itop_design/branding/themes/theme[@id="test-red"]/stylesheets/stylesheet[@id="jqueryui"]');
|
|
|
|
|
$this->RemoveNodeFromXPath('/itop_design/branding/themes/theme[@id="test-red"]/stylesheets/stylesheet[@id="main"]');
|
|
|
|
|
|
|
|
|
|
$sTestRedBannerBackgroundColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-background-color"]';
|
|
|
|
|
$this->SetNodeAttribute($sTestRedBannerBackgroundColorPath, 'id', 'ibo-page-banner-background-color');
|
|
|
|
|
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-background-color"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'ibo-page-banner-background-color');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$oNodeList = $oXPath->query( '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-color"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'ibo-page-banner-text-color');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sTestRedBannerTextColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-color"]';
|
|
|
|
|
$this->SetNodeAttribute($sTestRedBannerTextColorPath, 'id', 'ibo-page-banner-text-color');
|
|
|
|
|
|
|
|
|
|
$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');
|
|
|
|
|
$oNodeList = $oXPath->query( '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="backoffice-environment-banner-text-content"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'ibo-page-banner-text-content');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add new attribute to theme import nodes
|
|
|
|
|
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme/imports/import');
|
|
|
|
|
@@ -928,14 +934,22 @@ class iTopDesignFormat
|
|
|
|
|
|
|
|
|
|
// N°3516 Bring back legacy themes
|
|
|
|
|
// Update test-red theme
|
|
|
|
|
$sTestRedBannerBackgroundColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-background-color"]';
|
|
|
|
|
$this->SetNodeAttribute($sTestRedBannerBackgroundColorPath, 'id', 'backoffice-environment-banner-background-color');
|
|
|
|
|
|
|
|
|
|
$sTestRedBannerTextColorPath = '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-text-color"]';
|
|
|
|
|
$this->SetNodeAttribute($sTestRedBannerTextColorPath, 'id', 'backoffice-environment-banner-text-color');
|
|
|
|
|
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-background-color"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'backoffice-environment-banner-background-color');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$oNodeList = $oXPath->query('/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-text-color"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'backoffice-environment-banner-text-color');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$oNodeList = $oXPath->query( '/itop_design/branding/themes/theme[@id="test-red"]/variables/variable[@id="ibo-page-banner-text-content"]');
|
|
|
|
|
foreach ($oNodeList as $oNode) {
|
|
|
|
|
$oNode->setAttribute('id', 'backoffice-environment-banner-text-content');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$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');
|
|
|
|
|
@@ -957,38 +971,6 @@ class iTopDesignFormat
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* Replace those weird setAttribute calls on DOMNode above 🤷
|
|
|
|
|
*
|
|
|
|
|
* @param string $sPath
|
|
|
|
|
* @param string $sAttributeName
|
|
|
|
|
* @param string $sAttributeValue
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*
|
|
|
|
|
* @since 3.0.0
|
|
|
|
|
*/
|
|
|
|
|
private function SetNodeAttribute($sPath, $sAttributeName, $sAttributeValue)
|
|
|
|
|
{
|
|
|
|
|
$oXPath = new DOMXPath($this->oDocument);
|
|
|
|
|
|
|
|
|
|
$oNodeList = $oXPath->query($sPath);
|
|
|
|
|
foreach ($oNodeList as $oNode)
|
|
|
|
|
{
|
|
|
|
|
if($oNode->attributes)
|
|
|
|
|
{
|
|
|
|
|
foreach ($oNode->attributes as $oAttribute)
|
|
|
|
|
{
|
|
|
|
|
if($oAttribute->nodeName === $sAttributeName)
|
|
|
|
|
{
|
|
|
|
|
$oAttribute->nodeValue = $sAttributeValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $sPath
|
|
|
|
|
|