diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:55:18 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:55:18 +0000 |
commit | b8fd03d42b01372c2f2468b1ae2bc4e4204991a3 (patch) | |
tree | 0f65137113e58250e015f0b183da779d20ee297a | |
parent | 84d85cd53ada9585723cd7bd646b47b27fe5e4a0 (diff) | |
download | acf-squid-b8fd03d42b01372c2f2468b1ae2bc4e4204991a3.tar.bz2 acf-squid-b8fd03d42b01372c2f2468b1ae2bc4e4204991a3.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r-- | squid-digest-html.lsp | 11 | ||||
-rw-r--r-- | squid-listfiles-html.lsp | 47 | ||||
-rw-r--r-- | squid-saccess-html.lsp | 9 |
3 files changed, 43 insertions, 24 deletions
diff --git a/squid-digest-html.lsp b/squid-digest-html.lsp index e8228f6..fd6f3a2 100644 --- a/squid-digest-html.lsp +++ b/squid-digest-html.lsp @@ -4,16 +4,17 @@ <% htmlviewfunctions.displaycommandresults({"enabledigestlist"}, session) %> -<H1>Digest User List Status</H1> -<DL> +<h1>Digest User List Status</h1> <% htmlviewfunctions.displayitem(form.value.status) if form.value.status.errtxt then %> -<dt></dt><dd><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/enabledigestlist") %>"> -<input class="submit" type="submit" name="submit" value="Enable"></form></dd> +<div class='item'><p class='left'></p> +<div class='right'> +<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/enabledigestlist") %>"> +<input class="submit" type="submit" name="submit" value="Enable"></form> +</div></div><!-- end .item --> <% end %> -</DL> <% local pattern = string.gsub(page_info.prefix..page_info.controller, "[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1") diff --git a/squid-listfiles-html.lsp b/squid-listfiles-html.lsp index 90d2fe2..0aea8bf 100644 --- a/squid-listfiles-html.lsp +++ b/squid-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({headers: {0:{sorter: false}}, widgets: ['zebra']}); + }); +</script> + <% htmlviewfunctions.displaycommandresults({"editfile", "deletefile"}, session) %> <% htmlviewfunctions.displaycommandresults({"createfile"}, session, true) %> @@ -10,32 +28,31 @@ html = require("acf.html") viewlibrary.dispatch_component("status") end %> -<H1>Files</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">File</TD> - </TR> +<h1>Files</h1> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>File</th> + </tr> +</thead><tbody> <% for i,file in ipairs(view.value) do %> - <TR> - <TD style="padding-right:20px;white-space:nowrap;"> + <tr> + <td> <% if viewlibrary.check_permission("editfile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editfile?filename="..file.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> <% if viewlibrary.check_permission("deletefile") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletefile?submit=true&filename="..file, label="Delete "} %> <% end %> - </TD> - <TD style="white-space:nowrap;"><%= html.html_escape(file) %></TD> - </TR> + </td> + <td><%= html.html_escape(file) %></td> + </tr> <% end %> -</TABLE> -</DL> +</tbody></table> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createfile") then local createform = viewlibrary.dispatch_component("createfile", nil, true) %> -<H2><%= html.html_escape(createform.label) %></H2> +<h2><%= html.html_escape(createform.label) %></h2> <% createform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/createfile" htmlviewfunctions.displayform(createform) diff --git a/squid-saccess-html.lsp b/squid-saccess-html.lsp index d89aa36..1fb6d35 100644 --- a/squid-saccess-html.lsp +++ b/squid-saccess-html.lsp @@ -13,7 +13,7 @@ html = require("acf.html") domain. </p> -<form action="" method="POST"> +<form action="" method="post"> <h2>Special IP Addresses</h2> <p> If you wish to specify hosts that may access the Internet by IP address, @@ -39,7 +39,8 @@ Enter the domain url below. Regular expressions are allowed. <textarea name="s_domain"><%= html.html_escape( service.config.s_domain ) %></textarea> <h3>Save Changes</h3> -<dl> -<dt>Save changes of the above boxes</dt><dd><input class="submit" type="submit" name="submit" value="save"></dd> -</dl> +<div class='item'><p class='left'>Save changes of the above boxes</p> +<div class='right'> +<input class="submit" type="submit" name="submit" value="save"> +</div></div><!-- end .item --> </form> |