Skip to content
Snippets Groups Projects
inventory.js 538 B
Newer Older
Benjamin Bertrand's avatar
Benjamin Bertrand committed
$(document).ready(function() {

  var items_table =  $("#items_table").DataTable({
    "ajax": function(data, callback, settings) {
      $.getJSON(
        $SCRIPT_ROOT + "/_retrieve_items",
        function(json) {
          callback(json);
        });
    },
    "order": [[4, 'desc']],
    "pagingType": "full_numbers",
    "pageLength": 20,
    "lengthMenu": [[20, 50, 100, -1], [20, 50, 100, "All"]],
    "columnDefs": [
      {
        "targets": [0],
        "visible": false,
        "searchable": false
      }
    ]
  });

});