taitems / jQuery.Gantt

jQuery Gantt Chart
http://taitems.github.io/jQuery.Gantt/
MIT License
952 stars 304 forks source link

add POST support #211

Closed ccloquet closed 7 years ago

ccloquet commented 7 years ago

I added the ajax POST support with

switch(settings.ajax_type.toLowerCase())
{
    case 'post':
    $.post(settings.source, settings.ajax_params, function (jsData) {
            element.data = jsData;
            core.init(element);
        }, 'json')
    break;
    case 'get':
        $.getJSON(settings.source, function (jsData) {
            element.data = jsData;
            core.init(element);
        });
}

in the core.create function.

Then I added the following defaults settings

ajax_type: "get",    
ajax_params: {},    
usmonster commented 7 years ago

Thanks for the contribution, @ccloquet! I don't think this is a common enough use case to include in the plugin, so I'll close it for now. We can reopen later it if there's more feedback or requests for such behavior.

Thanks again!