X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=html%2Fdebdb.js;h=b12772aac1869dc4b0a47907325330f315095ee8;hb=refs%2Fheads%2Ffordsa;hp=a92b8a6d85601e8d7391905fd7ea2f060ddc2cd7;hpb=b851c15a00b9869fe9dd07e0ab09667139221709;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/html/debdb.js b/html/debdb.js index a92b8a6..b12772a 100644 --- a/html/debdb.js +++ b/html/debdb.js @@ -1,6 +1,18 @@ $(document).ready(function() { - $("#machines").DataTable({ + $('#machines thead tr').clone(true).appendTo('#machines thead'); + $('#machines thead tr:eq(1) th').each(function (i) { + var title = $(this).text(); + $(this).html(''); + $('input', this).on( 'keyup change', function () { + if (table.column(i).search() !== this.value) { + table.column(i).search(this.value).draw(); + } + }); + } ); + + var table = $("#machines").DataTable({ orderCellsTop: true, + paging: false, pageLength: 25, lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]] });