Skip to content

Commit

Permalink
removing unneeded iffe's and some whitespace for doc reasons, refs #1…
Browse files Browse the repository at this point in the history
…3101 \!strict
  • Loading branch information
phiggins42 committed Jun 2, 2011
1 parent b192285 commit 07b4772
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 49 deletions.
22 changes: 10 additions & 12 deletions dnd/TimedMoveable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ define(["../main", "./Moveable"], function(dojo) {
// summary:
// TODOC

/*=====
dojo.declare("dojo.dnd.__TimedMoveableArgs", [dojo.dnd.__MoveableArgs], {
// timeout: Number
// delay move by this number of ms,
// accumulating position changes during the timeout
timeout: 0
});
=====*/

/*=====
dojo.declare("dojo.dnd.__TimedMoveableArgs", [dojo.dnd.__MoveableArgs], {
// timeout: Number
// delay move by this number of ms,
// accumulating position changes during the timeout
timeout: 0
});
=====*/

(function(){
// precalculate long expressions
var oldOnMove = dojo.dnd.Moveable.prototype.onMove;

Expand Down Expand Up @@ -70,7 +68,7 @@ dojo.declare("dojo.dnd.__TimedMoveableArgs", [dojo.dnd.__MoveableArgs], {
}
}
});
})();

