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

        var callBack = function() {
        };

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

        jQ('#convertInventoryFilter-status').change(function(){
            datalist.draw();
        });

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