From: Adam D. Barratt Date: Fri, 8 Nov 2019 15:12:46 +0000 (+0000) Subject: Replace use of jquery-tablesorter with DataTables X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=commitdiff_plain;h=b851c15a00b9869fe9dd07e0ab09667139221709 Replace use of jquery-tablesorter with DataTables Signed-off-by: Adam D. Barratt --- diff --git a/html/debdb.js b/html/debdb.js index 40336f3..a92b8a6 100644 --- a/html/debdb.js +++ b/html/debdb.js @@ -1,4 +1,8 @@ -$(function() { - $("#machines").tablesorter({widthFixed: true, widgets: ['zebra']}) +$(document).ready(function() { + $("#machines").DataTable({ + orderCellsTop: true, + pageLength: 25, + lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]] + }); $(".sort").removeAttr("href") }); diff --git a/html/template/header.wml b/html/template/header.wml index 2f4aedf..622615d 100644 --- a/html/template/header.wml +++ b/html/template/header.wml @@ -23,8 +23,7 @@ {#style#} {#style#: - - + @@ -33,9 +32,7 @@ :#style#} - - - + diff --git a/machines.cgi b/machines.cgi index e867098..74cacb6 100755 --- a/machines.cgi +++ b/machines.cgi @@ -190,7 +190,7 @@ if ($output{havehostdata}) { } else { # display summary info $hostdetails = "

Summary

\n"; - $hostdetails .= "\n\n"; + $hostdetails .= "
\n\n"; foreach $key (@summaryorder) { if ($sortby ne $key) { $hostdetails .= "";
$summaryattrs{$key}