Skip to content

Commit

Permalink
Refactor modules to CommonJS AMD, !strict refs #11869
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@23032 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
kriszyp committed Oct 20, 2010
1 parent 961b846 commit fd62e05
Show file tree
Hide file tree
Showing 273 changed files with 4,552 additions and 882 deletions.
7 changes: 5 additions & 2 deletions AdapterRegistry.js
@@ -1,4 +1,4 @@
dojo.provide("dojo.AdapterRegistry");
define("dojo/AdapterRegistry", ["dojo"], function(dojo) {

dojo.AdapterRegistry = function(/*Boolean?*/ returnWrappers){
// summary:
Expand Down Expand Up @@ -31,7 +31,7 @@ dojo.AdapterRegistry = function(/*Boolean?*/ returnWrappers){

this.pairs = [];
this.returnWrappers = returnWrappers || false; // Boolean
}
};

dojo.extend(dojo.AdapterRegistry, {
register: function(/*String*/ name, /*Function*/ check, /*Function*/ wrap, /*Boolean?*/ directReturn, /*Boolean?*/ override){
Expand Down Expand Up @@ -93,3 +93,6 @@ dojo.extend(dojo.AdapterRegistry, {
return false;
}
});

return dojo.AdapterRegistry;
});
6 changes: 5 additions & 1 deletion DeferredList.js
@@ -1,4 +1,5 @@
dojo.provide("dojo.DeferredList");
define("dojo/DeferredList", ["dojo"], function(dojo) {

dojo.DeferredList = function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
// summary:
// Provides event handling for a group of Deferred objects.
Expand Down Expand Up @@ -70,3 +71,6 @@ dojo.DeferredList.prototype.gatherResults= function(deferredList){
});
return d;
};

return dojo.DeferredList;
});
36 changes: 36 additions & 0 deletions LICENSE
@@ -1,3 +1,39 @@
License for all modules marked
"Copyright (c) 2008-2010, Rawld Gill and ALTOVISO LLC."
or otherwise changed from or not included with the version licensed by The Dojo Foundation:

-------------------------------------------------------------------------------
The "New" BSD License:
**********************

Copyright (c) 2008 - 2010, Rawld Gill and ALTOVISO LLC
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the names of Rawld Gill or ALTOVISO LLC, nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

End of License.
---------------------------------------------------------------------------

Otherwise, all remaining resources Copyright (c) 2005-2010, The Dojo Foundation

