Skip to content

Commit

Permalink
Changes for 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Dec 22, 2011
1 parent c79d998 commit e051bf5
Show file tree
Hide file tree
Showing 29 changed files with 4,518 additions and 4,501 deletions.
64 changes: 32 additions & 32 deletions Evented.js
@@ -1,32 +1,32 @@
define(["./aspect", "./on"], function(aspect, on){
// summary:
// The export of this module is a class that can be used as a mixin or base class,
// to add on() and emit() methods to a class
// for listening for events and emiting events:
// |define(["dojo/Evented"], function(Evented){
// | var EventedWidget = dojo.declare([Evented, dijit._Widget], {...});
// | widget = new EventedWidget();
// | widget.on("open", function(event){
// | ... do something with event
// | });
// |
// | widget.emit("open", {name:"some event", ...});

"use strict";
var after = aspect.after;
function Evented(){
}
Evented.prototype = {
on: function(type, listener){
return on.parse(this, type, listener, function(target, type){
return after(target, 'on' + type, listener, true);
});
},
emit: function(type, event){
var args = [this];
args.push.apply(args, arguments);
return on.emit.apply(on, args);
}
};
return Evented;
});
define(["./aspect", "./on"], function(aspect, on){
// summary:
// The export of this module is a class that can be used as a mixin or base class,
// to add on() and emit() methods to a class
// for listening for events and emiting events:
// |define(["dojo/Evented"], function(Evented){
// | var EventedWidget = dojo.declare([Evented, dijit._Widget], {...});
// | widget = new EventedWidget();
// | widget.on("open", function(event){
// | ... do something with event
// | });
// |
// | widget.emit("open", {name:"some event", ...});

"use strict";
var after = aspect.after;
function Evented(){
}
Evented.prototype = {
on: function(type, listener){
return on.parse(this, type, listener, function(target, type){
return after(target, 'on' + type, listener, true);
});
},
emit: function(type, event){
var args = [this];
args.push.apply(args, arguments);
return on.emit.apply(on, args);
}
};
return Evented;
});
2 changes: 1 addition & 1 deletion _base/fx.js
Expand Up @@ -598,7 +598,7 @@ define(["./kernel", "./lang", "../Evented", "./Color", "./connect", "./sniff", "
}
this.curve = new PropLine(pm);
});
connect.connect(anim, "onAnimate", lang.hitch(dojo, "style", anim.node));
connect.connect(anim, "onAnimate", lang.hitch(style, "set", anim.node));
return anim; // dojo.Animation
};

Expand Down
2 changes: 1 addition & 1 deletion _base/html.js
Expand Up @@ -14,7 +14,7 @@ define(["./kernel", "../dom", "../dom-style", "../dom-attr", "../dom-prop", "../
dojo.setAttr = attr.set;
dojo.hasAttr = attr.has;
dojo.removeAttr = attr.remove;
dojo.getPropNode = attr.getNodeProp;
dojo.getNodeProp = attr.getNodeProp;

dojo.attr = function(node, name, value){
// summary:
Expand Down
4 changes: 2 additions & 2 deletions _base/kernel.js
Expand Up @@ -93,9 +93,9 @@ define(["../has", "./config", "require", "module"], function(has, config, requir
this.revision = 0;
}
=====*/
var rev = "$Rev: 23930 $".match(/\d+/);
var rev = "$Rev: 27407 $".match(/\d+/);
dojo.version = {
major: 1, minor: 7, patch: 0, flag: "dev",
major: 1, minor: 7, patch: 1, flag: "",
revision: rev ? +rev[0] : NaN,
toString: function(){
var v = dojo.version;
Expand Down
24 changes: 3 additions & 21 deletions _base/loader.js
Expand Up @@ -12,26 +12,6 @@ define(["./kernel", "../has", "require", "module", "./json", "./lang", "./array"
return 0;
}

var isXdUrl = function(){ return 0;};
if(has("dom")){
var locationProtocol = location.protocol,
locationHost = location.host,
fileProtocol = !locationHost;
isXdUrl = function(url){
if(fileProtocol || /^\./.test(url)){
// begins with a dot is always relative to page URL; therefore not xdomain
return false;
}
if(/^\/\//.test(url)){
// for v1.6- backcompat, url starting with // indicates xdomain
return true;
}
// get protocol and host
var match = url.match(/^([^\/\:]+\:)\/\/([^\/]+)/);
return match && (match[1] != locationProtocol || match[2] != locationHost);
};
}

var makeErrorToken = function(id){
return {src:thisModule.id, id:id};
},
Expand Down Expand Up @@ -343,7 +323,7 @@ define(["./kernel", "../has", "require", "module", "./json", "./lang", "./array"
"define(" + dojo.toJson(names.concat(["dojo/loadInit!"+id])) + ", function(" + names.join(",") + "){\n" + extractResult[0] + "});";
},

loaderVars = require.initSyncLoader(dojoRequirePlugin, checkDojoRequirePlugin, transformToAmd, isXdUrl),
loaderVars = require.initSyncLoader(dojoRequirePlugin, checkDojoRequirePlugin, transformToAmd),

sync =
loaderVars.sync,
Expand Down Expand Up @@ -525,6 +505,8 @@ define(["./kernel", "../has", "require", "module", "./json", "./lang", "./array"
// if the module is a legacy module, this is the same as executing
// but if the module is an AMD module, this means defining, not executing
injectModule(module);
// the inject may have changed the mode
currentMode = getLegacyMode();

// in sync mode to dojo.require is to execute
if(module.executed!==executed && module.injected===arrived){
Expand Down

0 comments on commit e051bf5

Please sign in to comment.