Disable paging in DataTables
[mirror/userdir-ldap-cgi.git] / html / debdb.js
1 $(document).ready(function() {
2         $('#machines thead tr').clone(true).appendTo('#machines thead');
3         $('#machines thead tr:eq(1) th').each(function (i) {
4                 var title = $(this).text();
5                 $(this).html('<input type="text" placeholder="Search \''+title.toLowerCase()+'\'" />');
6                 $('input', this).on( 'keyup change', function () {
7                         if (table.column(i).search() !== this.value) {
8                                 table.column(i).search(this.value).draw();
9                         }
10                 });
11         } );
12
13         var table = $("#machines").DataTable({
14                 orderCellsTop: true,
15                 paging: false,
16                 pageLength: 25,
17                 lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
18         });
19         $(".sort").removeAttr("href")
20 });