Create a theme_view function script which allows modules in the head or admin_head functions to specify javascript files that are required for this page.

In this commit, these script files are expressed at the end of the head or admin_head calls and appended to the beginning of the block stack.  In a future commit these will be combined and gzipped for download.
This commit is contained in:
Tim Almdal
2009-06-26 14:37:15 -07:00
parent 57bb110147
commit 4cec020163
3 changed files with 46 additions and 27 deletions

View File

@@ -19,8 +19,8 @@
*/
class comment_theme_Core {
static function head($theme) {
$url = url::file("modules/comment/js/comment.js");
return "<script src=\"$url\" type=\"text/javascript\"></script>\n";
$theme->script("modules/comment/js/comment.js");
return "";
}
static function photo_bottom($theme) {