summaryrefslogtreecommitdiffstats
path: root/opennhrp-show-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:35:45 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:35:45 +0000
commita3b838873fd04b83285fe3f955d012d5a0da71c5 (patch)
tree35816864b6c6021edbf3cc601a353fbfe243461b /opennhrp-show-html.lsp
parent846180f940ae14b8c827b69108083f04bfcb4d8b (diff)
downloadacf-opennhrp-a3b838873fd04b83285fe3f955d012d5a0da71c5.tar.bz2
acf-opennhrp-a3b838873fd04b83285fe3f955d012d5a0da71c5.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'opennhrp-show-html.lsp')
-rw-r--r--opennhrp-show-html.lsp27
1 files changed, 12 insertions, 15 deletions
diff --git a/opennhrp-show-html.lsp b/opennhrp-show-html.lsp
index e168863..0ea960a 100644
--- a/opennhrp-show-html.lsp
+++ b/opennhrp-show-html.lsp
@@ -7,22 +7,21 @@ html = require("acf.html")
viewlibrary.dispatch_component("status")
end %>
-<H2><%= html.html_escape(data.label) %></H2>
-<DL>
+<h2><%= html.html_escape(data.label) %></h2>
<%
htmlviewfunctions.displayitem(data.value.status)
%>
-<DT><%= html.html_escape(data.value.peers_list.label) %></DT>
-<DD>
+<div class='item'><p class='left'><%= html.html_escape(data.value.peers_list.label) %></p>
+<div class='right'>
<%
local found
for intf,addresses in pairs(data.value.peers_list.value) do
found = true
%>
- <TABLE STYLE='margin-bottom:10px;'>
- <TR><TD STYLE='font-weight:bold;border:none;'><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/places/network-server.png' width='16' height='16' alt> <%= html.html_escape(intf) %></TD><TD STYLE='border:none;'></TD></TR>
+ <table style='margin-bottom:10px;'>
+ <tr><td style='font-weight:bold;border:none;'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/places/network-server.png' width='16' height='16' alt> <%= html.html_escape(intf) %></td><td style='border:none;'></td></tr>
<% for i,entries in ipairs(addresses) do
- io.write("<TR STYLE='padding-bottom:10px;'><TD WIDTH='150px' STYLE='font-weight:bold;padding-left:20px;border:none;'><IMG SRC='"..html.html_escape(page_info.wwwprefix..page_info.staticdir).."/tango/16x16/status/")
+ io.write("<tr style='padding-bottom:10px;'><td width='150px' style='font-weight:bold;padding-left:20px;border:none;'><img src='"..html.html_escape(page_info.wwwprefix..page_info.staticdir).."/tango/16x16/status/")
if entries.Type and (entries.Type.value == "negative") then
io.write("network-offline")
@@ -33,22 +32,20 @@ htmlviewfunctions.displayitem(data.value.status)
else
io.write("network-error")
end
- io.write(".png' width='16' height='16' title='" .. html.html_escape(entries.Type.descr) .. "'> " .. html.html_escape(entries["Protocol-Address"].value) .. "</TD><TD STYLE='font-weight:bold;border:none;'></TD></TR>\n")
+ io.write(".png' width='16' height='16' title='" .. html.html_escape(entries.Type.descr) .. "'> " .. html.html_escape(entries["Protocol-Address"].value) .. "</td><td style='font-weight:bold;border:none;'></td></tr>\n")
for j,entry in pairs(entries) do
if j ~= "Protocol-Address" then
- io.write("<TR><TD STYLE='font-weight:bold;padding-left:40px;border:none;'>"..html.html_escape(entry.label).."</TD><TD STYLE='border:none;'>"..html.html_escape(entry.value))
+ io.write("<tr><td style='font-weight:bold;padding-left:40px;border:none;'>"..html.html_escape(entry.label).."</td><td style='border:none;'>"..html.html_escape(entry.value))
if entry.descr then
- io.write(" <I>(" .. html.html_escape(entry.descr) .. ")</I>")
+ io.write(" <i>(" .. html.html_escape(entry.descr) .. ")</i>")
end
- io.write("</TD></TR>\n")
+ io.write("</td></tr>\n")
end
end
end
- io.write("\t\t\t</TABLE>")
+ io.write("\t\t\t</table>")
end
if not found then io.write("No peers found\n") end
%>
-</DD>
-</DL>
-
+</div></div><!-- end .item -->