abletech / fullcalendar

Full-sized drag & drop event calendar (jQuery plugin)
http://arshaw.com/fullcalendar/
MIT License
23 stars 13 forks source link

Allow resources to be set via function #13

Closed amsross closed 11 years ago

amsross commented 11 years ago

Allows the resource option to be set in the constructor as a function. The required return value must be an array.

    resources: function() {
        return ['resource 1', 'resource 2'];
    },
    resources: function() {
        $.ajax(...)
        .success( function(data) {
            // some sort of logic
            return preppedData;
        });
    },

This should solve Issue #8.

josephleniston commented 11 years ago

See #8 for example code of how to do this with existing code.