Checking YUI into Moodle for future AJAX work

This commit is contained in:
moodler 2006-07-13 08:35:43 +00:00
parent 7bf59275a7
commit 118917bf17
101 changed files with 59042 additions and 0 deletions

10
lib/yui/yahoo/README Executable file
View file

@ -0,0 +1,10 @@
YAHOO Global Namespace - Release Notes
0.11.0
* Added YAHOO.extend, which provides an easy way to assign the prototype,
constructor, and superclass properties inheritance properties. It also
prevents the constructor of the superclass from being exectuted twice.
0.10.0
* Added YAHOO.log that provides a safe way to plumb logging statements in
code that will work if the logging component isn't available.

85
lib/yui/yahoo/yahoo-debug.js vendored Executable file
View file

@ -0,0 +1,85 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
/**
* The Yahoo global namespace
* @constructor
*/
var YAHOO = window.YAHOO || {};
/**
* Returns the namespace specified and creates it if it doesn't exist
*
* YAHOO.namespace("property.package");
* YAHOO.namespace("YAHOO.property.package");
*
* Either of the above would create YAHOO.property, then
* YAHOO.property.package
*
* @param {String} ns The name of the namespace
* @return {Object} A reference to the namespace object
*/
YAHOO.namespace = function(ns) {
if (!ns || !ns.length) {
return null;
}
var levels = ns.split(".");
var nsobj = YAHOO;
// YAHOO is implied, so it is ignored if it is included
for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
nsobj[levels[i]] = nsobj[levels[i]] || {};
nsobj = nsobj[levels[i]];
}
return nsobj;
};
/**
* Uses YAHOO.widget.Logger to output a log message, if the widget is available.
*
* @param {string} sMsg The message to log.
* @param {string} sCategory The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
* @param {string} sSource The source of the the message (opt)
* @return {boolean} True if the log operation was successful.
*/
YAHOO.log = function(sMsg, sCategory, sSource) {
var l = YAHOO.widget.Logger;
if(l && l.log) {
return l.log(sMsg, sCategory, sSource);
} else {
return false;
}
};
/**
* Utility to set up the prototype, constructor and superclass properties to
* support an inheritance strategy that can chain constructors and methods.
*
* @param {Function} subclass the object to modify
* @param {Function} superclass the object to inherit
*/
YAHOO.extend = function(subclass, superclass) {
var f = function() {};
f.prototype = superclass.prototype;
subclass.prototype = new f();
subclass.prototype.constructor = subclass;
subclass.superclass = superclass.prototype;
if (superclass.prototype.constructor == Object.prototype.constructor) {
superclass.prototype.constructor = superclass;
}
};
YAHOO.namespace("util");
YAHOO.namespace("widget");
YAHOO.namespace("example");

1
lib/yui/yahoo/yahoo-min.js vendored Executable file
View file

@ -0,0 +1 @@
/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 0.11.0 */ var YAHOO=window.YAHOO||{};YAHOO.namespace=function(ns){if(!ns||!ns.length){return null;}var _2=ns.split(".");var _3=YAHOO;for(var i=(_2[0]=="YAHOO")?1:0;i<_2.length;++i){_3[_2[i]]=_3[_2[i]]||{};_3=_3[_2[i]];}return _3;};YAHOO.log=function(_5,_6,_7){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(_5,_6,_7);}else{return false;}};YAHOO.extend=function(_9,_10){var f=function(){};f.prototype=_10.prototype;_9.prototype=new f();_9.prototype.constructor=_9;_9.superclass=_10.prototype;if(_10.prototype.constructor==Object.prototype.constructor){_10.prototype.constructor=_10;}};YAHOO.namespace("util");YAHOO.namespace("widget");YAHOO.namespace("example");

84
lib/yui/yahoo/yahoo.js vendored Executable file
View file

@ -0,0 +1,84 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
/**
* The Yahoo global namespace
* @constructor
*/
var YAHOO = window.YAHOO || {};
/**
* Returns the namespace specified and creates it if it doesn't exist
*
* YAHOO.namespace("property.package");
* YAHOO.namespace("YAHOO.property.package");
*
* Either of the above would create YAHOO.property, then
* YAHOO.property.package
*
* @param {String} ns The name of the namespace
* @return {Object} A reference to the namespace object
*/
YAHOO.namespace = function(ns) {
if (!ns || !ns.length) {
return null;
}
var levels = ns.split(".");
var nsobj = YAHOO;
// YAHOO is implied, so it is ignored if it is included
for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
nsobj[levels[i]] = nsobj[levels[i]] || {};
nsobj = nsobj[levels[i]];
}
return nsobj;
};
/**
* Uses YAHOO.widget.Logger to output a log message, if the widget is available.
*
* @param {string} sMsg The message to log.
* @param {string} sCategory The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
* @param {string} sSource The source of the the message (opt)
* @return {boolean} True if the log operation was successful.
*/
YAHOO.log = function(sMsg, sCategory, sSource) {
var l = YAHOO.widget.Logger;
if(l && l.log) {
return l.log(sMsg, sCategory, sSource);
} else {
return false;
}
};
/**
* Utility to set up the prototype, constructor and superclass properties to
* support an inheritance strategy that can chain constructors and methods.
*
* @param {Function} subclass the object to modify
* @param {Function} superclass the object to inherit
*/
YAHOO.extend = function(subclass, superclass) {
var f = function() {};
f.prototype = superclass.prototype;
subclass.prototype = new f();
subclass.prototype.constructor = subclass;
subclass.superclass = superclass.prototype;
if (superclass.prototype.constructor == Object.prototype.constructor) {
superclass.prototype.constructor = superclass;
}
};
YAHOO.namespace("util");
YAHOO.namespace("widget");
YAHOO.namespace("example");