summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:54:20 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:54:20 +0000
commit2b3e28518b6c5488412fde37fb8e6fba49591937 (patch)
tree2e5bf3a77f79f7d27bed977736d1cd245ef7e9ab
parent9cf7dbead8f602c77541889bef4bc8e629e76853 (diff)
downloadacf-shorewall-2b3e28518b6c5488412fde37fb8e6fba49591937.tar.bz2
acf-shorewall-2b3e28518b6c5488412fde37fb8e6fba49591937.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r--shorewall-details-html.lsp8
-rw-r--r--shorewall-listfiles-html.lsp47
2 files changed, 34 insertions, 21 deletions
diff --git a/shorewall-details-html.lsp b/shorewall-details-html.lsp
index 4b04fce..e3fca74 100644
--- a/shorewall-details-html.lsp
+++ b/shorewall-details-html.lsp
@@ -6,9 +6,7 @@ html = require("acf.html")
viewlibrary.dispatch_component("status")
end %>
-<H2><%= html.html_escape(data.label) %></H2>
-<DL>
-<PRE>
+<h2><%= html.html_escape(data.label) %></h2>
+<pre>
<%= html.html_escape(data.value) %>
-</PRE>
-</DL>
+</pre>
diff --git a/shorewall-listfiles-html.lsp b/shorewall-listfiles-html.lsp
index 0183582..21422ff 100644
--- a/shorewall-listfiles-html.lsp
+++ b/shorewall-listfiles-html.lsp
@@ -3,6 +3,24 @@ 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({"edit"}, session) %>
<% if viewlibrary and viewlibrary.dispatch_component then
@@ -10,21 +28,18 @@ html = require("acf.html")
end %>
<h1><%= html.html_escape(data.label) %></h1>
-<DL>
-<TABLE>
- <TR style="background:#eee;font-weight:bold;">
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">File</TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Size</TD>
- <TD style="white-space:nowrap;text-align:left;" class="header">Last Modified</TD>
- </TR>
-
-
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>File</th>
+ <th>Size</th>
+ <th>Last Modified</th>
+ </tr>
+</thead><tbody>
<% for i,file in ipairs(data.value) do %>
- <TR>
- <TD style="padding-right:20px;white-space:nowrap;"><%= html.link{value = "edit?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></TD>
- <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(file.filesize) %></TD>
- <TD style="white-space:nowrap;" width="90%"><%= html.html_escape(file.mtime) %></TD>
- </TR>
+ <tr>
+ <td><%= html.link{value = "edit?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></td>
+ <td><%= html.html_escape(file.filesize) %></td>
+ <td><%= html.html_escape(file.mtime) %></td>
+ </tr>
<% end %>
-</TABLE>
-</DL>
+</tbody></table>