var schedule = {
    settings: {
        ajaxUrl: ''
    },
    init: function() {
        schedule.initDataTable();
    },
    initDataTable: function() {

        var callBack = function() {
        };

        var dataList = jQ('#schedule-datalist').DataTable({
            'processing': true,
            'serverSide': true,
            'ajax': {
                'url': schedule.settings.ajaxUrl,
                'data': function(d) {
                    d.url = global.settings.url;
                    d.type = jQ('#schedule-filter-type').val();
                }
            },
            'deferRender': true,
            'columnDefs': [
                { 'orderable': false, 'targets': 10 },
                { 'searchable': false, 'targets': 10 }
            ],
            'order': [[4, 'desc']],
            drawCallback: function() {
                callBack();
            },
            responsive: {
                details: {
                    renderer: function( api,rowIdx ) {
                        return global.dataTableResponsiveCallBack(api, rowIdx, callBack);
                    }
                }
            }
        });

        jQ('#schedule-filter-type').on('change', function(){
            dataList.draw();
        });

        jQ('.content-container').removeClass('has-loading');
        jQ('.content-container-content').removeClass('hide');
    }
};