diff options
author | emkael <emkael@tlen.pl> | 2016-05-02 23:41:16 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-05-02 23:41:16 +0200 |
commit | 8bbd37b880aa1e63eaa8cbe6432d69a8158fd892 (patch) | |
tree | c0b5b6d519e69bdc8a1da65c84bf0d10b723d214 /app | |
parent | c1ba0e05fbd618d48fce4995f34e14c2175b1dfc (diff) |
* registering control CSS as themed, if available
Diffstat (limited to 'app')
-rw-r--r-- | app/php/web/TemplateControl.php | 15 |
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) { |