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:
Sam Hemelryk
2010-02-05 06:36:09 +00:00
parent e5752b7d5b
commit 53fc3e7040
16 changed files with 386 additions and 290 deletions
+4 -4
View File
@@ -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";
}