summaryrefslogtreecommitdiffstats
path: root/ipsectools-listcerts-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'ipsectools-listcerts-html.lsp')
-rw-r--r--ipsectools-listcerts-html.lsp45
1 files changed, 31 insertions, 14 deletions
diff --git a/ipsectools-listcerts-html.lsp b/ipsectools-listcerts-html.lsp
index e7a30dc..465d0e7 100644
--- a/ipsectools-listcerts-html.lsp
+++ b/ipsectools-listcerts-html.lsp
@@ -2,29 +2,46 @@
<% 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({headers: {0:{sorter: false}}, widgets: ['zebra']});
+ });
+</script>
+
<% htmlviewfunctions.displaycommandresults({"deletecert"}, session) %>
<% htmlviewfunctions.displaycommandresults({"uploadcert"}, session, true) %>
-<H1><%= html.html_escape(view.label) %></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">Certificate</TD>
- </TR>
+<h1><%= html.html_escape(view.label) %></h1>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>Action</th>
+ <th>Certificate</th>
+ </tr>
+</thead><tbody>
<% for i,cert in ipairs(view.value) do %>
- <TR>
- <TD style="padding-right:20px;white-space:nowrap;">
+ <tr>
+ <td>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletecert?submit=true&cert="..cert, label="Delete "} %>
<% if not string.find(cert, "%-key") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/viewcert?cert="..cert, label="View "} %>
<% end %>
- </TD>
- <TD style="white-space:nowrap;"><%= html.html_escape(cert) %></TD>
- </TR>
+ </td>
+ <td><%= html.html_escape(cert) %></td>
+ </tr>
<% end %>
-</TABLE></DL>
+</tbody></table>
<% if viewlibrary.dispatch_component and viewlibrary.check_permission("uploadcert") then
viewlibrary.dispatch_component("uploadcert")