summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-10-03 22:33:09 +0200
committerFabio Bas <ctrlaltca@gmail.com>2013-10-03 22:33:09 +0200
commitbbeb1b968f5234a62c32681c2ed9e4a7a189bd34 (patch)
tree1b4103c885fd1bfc555fb93313c1dd2c3a20a603 /framework/Web/UI/ActiveControls
parenta5d1b481a09c14d2e1459648efdeae4b8371ed01 (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.php9
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)