diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:24:00 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:24:00 +0000 |
commit | 86b646ce7823f614db0884a330e82a45d6d85ffa (patch) | |
tree | 2ab411720fe5a6295eaf59c6013eec64c01c5584 /dansguardian-listfiles-html.lsp | |
parent | 965ed74b1a828f39133c0c2a21101b67909deef5 (diff) | |
download | acf-dansguardian-86b646ce7823f614db0884a330e82a45d6d85ffa.tar.bz2 acf-dansguardian-86b646ce7823f614db0884a330e82a45d6d85ffa.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'dansguardian-listfiles-html.lsp')
-rw-r--r-- | dansguardian-listfiles-html.lsp | 36 |
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> |