javascript MDL-21503 Removed use of the global Y from dock, navigation and calendar
Also included in this patch the ability to switch the dock from the left to right side of the screen. Altered js_object_init to deliver Y like js_init_call does now. Several minor tweaks made to the dock and navigation as well at the same time.
This commit is contained in:
@@ -615,11 +615,11 @@ class js_writer {
|
||||
}
|
||||
|
||||
if ($var === null) {
|
||||
$js = "new $class($arguments);";
|
||||
$js = "new $class(Y, $arguments);";
|
||||
} else if (strpos($var, '.')!==false) {
|
||||
$js = "$var = new $class($arguments);";
|
||||
$js = "$var = new $class(Y, $arguments);";
|
||||
} else {
|
||||
$js = "var $var = new $class($arguments);";
|
||||
$js = "var $var = new $class(Y, $arguments);";
|
||||
}
|
||||
|
||||
if ($delay) {
|
||||
@@ -629,7 +629,7 @@ class js_writer {
|
||||
|
||||
if (count($requirements) > 0) {
|
||||
$requirements = implode("', '", $requirements);
|
||||
$js = "Y.use('$requirements', function(){ $js });";
|
||||
$js = "Y.use('$requirements', function(Y){ $js });";
|
||||
}
|
||||
return $js."\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user