summaryrefslogtreecommitdiffstats
path: root/rc-status-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:16:54 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:16:54 +0000
commitdb50c4a219e0199bebd8a9fd70a87a4d3c6a123e (patch)
tree30a7dd126382030425767f00948ce3f19e3c8be4 /rc-status-html.lsp
parent0abf04fdfd4e0c26c6e43007d188d2b6c75c696e (diff)
downloadacf-alpine-baselayout-db50c4a219e0199bebd8a9fd70a87a4d3c6a123e.tar.bz2
acf-alpine-baselayout-db50c4a219e0199bebd8a9fd70a87a4d3c6a123e.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'rc-status-html.lsp')
-rw-r--r--rc-status-html.lsp45
1 files changed, 31 insertions, 14 deletions
diff --git a/rc-status-html.lsp b/rc-status-html.lsp
index ef9173f..9e8d2b8 100644
--- a/rc-status-html.lsp
+++ b/rc-status-html.lsp
@@ -2,12 +2,29 @@
<% 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", "startstop"}, session) %>
-<H1><%= html.html_escape(view.label) %></H1>
-<DL>
-<TABLE>
-<TR>
+<h1><%= html.html_escape(view.label) %></h1>
+<table id="list" class="tablesorter"><thead>
+<tr>
<% if viewlibrary.check_permission("edit") then %>
<th>Action</th>
<% end %>
@@ -15,23 +32,23 @@
<th>Status</th>
<th>Runlevels</th>
<th>Description</th>
-</TR>
+</tr>
+</thead><tbody>
<%
for i,item in ipairs(view.value) do %>
- <TR>
+ <tr>
<% if viewlibrary.check_permission("edit") then %>
- <TD><%= html.link{value="edit?servicename="..item.servicename.."&redir="..page_info.orig_action, label="Edit " } %>
+ <td><%= html.link{value="edit?servicename="..item.servicename.."&redir="..page_info.orig_action, label="Edit " } %>
<% end %>
<% if viewlibrary.check_permission("startstop") and item.actions then
for i,a in ipairs(item.actions) do
print(html.link{value="startstop?servicename="..item.servicename.."&redir=status&submit=true&action="..a, label=a:gsub("^%l", string.upper).." " })
end
end %>
- <TD><%= html.html_escape(item.servicename) %></TD>
- <TD><%= html.html_escape(item.status) %></TD>
- <TD><%= html.html_escape(table.concat(item.runlevels, ", ")) %>&nbsp;</TD>
- <TD><%= html.html_escape(item.description) %></TD>
- </TR>
+ <td><%= html.html_escape(item.servicename) %></td>
+ <td><%= html.html_escape(item.status) %></td>
+ <td><%= html.html_escape(table.concat(item.runlevels, ", ")) %>&nbsp;</td>
+ <td><%= html.html_escape(item.description) %></td>
+ </tr>
<% end %>
-</TABLE>
-</DL>
+</tbody></table>