|
|
|
@ -62,7 +62,11 @@
|
|
|
|
|
_initListeners: function () { |
|
|
|
|
var self = this; |
|
|
|
|
if (this.options.listeners != null) { |
|
|
|
|
_.each(this.options.listeners, function (lis) { |
|
|
|
|
_.each(this.options.listeners, function (lis, eventName) { |
|
|
|
|
if (_.isFunction(lis)) { |
|
|
|
|
self.on(eventName, _.bind(lis, self)); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
(lis.target ? lis.target : self)[lis.once ? "once" : "on"] |
|
|
|
|
(lis.eventName, _.bind(lis.action, self)); |
|
|
|
|
}); |
|
|
|
|