summaryrefslogtreecommitdiffstats
path: root/provisioning-listrequests-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:48:48 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:48:48 +0000
commite5f62555031d500d50405ba395e330223ac28e9f (patch)
treef2676b4768a95561597ca746afc400eeaffeed7c /provisioning-listrequests-html.lsp
parentcd46e0528fdf0fd412416c91b40551140b8f2724 (diff)
downloadacf-provisioning-e5f62555031d500d50405ba395e330223ac28e9f.tar.bz2
acf-provisioning-e5f62555031d500d50405ba395e330223ac28e9f.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'provisioning-listrequests-html.lsp')
-rw-r--r--provisioning-listrequests-html.lsp43
1 files changed, 21 insertions, 22 deletions
diff --git a/provisioning-listrequests-html.lsp b/provisioning-listrequests-html.lsp
index d4e24ff..a53e24f 100644
--- a/provisioning-listrequests-html.lsp
+++ b/provisioning-listrequests-html.lsp
@@ -41,7 +41,7 @@ html = require("acf.html")
%>
$(document).ready(function() {
- $("#list").tablesorter({headers: {1:{sorter:'digit'}, 3:{sorter:'ipAddress'}}});
+ $("#list").tablesorter({headers: {1:{sorter:'digit'}, 3:{sorter:'ipAddress'}}, widgets: ['zebra']});
$(".deleterequest").click(function(){ return confirm("Are you sure you want to delete this request?")});
});
</script>
@@ -49,19 +49,18 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"deleterequest", "editdevice"}, session) %>
<h1>Requests</h1>
-<DL>
-<TABLE id="list" class="tablesorter"><THEAD>
- <TR style="background:#eee;font-weight:bold;">
- <TH>Action</TH>
- <TH>Timestamp</TH>
- <TH>MAC Address</TH>
- <TH>IP Address</TH>
- <TH>User Agent</TH>
- </TR>
-</THEAD><TBODY>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>Action</th>
+ <th>Timestamp</th>
+ <th>MAC Address</th>
+ <th>IP Address</th>
+ <th>User Agent</th>
+ </tr>
+</thead><tbody>
<% for k,v in ipairs( view.value ) do %>
- <TR>
- <TD>
+ <tr>
+ <td>
<% if viewlibrary.check_permission("deleterequest") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleterequest?submit=true&mac="..v.mac, label="Delete ", class="deleterequest"} %>
<% end %>
@@ -74,8 +73,8 @@ html = require("acf.html")
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/createdevicefromrequest?submit=true&mac="..v.mac, label="Create "} %>
<% end %>
<% end %>
- </TD>
- <TD>
+ </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+)")
@@ -83,11 +82,11 @@ html = require("acf.html")
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>
- </TR>
+ </td>
+ <td><%= html.html_escape(v.mac) %></td>
+ <td><%= html.html_escape(v.ip) %></td>
+ <td><%= html.html_escape(v.agent) %></td>
+ </tr>
<% end %>
-</TBODY>
-</TABLE>
+</tbody>
+</table>