diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:19:28 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:19:28 +0000 |
commit | 382699649697c90d3469acbc2f41b59e67e904ce (patch) | |
tree | 1bbae01e0e88242cb533e065c0e7b134bf01678e /lbu-listbackups-html.lsp | |
parent | 22295dc7bd737a5ba33a32e3516ac550602e8585 (diff) | |
download | acf-alpine-conf-382699649697c90d3469acbc2f41b59e67e904ce.tar.bz2 acf-alpine-conf-382699649697c90d3469acbc2f41b59e67e904ce.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'lbu-listbackups-html.lsp')
-rw-r--r-- | lbu-listbackups-html.lsp | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/lbu-listbackups-html.lsp b/lbu-listbackups-html.lsp index 67f2efc..ff10a9f 100644 --- a/lbu-listbackups-html.lsp +++ b/lbu-listbackups-html.lsp @@ -3,23 +3,41 @@ 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() { + $("#backuplist").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); + }); +</script> + <% htmlviewfunctions.displaycommandresults({"selectbackup"}, session) %> -<H1>Backup Archives</H1> -<DL> +<h1>Backup Archives</h1> <% if #view.value == 0 then %> -No backup files +<p>No backup files</p> <% else %> - <table><tr> - <td class="header">Action</td> - <td class="header">File</td> + <table id="backuplist" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>File</th> </tr> + </thead><tbody> <% for i,name in ipairs(view.value) do %> <tr><td> <%= html.link{value="selectbackup?backup="..name.."&redir=config&submit=true", label="Revert "} %> </td> <td><%= html.html_escape(name) %></td></tr> - <% end -end %> -</table> -</DL> + <% end %> + </tbody></table> +<% end %> |