onXLE with multiple sources

Hi.

We’re loading multiple data sources into our calendar. Two of them come from iCal feeds. We want to manipulate the data before it’s displayed on the calendar (change the color, add a resource). Typically we’d use onXLE to loop through the data to make the changes. However with multiple data sources, there doesn’t appear to be a way to identify which feed is being loaded when onXLE is triggered.

In other words, I’d like to do something like this:

scheduler.attachEvent("onXLE", function (data){
    if ((data.url)=='this') {
          //loop records to change data
    }
});

However, it doesn’t appear that any data is passed with the onXLE event.

Can you tell me if this is possible, or if there is another method to accomplish this?

Thank you.

Hi,
currently, an onXLE event provides no way to tell what data has been loaded.
Probably you could try loading raw data using custom ajax request, manually preprocess it and then load into calendar using scheduler.parse

In order to parse event object from the raw ajax response, you could use the internal parser methods - scheduler.ical.parse, scheduler.json.parse
E.g.

$.ajax({ url: "icalfeed", complete: function(xhr){ var events = scheduler.ical.parse(xhr.responseText); //... preprocess events // load events into the scheduler scheduler.parse(events); } });