X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=html%2Fdebdb.js;fp=html%2Fdebdb.js;h=936c7c6c34c14a35abe1c2dfa1c998d98b17bd9b;hb=784768441aff9f2ad41ae6ef12c4f6e965c5bcc4;hp=a92b8a6d85601e8d7391905fd7ea2f060ddc2cd7;hpb=b851c15a00b9869fe9dd07e0ab09667139221709;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/html/debdb.js b/html/debdb.js index a92b8a6..936c7c6 100644 --- a/html/debdb.js +++ b/html/debdb.js @@ -1,5 +1,16 @@ $(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, pageLength: 25, lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]