From fc6a57aa80b455be32ae57c7693373b437951ea9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 14 Oct 2011 15:40:58 +0000 Subject: Fixed sorting of listrequests output --- provisioning-listrequests-html.lsp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'provisioning-listrequests-html.lsp') diff --git a/provisioning-listrequests-html.lsp b/provisioning-listrequests-html.lsp index b2c1e6e..39b24f7 100644 --- a/provisioning-listrequests-html.lsp +++ b/provisioning-listrequests-html.lsp @@ -22,7 +22,7 @@ require("viewfunctions") %> $(document).ready(function() { - $("#list").tablesorter(); + $("#list").tablesorter({headers: {1:{sorter:'digit'}, 3:{sorter:'ipAddress'}}}); $(".deleterequest").click(function(){ return confirm("Are you sure you want to delete this request?")}); }); @@ -56,7 +56,15 @@ require("viewfunctions") <% end %> <% end %> - <%= html.html_escape(v.date) %> + + + <% local date = {} + date.year, date.month, date.day, date.hour, date.min, date.sec, remainder = string.match(v.date, "(%d+)%-(%d+)%-(%d+) (%d+):(%d+):(%d+)") + local rem = string.match(v.date, "%.%d+$") + io.write((os.time(date) - 1318000000)..(rem or "")) %> + + <%= html.html_escape(v.date) %> + <%= html.html_escape(v.mac) %> <%= html.html_escape(v.ip) %> <%= html.html_escape(v.agent) %> -- cgit v1.2.3