diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:45:29 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:45:29 +0000 |
commit | 96491cb4728bdc311be15e9e58eae36c19657406 (patch) | |
tree | 30c9714a475846872eacb8d6465cb3f0d23c1018 | |
parent | 3ae274ba401c1a67a0041902ee0baeb5ab17aafb (diff) | |
download | acf-postfix-96491cb4728bdc311be15e9e58eae36c19657406.tar.bz2 acf-postfix-96491cb4728bdc311be15e9e58eae36c19657406.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r-- | postfix-details-html.lsp | 4 | ||||
-rw-r--r-- | postfix-listfiles-html.lsp | 60 | ||||
-rw-r--r-- | postfix-listqueue-html.lsp | 10 |
3 files changed, 45 insertions, 29 deletions
diff --git a/postfix-details-html.lsp b/postfix-details-html.lsp index 778a3bf..78db808 100644 --- a/postfix-details-html.lsp +++ b/postfix-details-html.lsp @@ -5,9 +5,7 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -<H2><%= html.html_escape(data.label) %></H2> -<DL> +<h2><%= html.html_escape(data.label) %></h2> <% htmlviewfunctions.displayitem(data) %> -</DL> diff --git a/postfix-listfiles-html.lsp b/postfix-listfiles-html.lsp index 8127202..43c5914 100644 --- a/postfix-listfiles-html.lsp +++ b/postfix-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({"deletefile", "expert", "rebuilddatabases"}, session) %> <% htmlviewfunctions.displaycommandresults({"createfile"}, session, true) %> @@ -11,33 +29,33 @@ html = require("acf.html") end %> <h1><%= html.html_escape(data.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="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>Action</th> + <th>File</th> + <th>Size</th> + <th>Last Modified</th> + </tr> +</thead><tbody> <% for i,file in ipairs(data.value) do %> - <TR> - <TD style="padding-right:20px;white-space:nowrap;"> + <tr> + <td> <%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label="Edit "} %> <% if file.filename ~= "/etc/mail/aliases" then %><%= html.link{value = "deletefile?submit=true&filename=" .. file.filename, label="Delete "} %><% end %> - </TD> - <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(file.filename) %></TD> - <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(file.filesize) %></TD> - <TD style="white-space:nowrap;" width="90%"><%= html.html_escape(file.mtime) %></TD> - </TR> + </td> + <td><%= html.html_escape(file.filename) %></td> + <td><%= html.html_escape(file.filesize) %></td> + <td><%= html.html_escape(file.mtime) %></td> + </tr> <% end %> -</TABLE> +</tbody></table> + <form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/rebuilddatabases") %>"> -<DT>Rebuild Databases</DT> -<DD><input class="submit" type="submit" name="submit" value="Rebuild"></DD> +<div class='item'><p class='left'>Rebuild Databases</p> +<div class='right'> +<input class="submit" type="submit" name="submit" value="Rebuild"> +</div></div><!-- end .item --> </form> -</DL> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createfile") then local newfileform = viewlibrary.dispatch_component("createfile", nil, true) %> diff --git a/postfix-listqueue-html.lsp b/postfix-listqueue-html.lsp index 6e09ee0..c85c2c2 100644 --- a/postfix-listqueue-html.lsp +++ b/postfix-listqueue-html.lsp @@ -5,13 +5,13 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"flushqueue"}, session) %> -<H1><%= html.html_escape(data.label) %></H2> -<DL> +<h1><%= html.html_escape(data.label) %></h2> <pre> <%= html.html_escape(data.value) %> </pre> <form action="flushqueue"> -<DT>Flush Queue</DT> -<DD><input class="submit" type="submit" name="submit" value="Flush"></DD> +<div class='item'><p class='left'>Flush Queue</p> +<div class='right'> +<input class="submit" type="submit" name="submit" value="Flush"> +</div></div><!-- end .item --> </form> -</DL> |