Merge branch 'MDL-38507-m' of git://github.com/andrewnicols/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-03-19 13:31:46 +01:00
commit 7c27e34742

View File

@ -1049,11 +1049,7 @@ class page_requirements_manager {
// create circular references in memory which prevents garbage collection.
$this->init_requirements_data($page, $renderer);
// YUI3 JS and CSS is always loaded first - it is cached in browser.
$output = $this->get_yui3lib_headcode($page);
// Now theme CSS + custom CSS in this specific order.
$output .= $this->get_css_code();
$output = '';
// Set up global YUI3 loader object - this should contain all code needed by plugins.
// Note: in JavaScript just use "YUI().use('overlay', function(Y) { .... });",
@ -1067,6 +1063,13 @@ class page_requirements_manager {
$js = $this->YUI_config->update_header_js($js);
$output .= html_writer::script($js);
// YUI3 JS and CSS need to be loaded in the header but after the YUI_config has been created.
// They should be cached well by the browser.
$output .= $this->get_yui3lib_headcode($page);
// Now theme CSS + custom CSS in this specific order.
$output .= $this->get_css_code();
// Link our main JS file, all core stuff should be there.
$output .= html_writer::script('', $this->js_fix_url('/lib/javascript-static.js'));