mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
N°3123 : Improved JavaScript management in web pages and ajax pages
This commit is contained in:
@@ -716,15 +716,10 @@ class WebPage implements Page
|
||||
public function RenderInlineScriptsAndCSSRecursively(iUIBlock $oBlock): void
|
||||
{
|
||||
$oBlockRenderer = new BlockRenderer($oBlock);
|
||||
$sInlineScript = trim($oBlockRenderer->RenderJsInline());
|
||||
if (!empty($sInlineScript)) {
|
||||
$this->add_script($sInlineScript);
|
||||
}
|
||||
$this->add_script($oBlockRenderer->RenderJsInline(iUIBlock::JS_TYPE_ON_INIT));
|
||||
$this->add_script($oBlockRenderer->RenderJsInline(iUIBlock::JS_TYPE_LIVE));
|
||||
|
||||
$sInlineStyle = trim($oBlockRenderer->RenderCssInline());
|
||||
if (!empty($sInlineStyle)) {
|
||||
$this->add_style($sInlineStyle);
|
||||
}
|
||||
$this->add_style($oBlockRenderer->RenderCssInline());
|
||||
|
||||
foreach ($oBlock->GetSubBlocks() as $oSubBlock) {
|
||||
$this->RenderInlineScriptsAndCSSRecursively($oSubBlock);
|
||||
|
||||
Reference in New Issue
Block a user