Skip to content

Commit

Permalink
Merge branch 'w41_MDL-28454_m21_yuibackport' of git://github.com/skod…
Browse files Browse the repository at this point in the history
…ak/moodle into MOODLE_21_STABLE
  • Loading branch information
stronk7 committed Oct 17, 2011
2 parents a258bda + a6bb036 commit 7edd6c2
Show file tree
Hide file tree
Showing 2,602 changed files with 420,240 additions and 306,067 deletions.
36 changes: 25 additions & 11 deletions lib/outputrequirementslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class page_requirements_manager {
protected $yui2loader;
/** YUI PHPLoader instance responsible for YUI3 loading from PHP only */
protected $yui3loader;
/** YUI PHPLoader instance responsible for YUI3 loading from javascript */
/** YUI loader information for YUI3 loading from javascript */
protected $M_yui_loader;
/** some config vars exposed in JS, please no secret stuff there */
protected $M_cfg;
Expand All @@ -120,7 +120,7 @@ public function __construct() {

require_once("$CFG->libdir/yui/phploader/phploader/loader.php");

$this->yui3loader = new YAHOO_util_Loader($CFG->yui3version);
$this->yui3loader = new stdClass();
$this->yui2loader = new YAHOO_util_Loader($CFG->yui2version);

// set up some loader options
Expand Down Expand Up @@ -201,11 +201,6 @@ public function __construct() {
$this->js_module($this->find_module('core_filepicker'));
$this->js_module($this->find_module('core_dock'));

// YUI3 init code
$libs = array('cssreset', 'cssbase', 'cssfonts', 'cssgrids', 'node', 'loader'); // full CSS reset + basic libs
foreach ($libs as $lib) {
$this->yui3loader->load($lib);
}
}

/**
Expand Down Expand Up @@ -965,10 +960,29 @@ protected function get_javascript_init_code() {
* @return string
*/
protected function get_yui3lib_headcode() {
$code = $this->yui3loader->tags();
// unfortunately yui loader does not produce xhtml strict code, so let's fix it for now
$code = str_replace('&', '&', $code);
$code = str_replace('&', '&', $code);
global $CFG;

$code = '';

if ($this->yui3loader->combine) {
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->comboBase
.$CFG->yui3version.'/build/cssreset/reset-min.css&amp;'
.$CFG->yui3version.'/build/cssfonts/fonts-min.css&amp;'
.$CFG->yui3version.'/build/cssgrids/grids-min.css&amp;'
.$CFG->yui3version.'/build/cssbase/base-min.css" />';
} else {
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssreset/reset-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssfonts/fonts-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssgrids/grids-min.css" />';
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.'cssbase/base-min.css" />';
}

if (debugging('', DEBUG_DEVELOPER)) {
$code .= '<script src="'.$this->yui3loader->base.'yui/yui-debug.js"></script>';
} else {
$code .= '<script src="'.$this->yui3loader->base.'yui/yui-min.js"></script>';
}

return $code;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@
umask(0000);

// exact version of currently used yui2 and 3 library
$CFG->yui2version = '2.8.2';
$CFG->yui3version = '3.2.0';
$CFG->yui2version = '2.9.0';
$CFG->yui3version = '3.4.1';


// special support for highly optimised scripts that do not need libraries and DB connection
Expand Down
2 changes: 1 addition & 1 deletion lib/thirdpartylibs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
<location>yui</location>
<name>YUI</name>
<license>BSD</license>
<version>3.3.2</version>
<version>3.4.1</version>
<licenseversion></licenseversion>
</library>
<library>
Expand Down
23 changes: 0 additions & 23 deletions lib/yui/2.8.2/build/animation/animation-min.js

This file was deleted.

7 changes: 0 additions & 7 deletions lib/yui/2.8.2/build/assets/skins/sam/autocomplete.css

This file was deleted.

Loading

0 comments on commit 7edd6c2

Please sign in to comment.