diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:55:41 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:55:41 +0000 |
commit | 02f08e3420245cb727783f5abe460d336f135459 (patch) | |
tree | 1630a5c11156182687f89627943aafd33ea02dc2 /tcpproxy-listsmtpentries-html.lsp | |
parent | 3994357e9ab748f5fbf6cbca682e5e3ce3be8001 (diff) | |
download | acf-tcpproxy-02f08e3420245cb727783f5abe460d336f135459.tar.bz2 acf-tcpproxy-02f08e3420245cb727783f5abe460d336f135459.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'tcpproxy-listsmtpentries-html.lsp')
-rw-r--r-- | tcpproxy-listsmtpentries-html.lsp | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/tcpproxy-listsmtpentries-html.lsp b/tcpproxy-listsmtpentries-html.lsp index 6fffd1b..228aa76 100644 --- a/tcpproxy-listsmtpentries-html.lsp +++ b/tcpproxy-listsmtpentries-html.lsp @@ -3,32 +3,48 @@ 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() { + $("#listentries").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); + }); +</script> + <% htmlviewfunctions.displaycommandresults({"editsmtpentry", "delsmtpentry"}, session) %> -<H1>Interface Entries</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="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Interface</TD> - <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">IP Address</TD> - <TD style="white-space:nowrap;text-align:left;" class="header">Command Entry</TD> - </TR> +<h1>Interface Entries</h1> +<table id="listentries" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Interface</th> + <th>IP Address</th> + <th>Command Entry</th> + </tr> +</thead><tbody> <% for i,interface in ipairs(view.value) do %> - <TR> - <TD style="padding-right:20px;white-space:nowrap;"> + <tr> + <td> <% if viewlibrary.check_permission("editsmtpentry") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpentry?ipaddr="..(interface.ipaddr or interface.interface).."&redir="..page_info.orig_action, label="Edit "} %> <% end %> <% if viewlibrary.check_permission("delsmtpentry") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpentry?submit=true&ipaddr="..(interface.ipaddr or interface.interface), label="Delete "} %> <% end %> - </TD> - <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(interface.interface) %></TD> - <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(interface.ipaddr) %></TD> - <TD style="white-space:nowrap;"><%= html.html_escape(interface.cmd) %></TD> - </TR> + </td> + <td><%= html.html_escape(interface.interface) %></td> + <td><%= html.html_escape(interface.ipaddr) %></td> + <td><%= html.html_escape(interface.cmd) %></td> + </tr> <% end %> -</TABLE> - -</DL> +</tbody></table> |