Skip to content

Commit

Permalink
improved formatting; fixed whitespace; refs #12672; \!strict
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@24374 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
rcgill committed Apr 18, 2011
1 parent 06f051d commit 234b7b5
Show file tree
Hide file tree
Showing 105 changed files with 1,025 additions and 1,029 deletions.
8 changes: 4 additions & 4 deletions AdapterRegistry.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/AdapterRegistry
// summary:
// TODOC:This module defines
// module:
// dojo/AdapterRegistry
// summary:
// TODOC


dojo.AdapterRegistry = function(/*Boolean?*/ returnWrappers){
Expand Down
10 changes: 5 additions & 5 deletions DeferredList.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/DeferredList
// summary:
// TODOC:This module defines
// module:
// dojo/DeferredList
// summary:
// TODOC


dojo.DeferredList = function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*Boolean?*/ fireOnOneErrback, /*Boolean?*/ consumeErrors, /*Function?*/ canceller){
Expand Down Expand Up @@ -55,7 +55,7 @@ dojo.DeferredList = function(/*Array*/ list, /*Boolean?*/ fireOnOneCallback, /*B
if(finished === list.length){
self.resolve(resultList);
}

}
});
};
Expand Down
8 changes: 4 additions & 4 deletions NodeList-data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/NodeList-data
// summary:
// TODOC:This module defines
// module:
// dojo/NodeList-data
// summary:
// TODOC

(function(d){

Expand Down
8 changes: 4 additions & 4 deletions NodeList-fx.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define([".", "./fx"], function(dojo) {
// module:
// dojo/NodeList-fx
// summary:
// TODOC:This module defines
// module:
// dojo/NodeList-fx
// summary:
// TODOC


/*=====
Expand Down
8 changes: 4 additions & 4 deletions NodeList-html.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define([".", "./html"], function(dojo) {
// module:
// dojo/NodeList-html
// summary:
// TODOC:This module defines
// module:
// dojo/NodeList-html
// summary:
// TODOC


/*=====
Expand Down
12 changes: 6 additions & 6 deletions NodeList-manipulate.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/NodeList-manipulate
// summary:
// TODOC:This module defines
// module:
// dojo/NodeList-manipulate
// summary:
// TODOC


/*=====
Expand Down Expand Up @@ -230,7 +230,7 @@ dojo["NodeList-manipulate"] = {
var name = node.nodeName.toUpperCase();
var type = node.type;
var newValue = isArray ? value[index] : value;

if(name == "SELECT"){
var opts = node.options;
for(var i = 0; i < opts.length; i++){
Expand Down Expand Up @@ -592,7 +592,7 @@ dojo["NodeList-manipulate"] = {
//the "this" nodes, then on the clone of html it will contain
//that "this" node, and that would be bad.
var clone = this._cloneNode(html);

//Need to convert the childNodes to an array since wrapAll modifies the
//DOM and can change the live childNodes NodeList.
this._wrap(dojo._toArray(this[i].childNodes), null, this._NodeListCtor).wrapAll(clone);
Expand Down
8 changes: 4 additions & 4 deletions NodeList-traverse.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/NodeList-traverse
// summary:
// TODOC:This module defines
// module:
// dojo/NodeList-traverse
// summary:
// TODOC


/*=====
Expand Down
16 changes: 8 additions & 8 deletions Stateful.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(["."], function(dojo) {
// module:
// dojo/Stateful
// summary:
// TODOC:This module defines
// module:
// dojo/Stateful
// summary:
// TODOC


dojo.declare("dojo.Stateful", null, {
Expand All @@ -20,7 +20,7 @@ dojo.declare("dojo.Stateful", null, {
dojo.mixin(this, mixin);
}
},

get: function(/*String*/name){
// summary:
// Get a property on a Stateful instance.
Expand All @@ -34,7 +34,7 @@ dojo.declare("dojo.Stateful", null, {
// | stateful = new dojo.Stateful({foo: 3});
// | stateful.get("foo") // returns 3
// | stateful.foo // returns 3

return this[name];
},
set: function(/*String*/name, /*Object*/value){
Expand Down Expand Up @@ -89,7 +89,7 @@ dojo.declare("dojo.Stateful", null, {
// the property has been changed. The callback will be called with the |this|
// set to the instance, the first argument as the name of the property, the
// second argument as the old value and the third argument as the new value.

var callbacks = this._watchCallbacks;
if(!callbacks){
var self = this;
Expand Down Expand Up @@ -130,7 +130,7 @@ dojo.declare("dojo.Stateful", null, {
}
};
}

});

return dojo.Stateful;
Expand Down
42 changes: 21 additions & 21 deletions _base/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ define(["./kernel", "./array", "./lang"], function(dojo){
};

// FIXME:
// there's got to be a more space-efficient way to encode or discover
// these!! Use hex?
// there's got to be a more space-efficient way to encode or discover
// these!! Use hex?
dojo.Color.named = {
black: [0,0,0],
silver: [192,192,192],
gray: [128,128,128],
white: [255,255,255],
maroon: [128,0,0],
red: [255,0,0],
purple: [128,0,128],
fuchsia: [255,0,255],
green: [0,128,0],
lime: [0,255,0],
olive: [128,128,0],
yellow: [255,255,0],
navy: [0,0,128],
blue: [0,0,255],
teal: [0,128,128],
aqua: [0,255,255],
transparent: dojo.config.transparentColor || [255,255,255]
black: [0,0,0],
silver: [192,192,192],
gray: [128,128,128],
white: [255,255,255],
maroon: [128,0,0],
red: [255,0,0],
purple: [128,0,128],
fuchsia:[255,0,255],
green: [0,128,0],
lime: [0,255,0],
olive: [128,128,0],
yellow: [255,255,0],
navy: [0,0,128],
blue: [0,0,255],
teal: [0,128,128],
aqua: [0,255,255],
transparent: dojo.config.transparentColor || [255,255,255]
};

dojo.extend(dojo.Color, {
Expand Down Expand Up @@ -82,7 +82,7 @@ define(["./kernel", "./array", "./lang"], function(dojo){
// Returns 3 component array of rgb values
// example:
// | var c = new dojo.Color("#000000");
// | console.log(c.toRgb()); // [0,0,0]
// | console.log(c.toRgb()); // [0,0,0]
var t = this;
return [t.r, t.g, t.b]; // Array
},
Expand All @@ -97,7 +97,7 @@ define(["./kernel", "./array", "./lang"], function(dojo){
// summary:
// Returns a CSS color string in hexadecimal representation
// example:
// | console.log(new dojo.Color([0,0,0]).toHex()); // #000000
// | console.log(new dojo.Color([0,0,0]).toHex()); // #000000
var arr = dojo.map(["r", "g", "b"], function(x){
var s = this[x].toString(16);
return s.length < 2 ? "0" + s : s;
Expand Down
24 changes: 12 additions & 12 deletions _base/Deferred.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define(["./kernel", "./lang"], function(dojo){
// module:
// module:
// dojo/_base/Deferred
// summary:
// summary:
// This module defines dojo.Deferred.

var mutator = function(){};
Expand Down Expand Up @@ -31,7 +31,7 @@ define(["./kernel", "./lang"], function(dojo){
// working with Dojo's promises is the then() method, which follows the
// CommonJS proposed promise API. An example of using a Dojo promise:
//
// | var resultingPromise = someAsyncOperation.then(function(result){
// | var resultingPromise = someAsyncOperation.then(function(result){
// | ... handle result ...
// | },
// | function(error){
Expand Down Expand Up @@ -151,7 +151,7 @@ define(["./kernel", "./lang"], function(dojo){
// handle the asynchronous case.
var result, finished, isError, head, nextListener;
var promise = (this.promise = {});

function complete(value){
if(finished){
throw new Error("This deferred has already been resolved");
Expand Down Expand Up @@ -202,8 +202,8 @@ define(["./kernel", "./lang"], function(dojo){
this.results = [value, null];
complete(value);
};


// calling error will indicate that the promise failed
this.reject = this.errback = function(error){
// summary:
Expand Down Expand Up @@ -250,10 +250,10 @@ define(["./kernel", "./lang"], function(dojo){
//
// example:
// An example of using a CommonJS compliant promise:
// | asyncComputeTheAnswerToEverything().
// | asyncComputeTheAnswerToEverything().
// | then(addTwo).
// | then(printResult, onError);
// | >44
// | >44
//
var returnDeferred = progressCallback == mutator ? this : new dojo.Deferred(promise.cancel);
var listener = {
Expand Down Expand Up @@ -294,11 +294,11 @@ define(["./kernel", "./lang"], function(dojo){
addCallback: function (/*Function*/callback) {
return this.addCallbacks(dojo.hitch.apply(dojo, arguments));
},

addErrback: function (/*Function*/errback) {
return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments));
},

addBoth: function (/*Function*/callback) {
var enclosed = dojo.hitch.apply(dojo, arguments);
return this.addCallbacks(enclosed, enclosed);
Expand All @@ -310,7 +310,7 @@ define(["./kernel", "./lang"], function(dojo){
// summary:
// This provides normalization between normal synchronous values and
// asynchronous promises, so you can interact with them in a common way
// example:
// example:
// | function printFirstAndList(items){
// | dojo.when(findFirst(items), console.log);
// | dojo.when(findLast(items), console.log);
Expand All @@ -328,7 +328,7 @@ define(["./kernel", "./lang"], function(dojo){
// And now all three of his functions can be used sync or async.
// | printFirstAndLast([1,2,3,4]) will work just as well as
// | printFirstAndLast(dojo.xhrGet(...));

if(promiseOrValue && typeof promiseOrValue.then === "function"){
return promiseOrValue.then(callback, errback, progressHandler);
}
Expand Down
6 changes: 3 additions & 3 deletions _base/NodeList.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define(["./kernel", "./lang", "./array", "./connect", "./html"], function(dojo){
// module:
// module:
// dojo/_base/NodeList
// summary:
// summary:
// This module defines dojo.NodeList.

var d = dojo;
Expand Down Expand Up @@ -963,7 +963,7 @@ define(["./kernel", "./lang", "./array", "./connect", "./html"], function(dojo){
"keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove",
"mouseout", "mouseover", "mouseup", "submit"
];

// FIXME: pseudo-doc the above automatically generated on-event functions

// syntactic sugar for DOM events
Expand Down
6 changes: 3 additions & 3 deletions _base/array.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(["./kernel", "./lang"], function(dojo){
// module:
// module:
// dojo/_base/array
// summary:
// summary:
// This module defines the Javascript v1.6 array extensions.

var
var
getParts = function(arr, obj, cb){
return [
(typeof arr == "string") ? arr.split("") : arr,
Expand Down
22 changes: 11 additions & 11 deletions _base/browser.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
define([
"./kernel",
"./sniff",
"./unload",
"./url",
"./window",
"./event",
"./html",
"./NodeList",
"./query",
"./xhr",
"./sniff",
"./unload",
"./url",
"./window",
"./event",
"./html",
"./NodeList",
"./query",
"./xhr",
"./fx"], function(dojo) {
// module:
// module:
// dojo/_base/browser
// summary:
// summary:
// This module causes the browser-only base modules to be loaded.
return dojo;
});
Expand Down
Loading

0 comments on commit 234b7b5

Please sign in to comment.