summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:47:18 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:47:18 +0000
commit9a4319f209cb997baf0b5e2b2cd05ee548ecc48b (patch)
tree224dcec27ef2b0772e81c88864cd53a3df346c89
parentee94bc70a94f7ae85c5a5bd167258a55b15b1646 (diff)
downloadacf-ppp-9a4319f209cb997baf0b5e2b2cd05ee548ecc48b.tar.bz2
acf-ppp-9a4319f209cb997baf0b5e2b2cd05ee548ecc48b.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r--ppp-listpeers-html.lsp42
1 files changed, 30 insertions, 12 deletions
diff --git a/ppp-listpeers-html.lsp b/ppp-listpeers-html.lsp
index 19e0d0b..75a58aa 100644
--- a/ppp-listpeers-html.lsp
+++ b/ppp-listpeers-html.lsp
@@ -3,29 +3,47 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
+<script type="text/javascript">
+ if (typeof jQuery == 'undefined') {
+ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
+ }
+</script>
+
+<script type="text/javascript">
+ if (typeof $.tablesorter == 'undefined') {
+ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
+ }
+</script>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("#list").tablesorter({widgets: ['zebra']});
+ });
+</script>
+
<% htmlviewfunctions.displaycommandresults({"deletepeer", "editpeer"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createpeer"}, session, true) %>
<h1>Peer Files</h1>
-<DL><TABLE>
- <TR style="background:#eee;font-weight:bold;">
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
- <TD style="white-space:nowrap;text-align:left;" class="header">Peer File</TD>
- </TR>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>Action</th>
+ <th>Peer File</th>
+ </tr>
+</thead><tbody>
<% for i,file in ipairs(form.value) do %>
- <TR>
- <TD style="padding-right:20px;white-space:nowrap;">
+ <tr>
+ <td>
<%
if viewlibrary.check_permission("deletepeer") then io.write(html.link{value = "deletepeer?submit=true&name=" .. file, label="Delete " }) end
if viewlibrary.check_permission("editpeer") then io.write(html.link{value = "editpeer?name=" .. file.."&redir="..page_info.orig_action, label="Edit " }) end
%>
- </TD>
- <TD style="white-space:nowrap;" width="90%"><%= html.html_escape(string.gsub(file, "^.*/", "")) %></TD>
- </TR>
+ </td>
+ <td><%= html.html_escape(string.gsub(file, "^.*/", "")) %></td>
+ </tr>
<% end %>
-</TABLE></DL>
+</tbody></table>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createpeer") then
viewlibrary.dispatch_component("createpeer")
end %>
-