|
@@ -122,6 +122,7 @@ function EventManager(options, _sources) {
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
var url = source.url;
|
|
var url = source.url;
|
|
|
|
|
+ var eventTransform = source.eventTransform || options.eventTransform;
|
|
|
if (url) {
|
|
if (url) {
|
|
|
var success = source.success;
|
|
var success = source.success;
|
|
|
var error = source.error;
|
|
var error = source.error;
|
|
@@ -144,7 +145,9 @@ function EventManager(options, _sources) {
|
|
|
if ($.isArray(res)) {
|
|
if ($.isArray(res)) {
|
|
|
events = res;
|
|
events = res;
|
|
|
}
|
|
}
|
|
|
- callback(events);
|
|
|
|
|
|
|
+ callback(events && eventTransform
|
|
|
|
|
+ ? $.map(events, eventTransform)
|
|
|
|
|
+ : events);
|
|
|
},
|
|
},
|
|
|
error: function() {
|
|
error: function() {
|
|
|
applyAll(error, this, arguments);
|
|
applyAll(error, this, arguments);
|