1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 01:55:55 +00:00

update dojo to 1.7.3

This commit is contained in:
Andrew Dolgov
2012-08-14 18:59:10 +04:00
parent d04f8c826f
commit 1354d17270
1616 changed files with 135064 additions and 97680 deletions

View File

@@ -0,0 +1,32 @@
define("dojo/Evented", ["./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;
});