Dojo is available under *either* the terms of the modified BSD license *or* the
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
license to receive this code under (except as noted in per-module LICENSE
Expand Down
5 changes: 2 additions & 3 deletions NodeList-data.js
@@ -1,5 +1,4 @@
dojo.provide("dojo.NodeList-data");
(function(d){
define("dojo/NodeList-data", ["dojo"], function(d) {

/*=====
dojo.NodeList.prototype.data = function(key, value){
Expand Down Expand Up @@ -164,4 +163,4 @@ dojo.provide("dojo.NodeList-data");
// return r; // dojo.NodeList|Array|SingleItem
// };

})(dojo);
});
6 changes: 4 additions & 2 deletions NodeList-fx.js
@@ -1,5 +1,4 @@
dojo.provide("dojo.NodeList-fx");
dojo.require("dojo.fx");
define("dojo/NodeList-fx", ["dojo", "dojo/fx"], function(dojo) {

/*=====
dojo["NodeList-fx"] = {
Expand Down Expand Up @@ -205,3 +204,6 @@ dojo.extend(dojo.NodeList, {
return canim.play(delay||0); // dojo.Animation
}
});

return dojo.NodeList;
});
6 changes: 4 additions & 2 deletions NodeList-html.js
@@ -1,5 +1,4 @@
dojo.provide("dojo.NodeList-html");
dojo.require("dojo.html");
define("dojo/NodeList-html", ["dojo", "dojo/html"], function(dojo) {

/*=====
dojo["NodeList-html"] = {
Expand Down Expand Up @@ -36,3 +35,6 @@ dojo.extend(dojo.NodeList, {
return this; // dojo.NodeList
}
});

return dojo.NodeList;
});
5 changes: 4 additions & 1 deletion NodeList-manipulate.js
@@ -1,4 +1,4 @@
dojo.provide("dojo.NodeList-manipulate");
define("dojo/NodeList-manipulate", ["dojo"], function(dojo) {

/*=====
dojo["NodeList-manipulate"] = {
Expand Down Expand Up @@ -718,3 +718,6 @@ dojo["NodeList-manipulate"] = {
dojo.NodeList.prototype.html = dojo.NodeList.prototype.innerHTML;
}
})();

return dojo.NodeList;
});
19 changes: 11 additions & 8 deletions NodeList-traverse.js
@@ -1,4 +1,4 @@
dojo.provide("dojo.NodeList-traverse");
define("dojo/NodeList-traverse", ["dojo"], function(dojo) {

/*=====
dojo["NodeList-traverse"] = {
Expand Down Expand Up @@ -96,21 +96,21 @@ dojo.extend(dojo.NodeList, {
// description:
// .end() can be used on the returned dojo.NodeList to get back to the
// original dojo.NodeList.
// query:
// query:
// a CSS selector.
// root:
// If specified, query is relative to "root" rather than document body.
// returns:
// dojo.NodeList, the closest parent that matches the query, including the current
// node in this dojo.NodeList if it matches the query.
// example:
// example:
// assume a DOM created by this markup:
// | <div class="container">
// | <div class="red">Red One</div>
// | Some Text
// | <div class="blue">Blue One</div>
// | <div class="red">Red Two</div>
// | <div class="blue">Blue Two</div>
// | <div class="red">Red One</div>
// | Some Text
// | <div class="blue">Blue One</div>
// | <div class="red">Red Two</div>
// | <div class="blue">Blue Two</div>
// | </div>
// Running this code:
// | dojo.query(".red").closest(".container");
Expand Down Expand Up @@ -494,3 +494,6 @@ dojo.extend(dojo.NodeList, {
}); //dojo.NodeList
}
});

return dojo.NodeList;
});
9 changes: 6 additions & 3 deletions Stateful.js
@@ -1,4 +1,4 @@
dojo.provide("dojo.Stateful");
define("dojo/Stateful", ["dojo"], function(dojo) {

dojo.declare("dojo.Stateful", null, {
// summary:
Expand Down Expand Up @@ -63,7 +63,7 @@ dojo.declare("dojo.Stateful", null, {
}
var oldValue = this[name];
this[name] = value;
if(this._watchCallbacks && value !== oldValue){
if(this._watchCallbacks){
this._watchCallbacks(name, oldValue, value);
}
return this;
Expand Down Expand Up @@ -120,4 +120,7 @@ dojo.declare("dojo.Stateful", null, {
};
}

});
});

return dojo.Stateful;
});
7 changes: 4 additions & 3 deletions _base/Color.js
@@ -1,6 +1,4 @@
dojo.provide("dojo._base.Color");
dojo.require("dojo._base.array");
dojo.require("dojo._base.lang");
define("dojo/_base/Color", ["dojo", "dojo/_base/array", "dojo/_base/lang"], function(dojo) {

(function(){

Expand Down Expand Up @@ -214,3 +212,6 @@ dojo.require("dojo._base.lang");
return a && d.colorFromArray(a, obj) || d.colorFromRgb(str, obj) || d.colorFromHex(str, obj);
};
})();

return dojo.Color;
});
8 changes: 5 additions & 3 deletions _base/Deferred.js
@@ -1,5 +1,4 @@
dojo.provide("dojo._base.Deferred");
dojo.require("dojo._base.lang");
define("dojo/_base/Deferred", ["dojo", "dojo/_base/lang"], function(dojo) {

(function(){
var mutator = function(){};
Expand Down Expand Up @@ -283,7 +282,7 @@ dojo.require("dojo._base.lang");
deferred.reject(error);
}
}
}
};
freeze(promise);
};
dojo.extend(dojo.Deferred, {
Expand Down Expand Up @@ -330,3 +329,6 @@ dojo.when = function(promiseOrValue, /*Function?*/callback, /*Function?*/errback
}
return callback(promiseOrValue);
};

return dojo.Deferred;
});

0 comments on commit fd62e05

Please sign in to comment.