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

        var callBack = function() {
        };

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

        jQ('#status, #non_inventory').bind('change', function () {
            item.dataList.draw();
        });


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