diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-10-03 22:33:09 +0200 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-10-03 22:33:09 +0200 |
commit | bbeb1b968f5234a62c32681c2ed9e4a7a189bd34 (patch) | |
tree | 1b4103c885fd1bfc555fb93313c1dd2c3a20a603 /framework/Web/UI/ActiveControls | |
parent | a5d1b481a09c14d2e1459648efdeae4b8371ed01 (diff) |
During callback, separate loading of stylesheet files and code snippets; fixes #480
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActivePageAdapter.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php index d90d0997..03fe2f16 100644 --- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php +++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php @@ -56,6 +56,10 @@ class TActivePageAdapter extends TControlAdapter */ const CALLBACK_STYLESHEETLIST_HEADER = 'X-PRADO-STYLESHEETLIST'; /** + * Stylesheet header name. + */ + const CALLBACK_STYLESHEET_HEADER = 'X-PRADO-STYLESHEET'; + /** * Hidden field list header name. */ const CALLBACK_HIDDENFIELDLIST_HEADER = 'X-PRADO-HIDDENFIELDLIST'; @@ -212,6 +216,11 @@ class TActivePageAdapter extends TControlAdapter if (count($stylesheets)>0) $this->appendContentPart($response, self::CALLBACK_STYLESHEETLIST_HEADER, TJavaScript::jsonEncode($stylesheets)); + // collect all stylesheet snippets references + $stylesheets = $cs->getStyleSheetCodes(); + if (count($stylesheets)>0) + $this->appendContentPart($response, self::CALLBACK_STYLESHEET_HEADER, TJavaScript::jsonEncode($stylesheets)); + // collect all script file references $scripts = $cs->getScriptUrls(); if (count($scripts)>0) |