From b577db2af4a01d284f68fc12af6fa63b0d7ef635 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Fri, 19 Sep 2025 19:11:03 -0400 Subject: [PATCH] bring in **ALL** style sheets defined on the tenant NOTE: this does not check any relationships, etc.; if there is an instance of the Style Sheet class it will be loaded! --- .../lib/mocha/ui/renderers/html/HTMLRenderer.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php index 42febe1..000892b 100644 --- a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php +++ b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php @@ -2099,6 +2099,16 @@ EOF "href" => System::ExpandRelativePath("~/themes/mocha/theme.css", false, true) )); + // FIXME: this should be brought in by the OMS because it causes way too many API calls + $styleSheets = $oms->getInstancesOf(new InstanceKey(1, 22009)); + if (count($styleSheets) > 0) { + $content = ""; + foreach ($styleSheets as $ss) { + $content .= $oms->getAttributeValue($ss, new InstanceKey(4, 2)) . "\n"; + } + $this->renderTag("style", array ("type" => "text/css"), null, $content); + } + $this->renderTag("script", array("type" => "text/javascript", "src" => System::ExpandRelativePath("~/scripts/phast/ckeditor/ckeditor.js", false, true))); $this->renderTag("script", array("type" => "text/javascript", "src" => System::ExpandRelativePath("~/scripts/phast/System.js.php", false, true))); $this->renderTag("script", array("type" => "text/javascript", "src" => System::ExpandRelativePath("~/scripts/mocha.js.php", false, true)));