From 541bb378ddece2eab135a8066a16994e94436dea Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Mon, 03 Oct 2011 16:04:12 +0000 Subject: Merge pull request #1 from gcsolaroli/master First version of the restructured repository --- (limited to 'frontend/beta/js/YUI/yahoo.js') diff --git a/frontend/beta/js/YUI/yahoo.js b/frontend/beta/js/YUI/yahoo.js new file mode 100644 index 0000000..8a44a91 --- a/dev/null +++ b/frontend/beta/js/YUI/yahoo.js @@ -0,0 +1,145 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.12.0 +*/ + +/** + * The YAHOO object is the single global object used by YUI Library. It + * contains utility function for setting up namespaces, inheritance, and + * logging. YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces + * created automatically for and used by the library. + * @module yahoo + * @title YAHOO Global + */ + +/** + * The YAHOO global namespace object + * @class YAHOO + * @static + */ +if (typeof YAHOO == "undefined") { + var 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 + * + * Be careful when naming packages. Reserved words may work in some browsers + * and not others. For instance, the following will fail in Safari: + *
+ * YAHOO.namespace("really.long.nested.namespace");
+ * 
+ * This fails because "long" is a future reserved word in ECMAScript + * + * @method namespace + * @static + * @param {String*} arguments 1-n namespaces to create + * @return {Object} A reference to the last namespace object created + */ +YAHOO.namespace = function() { + var a=arguments, o=null, i, j, d; + for (i=0; i