diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-10-14 15:40:58 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-10-14 15:40:58 +0000 |
commit | fc6a57aa80b455be32ae57c7693373b437951ea9 (patch) | |
tree | ff8674920b218a1e0733a1a532bfcbb79cbcc42c /provisioning-listrequests-html.lsp | |
parent | 7e1c984441f56bee8f49709397cc4497892003ef (diff) | |
download | acf-provisioning-fc6a57aa80b455be32ae57c7693373b437951ea9.tar.bz2 acf-provisioning-fc6a57aa80b455be32ae57c7693373b437951ea9.tar.xz |
Fixed sorting of listrequests output
Diffstat (limited to 'provisioning-listrequests-html.lsp')
-rw-r--r-- | provisioning-listrequests-html.lsp | 12 |
1 files changed, 10 insertions, 2 deletions
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?")}); }); </script> @@ -56,7 +56,15 @@ require("viewfunctions") <% end %> <% end %> </TD> - <TD><%= html.html_escape(v.date) %></TD> + <TD> + <span style="display:none"> + <% 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 "")) %> + </span> + <%= html.html_escape(v.date) %> + </TD> <TD><%= html.html_escape(v.mac) %></TD> <TD><%= html.html_escape(v.ip) %></TD> <TD><%= html.html_escape(v.agent) %></TD> |