summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/php/web/ClientScriptManager.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/app/php/web/ClientScriptManager.php b/app/php/web/ClientScriptManager.php
index 84b9d6f..f43ac02 100644
--- a/app/php/web/ClientScriptManager.php
+++ b/app/php/web/ClientScriptManager.php
@@ -57,16 +57,22 @@ class ClientScriptManager extends TClientScriptManager {
return max(array_map('filemtime', $files));
}
- private $_renderedScriptsInitialized = FALSE;
-
- private function _getRenderedScriptsStoreKey() {
+ private function _getRenderedAssetsStoreKey($type) {
$template = $this->_page->Master;
if (!$template instanceof Layout) {
throw new TNotSupportedException(
'Compiled assets may only be used within Layout master class controls'
);
}
- return 'RenderedScripts.' . $template->generateViewID();
+ return 'Rendered' . $type . '.' . $template->generateViewID();
+ }
+
+ private function _getRenderedScriptsStoreKey() {
+ return $this->_getRenderedAssetsStoreKey('Scripts');
+ }
+
+ private function _getRenderedSheetsStoreKey() {
+ return $this->_getRenderedAssetsStoreKey('Sheets');
}
private function _getCache() {
@@ -79,6 +85,10 @@ class ClientScriptManager extends TClientScriptManager {
return $cache;
}
+ // Scripts
+
+ private $_renderedScriptsInitialized = FALSE;
+
private function _getRenderedScripts() {
$sessionKey = $this->_getRenderedScriptsStoreKey();
if ($this->_page->IsCallBack || $this->_renderedScriptsInitialized) {