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/TClientScriptManager.php | |
parent | a5d1b481a09c14d2e1459648efdeae4b8371ed01 (diff) |
During callback, separate loading of stylesheet files and code snippets; fixes #480
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 0cdf3e32..ea828187 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -402,17 +402,14 @@ class TClientScriptManager extends TApplicationComponent /** * Returns the URLs of all stylesheet files referenced on the page - * @return array Combined list of all stylesheet urls used in the page + * @return array List of all stylesheet urls used in the page */ public function getStyleSheetUrls() { $stylesheets = array_values( - array_merge( - array_map( - create_function('$e', 'return is_array($e) ? $e[0] : $e;'), - $this->_styleSheetFiles), - $this->_styleSheets - ) + array_map( + create_function('$e', 'return is_array($e) ? $e[0] : $e;'), + $this->_styleSheetFiles) ); foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url) @@ -425,6 +422,15 @@ class TClientScriptManager extends TApplicationComponent } /** + * Returns all the stylesheet code snippets referenced on the page + * @return array List of all stylesheet snippets used in the page + */ + public function getStyleSheetCodes() + { + return array_unique(array_values($this->_styleSheets)); + } + + /** * Registers a javascript file in the page head * @param string a unique key identifying the file * @param string URL to the javascript file |