summaryrefslogtreecommitdiffstats
path: root/dansguardian-listfiles-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'dansguardian-listfiles-html.lsp')
-rw-r--r--dansguardian-listfiles-html.lsp36
1 files changed, 26 insertions, 10 deletions
diff --git a/dansguardian-listfiles-html.lsp b/dansguardian-listfiles-html.lsp
index aea8ecc..5339110 100644
--- a/dansguardian-listfiles-html.lsp
+++ b/dansguardian-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,18 +28,16 @@ html = require("acf.html")
end %>
<h1>Configuration</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 k,v in ipairs( view.value ) do
io.write( "<tr><td><a href=\"" .. html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) .. "/edit?filename=" .. html.html_escape(v.filename) .. "&redir=" .. html.html_escape(page_info.orig_action) .. "\">" .. html.html_escape(v.filename) .. "</a></td><td>" .. html.html_escape(v.size) .."</td><td>" .. html.html_escape(v.mtime) .."</td></tr>\n" )
end
%>
-</TABLE>
-</DL>
+</tbody></table>