return dojo.dnd.TimedMoveable;
return dojo.dnd.TimedMoveable;

});
13 changes: 6 additions & 7 deletions hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ define(["./_base/kernel", "require", "./_base/connect", "./_base/lang", "./ready
//
// function callback (hashValue){
// // do something based on the hash value.
// }
// }

(function(){
dojo.hash = function(/* String? */ hash, /* Boolean? */ replace){
// summary:
// Gets or sets the hash string.
Expand Down Expand Up @@ -99,7 +98,7 @@ define(["./_base/kernel", "require", "./_base/connect", "./_base/lang", "./ready
// description:
// IE doesn't add changes to the URI's hash into the history unless the hash
// value corresponds to an actual named anchor in the document. To get around
// this IE difference, we use a background IFrame to maintain a back-forward
// this IE difference, we use a background IFrame to maintain a back-forward
// history, by updating the IFrame's query string to correspond to the
// value of the main browser location's hash value.
//
Expand Down Expand Up @@ -131,7 +130,7 @@ define(["./_base/kernel", "require", "./_base/connect", "./_base/lang", "./ready
// case we do nothing because we need to wait for the iframe's
// location to reflect its actual state.
// Transitions: s4, s5
// s5: IEUriMonitor has programmatically changed the location of the
// s5: IEUriMonitor has programmatically changed the location of the
// background iframe, and the iframe's location has caught up with
// reality. In this case we need to transition to s1.
// Transitions: s1
Expand Down Expand Up @@ -208,7 +207,7 @@ define(["./_base/kernel", "require", "./_base/connect", "./_base/lang", "./ready
transitioning = true;
expectedIFrameQuery = hash;
ifr.src = ifrSrc + "?" + expectedIFrameQuery;
ifrOffline = false; //we're updating the iframe src - set offline to false so we can check again on next poll.
ifrOffline = false; //we're updating the iframe src - set offline to false so we can check again on next poll.
setTimeout(dojo.hitch(this,this.pollLocation),0); //yielded transition to s4 while iframe reloads.
return;
}else if(!ifrOffline){
Expand Down Expand Up @@ -237,7 +236,7 @@ define(["./_base/kernel", "require", "./_base/connect", "./_base/lang", "./ready
// else non-supported browser, do nothing.
}
});
})();

return dojo.hash;
return dojo.hash;

});
14 changes: 6 additions & 8 deletions html.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ define(["./main", "./parser"], function(dojo) {
// summary:
// TODOC

dojo.getObject("html", true, dojo);
dojo.getObject("html", true, dojo);

// the parser might be needed..
(function(){ // private scope, sort of a namespace
// the parser might be needed..

// idCounter is incremented with each instantiation to allow asignment of a unique id for tracking, logging purposes
var idCounter = 0,
Expand Down Expand Up @@ -95,14 +94,14 @@ dojo.getObject("html", true, dojo);
parseContent: false,

// parserScope: String
// Flag passed to parser. Root for attribute names to search for. If scopeName is dojo,
// Flag passed to parser. Root for attribute names to search for. If scopeName is dojo,
// will search for data-dojo-type (or dojoType). For backwards compatibility
// reasons defaults to dojo._scopeName (which is "dojo" except when
// multi-version support is used, when it will be something like dojo16, dojo20, etc.)
parserScope: dojo._scopeName,

// startup: Boolean
// Start the child widgets after parsing them. Only obeyed if parseContent is true.
// Start the child widgets after parsing them. Only obeyed if parseContent is true.
startup: true,

// lifecyle methods
Expand Down Expand Up @@ -152,7 +151,7 @@ dojo.getObject("html", true, dojo);

var node = this.node;
if(!node) {
// can't proceed
// can't proceed
throw new Error(this.declaredClass + ": setContent given no node");
}
try{
Expand Down Expand Up @@ -339,7 +338,6 @@ dojo.getObject("html", true, dojo);
return op.set();
}
};
})();

return dojo.html;
return dojo.html;
});
11 changes: 5 additions & 6 deletions io/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(["../main"], function(dojo) {
// summary:
// TODOC

dojo.getObject("io", true, dojo);
dojo.getObject("io", true, dojo);

/*=====
dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
Expand All @@ -18,7 +18,7 @@ dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
// the body of the script that was attached.
// callbackParamName: String
// Deprecated as of Dojo 1.4 in favor of "jsonp", but still supported for
// legacy code. See notes for jsonp property.
// legacy code. See notes for jsonp property.
// jsonp: String
// The URL parameter name that indicates the JSONP callback string.
// For instance, when using Yahoo JSONP calls it is normally,
Expand All @@ -40,7 +40,7 @@ dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
}
});
=====*/
(function(){

var loadEvent = dojo.isIE ? "onreadystatechange" : "load",
readyRegExp = /complete|loaded/;

Expand Down Expand Up @@ -78,7 +78,7 @@ dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
// creates a new <script> tag pointing to the specified URL and
// adds it to the document.
// description:
// Attaches the script element to the DOM. Use this method if you
// Attaches the script element to the DOM. Use this method if you
// just want to attach a script to the DOM and do not care when or
// if it loads.
var doc = (frameDocument || dojo.doc);
Expand Down Expand Up @@ -250,7 +250,6 @@ dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
this.ioArgs.json = json;
}
};
})();

return dojo.io.script;
return dojo.io.script;
});
18 changes: 8 additions & 10 deletions number.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,14 @@ dojo.number.round = function(/*Number*/value, /*Number?*/places, /*Number?*/incr
if((0.9).toFixed() == 0){
// (isIE) toFixed() bug workaround: Rounding fails on IE when most significant digit
// is just after the rounding place and is >=5
(function(){
var round = dojo.number.round;
dojo.number.round = function(v, p, m){
var d = Math.pow(10, -p || 0), a = Math.abs(v);
if(!v || a >= d || a * Math.pow(10, p + 1) < 5){
d = 0;
}
return round(v, p, m) + (v > 0 ? d : -d);
};
})();
var round = dojo.number.round;
dojo.number.round = function(v, p, m){
var d = Math.pow(10, -p || 0), a = Math.abs(v);
if(!v || a >= d || a * Math.pow(10, p + 1) < 5){
d = 0;
}
return round(v, p, m) + (v > 0 ? d : -d);
};
}

/*=====
Expand Down
6 changes: 0 additions & 6 deletions robotx.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ dojo.experimental("dojo.robotx");
// to use: set robotURL in djConfig to the URL you want to load
// dojo.require this file

(function(){

var iframe = null;

var groupStarted=dojo.connect(doh, '_groupStarted', function(){
Expand Down Expand Up @@ -97,9 +95,6 @@ if(iframe['attachEvent'] !== undefined){
dojo.connect(iframe, 'onload', iframeLoad);
}




dojo.mixin(doh.robot,{
_updateDocument: function(){
dojo.setContext(iframe.contentWindow, iframe.contentWindow.document);
Expand Down Expand Up @@ -161,7 +156,6 @@ dojo.mixin(doh.robot,{
}

});
})();

return doh.robot;
});

0 comments on commit 07b4772

Please sign in to comment.