Skip to content

Commit

Permalink
MDL-41208 import YUI 3.12.0 with @Version@ fix for simpleyui
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 20, 2013
1 parent 7f3836d commit aaee690
Show file tree
Hide file tree
Showing 2,206 changed files with 55,366 additions and 43,637 deletions.
32 changes: 22 additions & 10 deletions lib/outputrequirementslib.php
Expand Up @@ -167,13 +167,22 @@ public function __construct() {
$this->yui3loader = new stdClass();
$this->YUI_config = new YUI_config();

if (strpos($CFG->httpswwwroot, 'https:') === 0) {
// On HTTPS sites all JS must be loaded from https sites,
// YUI CDN does not support https yet, sorry.
$CFG->useexternalyui = 0;
}

// Set up some loader options.
if (!empty($CFG->useexternalyui) and strpos($CFG->httpswwwroot, 'https:') !== 0) {
$this->yui3loader->base = 'http://yui.yahooapis.com/' . $CFG->yui3version . '/build/';
$this->yui3loader->local_base = $CFG->httpswwwroot . '/lib/yuilib/'. $CFG->yui3version . '/';
$this->yui3loader->local_comboBase = $CFG->httpswwwroot . '/theme/yui_combo.php'.$sep;

if (!empty($CFG->useexternalyui)) {
$this->yui3loader->base = 'http://yui.yahooapis.com/' . $CFG->yui3version . '/';
$this->yui3loader->comboBase = 'http://yui.yahooapis.com/combo?';
} else {
$this->yui3loader->base = $CFG->httpswwwroot . '/lib/yuilib/'. $CFG->yui3version . '/build/';
$this->yui3loader->comboBase = $CFG->httpswwwroot . '/theme/yui_combo.php'.$sep;
$this->yui3loader->base = $this->yui3loader->local_base;
$this->yui3loader->comboBase = $this->yui3loader->local_comboBase;
}

// Enable combo loader? This significantly helps with caching and performance!
Expand Down Expand Up @@ -1219,25 +1228,28 @@ protected function get_yui3lib_headcode($page) {

$code = '';

// Note: SimpleYUI is broken in 3.12 and will not be available in future YUI versions,
// that is why we can not load it from CDN.

if ($this->yui3loader->combine) {
if (!empty($page->theme->yuicssmodules)) {
$modules = array();
foreach ($page->theme->yuicssmodules as $module) {
$modules[] = "$CFG->yui3version/build/$module/$module-min.css";
$modules[] = "$CFG->yui3version/$module/$module-min.css";
}
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->comboBase.implode('&amp;', $modules).'" />';
}
$code .= '<script type="text/javascript" src="'.$this->yui3loader->comboBase
.$CFG->yui3version.'/build/simpleyui/simpleyui-min.js&amp;'
.$CFG->yui3version.'/build/loader/loader-min.js"></script>';
$code .= '<script type="text/javascript" src="'.$this->yui3loader->local_comboBase
.$CFG->yui3version.'/simpleyui/simpleyui-min.js&amp;'
.$CFG->yui3version.'/loader/loader-min.js"></script>';
} else {
if (!empty($page->theme->yuicssmodules)) {
foreach ($page->theme->yuicssmodules as $module) {
$code .= '<link rel="stylesheet" type="text/css" href="'.$this->yui3loader->base.$module.'/'.$module.'-min.css" />';
}
}
$code .= '<script type="text/javascript" src="'.$this->yui3loader->base.'simpleyui/simpleyui-min.js"></script>';
$code .= '<script type="text/javascript" src="'.$this->yui3loader->base.'loader/loader-min.js"></script>';
$code .= '<script type="text/javascript" src="'.$this->yui3loader->local_base.'simpleyui/simpleyui-min.js"></script>';
$code .= '<script type="text/javascript" src="'.$this->yui3loader->local_base.'loader/loader-min.js"></script>';
}


Expand Down
2 changes: 1 addition & 1 deletion lib/setup.php
Expand Up @@ -322,7 +322,7 @@

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

// Store settings from config.php in array in $CFG - we can use it later to detect problems and overrides.
if (!isset($CFG->config_php_settings)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/thirdpartylibs.xml
Expand Up @@ -200,7 +200,7 @@
<location>yui</location>
<name>YUI</name>
<license>BSD</license>
<version>3.9.1</version>
<version>3.12.0</version>
<licenseversion></licenseversion>
</library>
<library>
Expand Down
@@ -1,4 +1,10 @@
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add('align-plugin', function (Y, NAME) {

/**
Expand Down Expand Up @@ -191,4 +197,4 @@ YUI.add('align-plugin', function (Y, NAME) {



}, '3.9.1', {"requires": ["node-screen", "node-pluginhost"]});
}, '3.12.0', {"requires": ["node-screen", "node-pluginhost"]});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -1,4 +1,10 @@
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add('align-plugin', function (Y, NAME) {

/**
Expand Down Expand Up @@ -191,4 +197,4 @@ YUI.add('align-plugin', function (Y, NAME) {



}, '3.9.1', {"requires": ["node-screen", "node-pluginhost"]});
}, '3.12.0', {"requires": ["node-screen", "node-pluginhost"]});
@@ -1,4 +1,10 @@
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add('anim-base', function (Y, NAME) {

/**
Expand Down Expand Up @@ -683,4 +689,4 @@ YUI.add('anim-base', function (Y, NAME) {
Y.extend(Y.Anim, Y.Base, proto);


}, '3.9.1', {"requires": ["base-base", "node-style"]});
}, '3.12.0', {"requires": ["base-base", "node-style"]});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions ...yuilib/3.9.1/build/anim-base/anim-base.js → lib/yuilib/3.12.0/anim-base/anim-base.js 100644 → 100755
@@ -1,4 +1,10 @@
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add('anim-base', function (Y, NAME) {

/**
Expand Down Expand Up @@ -682,4 +688,4 @@ YUI.add('anim-base', function (Y, NAME) {
Y.extend(Y.Anim, Y.Base, proto);


}, '3.9.1', {"requires": ["base-base", "node-style"]});
}, '3.12.0', {"requires": ["base-base", "node-style"]});
@@ -1,4 +1,10 @@
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
/*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

YUI.add('anim-color', function (Y, NAME) {

/**
Expand Down Expand Up @@ -51,4 +57,4 @@ Y.each(['backgroundColor',
);


}, '3.9.1', {"requires": ["anim-base"]});
}, '3.12.0', {"requires": ["anim-base"]});

0 comments on commit aaee690

Please sign in to comment.