summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/php/web/TemplateControl.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/app/php/web/TemplateControl.php b/app/php/web/TemplateControl.php
index 213a680..cc7f840 100644
--- a/app/php/web/TemplateControl.php
+++ b/app/php/web/TemplateControl.php
@@ -128,10 +128,17 @@ class TemplateControl extends TTemplateControl {
$this->_registerControlStyleDependencies(
$this->getControlStyleDependencies()
);
- $this->Page->ClientScript->registerStyleSheetFile(
- 'TemplateControl.' . get_class($this),
- $this->Application->AssetManager->publishFilePath($styleFile)
- );
+ if (method_exists($this->Page->ClientScript, 'registerThemeStyleSheetFile')) {
+ $this->Page->ClientScript->registerThemeStyleSheetFile(
+ 'TemplateControl.' . get_class($this),
+ $this->Application->AssetManager->publishFilePath($styleFile)
+ );
+ } else {
+ $this->Page->ClientScript->registerStyleSheetFile(
+ 'TemplateControl.' . get_class($this),
+ $this->Application->AssetManager->publishFilePath($styleFile)
+ );
+ }
}
private function _registerExternalStyleDependencies($dependencies) {