diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:48:48 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:48:48 +0000 |
commit | e5f62555031d500d50405ba395e330223ac28e9f (patch) | |
tree | f2676b4768a95561597ca746afc400eeaffeed7c | |
parent | cd46e0528fdf0fd412416c91b40551140b8f2724 (diff) | |
download | acf-provisioning-e5f62555031d500d50405ba395e330223ac28e9f.tar.bz2 acf-provisioning-e5f62555031d500d50405ba395e330223ac28e9f.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r-- | provisioning-dumpdatabase-html.lsp | 6 | ||||
-rw-r--r-- | provisioning-editdevice-html.lsp | 2 | ||||
-rw-r--r-- | provisioning-editdeviceparams-html.lsp | 2 | ||||
-rw-r--r-- | provisioning-editparam-html.lsp | 12 | ||||
-rw-r--r-- | provisioning-edittemplate-html.lsp | 12 | ||||
-rw-r--r-- | provisioning-getclassvalues-html.lsp | 12 | ||||
-rw-r--r-- | provisioning-listclasses-html.lsp | 38 | ||||
-rw-r--r-- | provisioning-listclassgroups-html.lsp | 38 | ||||
-rw-r--r-- | provisioning-listdevices-html.lsp | 34 | ||||
-rw-r--r-- | provisioning-listfiles-html.lsp | 34 | ||||
-rw-r--r-- | provisioning-listgroups-html.lsp | 38 | ||||
-rw-r--r-- | provisioning-listparams-html.lsp | 42 | ||||
-rw-r--r-- | provisioning-listrequests-html.lsp | 43 | ||||
-rw-r--r-- | provisioning-listtemplates-html.lsp | 46 | ||||
-rw-r--r-- | provisioning-searchbyextension-html.lsp | 18 | ||||
-rw-r--r-- | provisioning-searchbymac-html.lsp | 16 | ||||
-rw-r--r-- | provisioning-searchdevices-html.lsp | 15 |
17 files changed, 209 insertions, 199 deletions
diff --git a/provisioning-dumpdatabase-html.lsp b/provisioning-dumpdatabase-html.lsp index e5f182a..cb7b50b 100644 --- a/provisioning-dumpdatabase-html.lsp +++ b/provisioning-dumpdatabase-html.lsp @@ -4,15 +4,13 @@ html = require("acf.html") %> <% if form.value.data then %> -<H1><%= html.html_escape(form.value.data.label) %></H1> -<DL> +<h1><%= html.html_escape(form.value.data.label) %></h1> <textarea name="filecontent"> <%= html.html_escape(form.value.data.value) %> </textarea> -</DL> <% end %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% form.value.data = nil htmlviewfunctions.displayform(form, nil, nil, page_info, 2) diff --git a/provisioning-editdevice-html.lsp b/provisioning-editdevice-html.lsp index 653758a..cfb444c 100644 --- a/provisioning-editdevice-html.lsp +++ b/provisioning-editdevice-html.lsp @@ -43,7 +43,7 @@ html = require("acf.html") <% end %> <% end %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% if page_info.action == "editdevice" then form.value.device_id.readonly = "true" diff --git a/provisioning-editdeviceparams-html.lsp b/provisioning-editdeviceparams-html.lsp index ef9a1ce..c3e9038 100644 --- a/provisioning-editdeviceparams-html.lsp +++ b/provisioning-editdeviceparams-html.lsp @@ -51,7 +51,7 @@ end <% end %> <% end %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% form.value.device_id.readonly = "true" if not form.errtxt and form.value.groupdefaultoverride.value then diff --git a/provisioning-editparam-html.lsp b/provisioning-editparam-html.lsp index 574cd31..e86faa2 100644 --- a/provisioning-editparam-html.lsp +++ b/provisioning-editparam-html.lsp @@ -3,14 +3,16 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% htmlviewfunctions.displayform(form, nil, nil, page_info, 2) %> -<H2>Options</H2> -<dl> -<dt></dt><dd><form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/editoptions" method="POST"> +<h2>Options</h2> +<div class='item'><p class='left'></p> +<div class='right'> +<form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/editoptions" method="post"> <input type="hidden" name="param_id" value="<%= form.value.param_id.value %>"> <input type="submit" class="submit" value="Edit Options"> -</form></dd></dl> +</form> +</div></div><!-- end .item --> diff --git a/provisioning-edittemplate-html.lsp b/provisioning-edittemplate-html.lsp index d7f44e7..9415968 100644 --- a/provisioning-edittemplate-html.lsp +++ b/provisioning-edittemplate-html.lsp @@ -2,8 +2,8 @@ <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> -<H1><%= html.html_escape(form.label) %></H1> -<H2>Template Details</H2> +<h1><%= html.html_escape(form.label) %></h1> +<h2>Template Details</h2> <% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %> <% htmlviewfunctions.displayformstart(form) %> <% @@ -14,14 +14,12 @@ htmlviewfunctions.displayformitem(form.value.filename, "filename") htmlviewfunctions.displayformitem(form.value.label, "label") htmlviewfunctions.displayformitem(form.value.seq, "seq") %> -</DL> -<H2>File Content</H2> -<DL> +<h2>File Content</h2> <textarea name="filecontent"> <%= html.html_escape(form.value.filecontent.value) %> </textarea> -<% if form.value.filecontent.errtxt then %><P CLASS='error'><%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "<BR>") %></P><% end %> -<% if form.value.filecontent.descr then %><P CLASS='descr'><%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "<BR>") %></P><% end %> +<% if form.value.filecontent.errtxt then %><p class='error'><%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "<br/>") %></p><% end %> +<% if form.value.filecontent.descr then %><p class='descr'><%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "<br/>") %></p><% end %> <% htmlviewfunctions.displayformend(form) %> diff --git a/provisioning-getclassvalues-html.lsp b/provisioning-getclassvalues-html.lsp index cf39cfa..616137e 100644 --- a/provisioning-getclassvalues-html.lsp +++ b/provisioning-getclassvalues-html.lsp @@ -4,23 +4,21 @@ html = require("acf.html") %> <% if form.value.values then %> -<H1>Class</H1> - <DL> -<% if form.errtxt then io.write("<P CLASS='error'>" .. string.gsub(html.html_escape(form.errtxt), "\n", "<BR>") .. "</P>\n") end %> +<h1>Class</h1> +<% if form.errtxt then io.write("<p class='error'>" .. string.gsub(html.html_escape(form.errtxt), "\n", "<br/>") .. "</p>\n") end %> <% htmlviewfunctions.displayitem(form.value.class_id) %> <% htmlviewfunctions.displayitem(form.value.label) %> -<H2>Parameter Values</H2> +<h2>Parameter Values</h2> <% session = require("session") val = session.serialize("values", form.value.values.value) val = string.gsub(val, "[^\n]*%{%}\n", "") print("<pre>"..val.."</pre>") form.value.values = nil +end %> - </DL> -<% end %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% form.value.values = nil form.value.label = nil diff --git a/provisioning-listclasses-html.lsp b/provisioning-listclasses-html.lsp index e1b9538..59933d3 100644 --- a/provisioning-listclasses-html.lsp +++ b/provisioning-listclasses-html.lsp @@ -25,7 +25,7 @@ html = require("acf.html") end %> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deleteclass").click(function(){ return confirm("Are you sure you want to delete this class?")}); }); </script> @@ -34,18 +34,17 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"createclass"}, session, true) %> <h1>Classes</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Class Group</TH> - <TH>Label</TH> - <TH>Sequence</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Class Group</th> + <th>Label</th> + <th>Sequence</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deleteclass") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclass?submit=true&class_id="..v.class_id, label="Delete ", class="deleteclass"} %> <% end %> @@ -55,14 +54,14 @@ html = require("acf.html") <% if viewlibrary.check_permission("getclassvalues") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/getclassvalues?submit=true&class_id="..v.class_id, label="View "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.group) %></TD> - <TD><%= html.html_escape(v.label) %></TD> - <TD><%= html.html_escape(v.seq) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.group) %></td> + <td><%= html.html_escape(v.label) %></td> + <td><%= html.html_escape(v.seq) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -74,4 +73,3 @@ html = require("acf.html") <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createclass") then viewlibrary.dispatch_component("createclass") end %> -</DL> diff --git a/provisioning-listclassgroups-html.lsp b/provisioning-listclassgroups-html.lsp index 4ec7605..8a23ad4 100644 --- a/provisioning-listclassgroups-html.lsp +++ b/provisioning-listclassgroups-html.lsp @@ -17,7 +17,7 @@ html = require("acf.html") <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deletegroup").click(function(){ return confirm("Are you sure you want to delete this group?")}); }); </script> @@ -26,32 +26,31 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"createclassgroup"}, session, true) %> <h1>Class Groups</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Name</TH> - <TH>Label</TH> - <TH>Sequence</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Name</th> + <th>Label</th> + <th>Sequence</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deleteclassgroup") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclassgroup?submit=true&class_group_id="..v.class_group_id, label="Delete ", class="deletegroup"} %> <% end %> <% if viewlibrary.check_permission("editclassgroup") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editclassgroup?class_group_id="..v.class_group_id.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.name) %></TD> - <TD><%= html.html_escape(v.label) %></TD> - <TD><%= html.html_escape(v.seq) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.name) %></td> + <td><%= html.html_escape(v.label) %></td> + <td><%= html.html_escape(v.seq) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -63,4 +62,3 @@ html = require("acf.html") <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createclassgroup") then viewlibrary.dispatch_component("createclassgroup") end %> -</DL> diff --git a/provisioning-listdevices-html.lsp b/provisioning-listdevices-html.lsp index 6bad516..84206aa 100644 --- a/provisioning-listdevices-html.lsp +++ b/provisioning-listdevices-html.lsp @@ -28,7 +28,7 @@ html = require("acf.html") %> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deletedevice").click(function(){ return confirm("Are you sure you want to delete this device?")}); }); </script> @@ -53,19 +53,18 @@ table.sort(display) %> <h1>Devices</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Device ID</TH> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Device ID</th> <% for i,n in ipairs(display) do %> - <TH><%= string.gsub(n, "^.", string.upper) %> + <th><%= string.gsub(n, "^.", string.upper) %> <% end %> - </TR> -</THEAD><TBODY> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deletedevice") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?submit=true&device_id="..v.device_id, label="Delete ", class="deletedevice"} %> <% end %> @@ -80,15 +79,15 @@ table.sort(display) <% if viewlibrary.check_permission("getdevicevalues") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/getdevicevalues?submit=true&id=device_id&value="..v.device_id.."&viewtype=templated", label="View "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.device_id) %></TD> + </td> + <td><%= html.html_escape(v.device_id) %></td> <% for i,n in ipairs(display) do %> - <TD><%= html.html_escape(v[n]) %></TD> + <td><%= html.html_escape(v[n]) %></td> <% end %> - </TR> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -96,7 +95,6 @@ table.sort(display) <% if #view.value == 0 then %> <p>No devices found</p> <% end %> -</DL> <% if page_info.action == "listdevices" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createdevice") then viewlibrary.dispatch_component("createdevice") diff --git a/provisioning-listfiles-html.lsp b/provisioning-listfiles-html.lsp index e94b207..cc9e02a 100644 --- a/provisioning-listfiles-html.lsp +++ b/provisioning-listfiles-html.lsp @@ -3,19 +3,37 @@ 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({"editfile"}, session) %> <h1>Provisioning Script Files</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) .. "/editfile?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> diff --git a/provisioning-listgroups-html.lsp b/provisioning-listgroups-html.lsp index 3154df6..9d8268b 100644 --- a/provisioning-listgroups-html.lsp +++ b/provisioning-listgroups-html.lsp @@ -17,7 +17,7 @@ html = require("acf.html") <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deletegroup").click(function(){ return confirm("Are you sure you want to delete this group?")}); }); </script> @@ -26,32 +26,31 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"creategroup"}, session, true) %> <h1>Groups</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Name</TH> - <TH>Label</TH> - <TH>Sequence</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Name</th> + <th>Label</th> + <th>Sequence</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deletegroup") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletegroup?submit=true&group_id="..v.group_id, label="Delete ", class="deletegroup"} %> <% end %> <% if viewlibrary.check_permission("editgroup") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editgroup?group_id="..v.group_id.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.name) %></TD> - <TD><%= html.html_escape(v.label) %></TD> - <TD><%= html.html_escape(v.seq) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.name) %></td> + <td><%= html.html_escape(v.label) %></td> + <td><%= html.html_escape(v.seq) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -63,4 +62,3 @@ html = require("acf.html") <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("creategroup") then viewlibrary.dispatch_component("creategroup") end %> -</DL> diff --git a/provisioning-listparams-html.lsp b/provisioning-listparams-html.lsp index e8f2f94..3b0e255 100644 --- a/provisioning-listparams-html.lsp +++ b/provisioning-listparams-html.lsp @@ -17,7 +17,7 @@ html = require("acf.html") <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deleteparam").click(function(){ return confirm("Are you sure you want to delete this parameter?")}); }); </script> @@ -26,34 +26,33 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"createparam"}, session, true) %> <h1>Parameters</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Name</TH> - <TH>Label</TH> - <TH>Default</TH> - <TH>Sequence</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Name</th> + <th>Label</th> + <th>Default</th> + <th>Sequence</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deleteparam") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteparam?submit=true¶m_id="..v.param_id, label="Delete ", class="deleteparam"} %> <% end %> <% if viewlibrary.check_permission("editparam") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editparam?param_id="..v.param_id.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.name) %></TD> - <TD><%= html.html_escape(v.label) %></TD> - <TD><%= html.html_escape(v.value) %></TD> - <TD><%= html.html_escape(v.seq) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.name) %></td> + <td><%= html.html_escape(v.label) %></td> + <td><%= html.html_escape(v.value) %></td> + <td><%= html.html_escape(v.seq) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -65,4 +64,3 @@ html = require("acf.html") <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createparam") then viewlibrary.dispatch_component("createparam") end %> -</DL> diff --git a/provisioning-listrequests-html.lsp b/provisioning-listrequests-html.lsp index d4e24ff..a53e24f 100644 --- a/provisioning-listrequests-html.lsp +++ b/provisioning-listrequests-html.lsp @@ -41,7 +41,7 @@ html = require("acf.html") %> $(document).ready(function() { - $("#list").tablesorter({headers: {1:{sorter:'digit'}, 3:{sorter:'ipAddress'}}}); + $("#list").tablesorter({headers: {1:{sorter:'digit'}, 3:{sorter:'ipAddress'}}, widgets: ['zebra']}); $(".deleterequest").click(function(){ return confirm("Are you sure you want to delete this request?")}); }); </script> @@ -49,19 +49,18 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deleterequest", "editdevice"}, session) %> <h1>Requests</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>Timestamp</TH> - <TH>MAC Address</TH> - <TH>IP Address</TH> - <TH>User Agent</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>Timestamp</th> + <th>MAC Address</th> + <th>IP Address</th> + <th>User Agent</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deleterequest") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleterequest?submit=true&mac="..v.mac, label="Delete ", class="deleterequest"} %> <% end %> @@ -74,8 +73,8 @@ html = require("acf.html") <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/createdevicefromrequest?submit=true&mac="..v.mac, label="Create "} %> <% end %> <% end %> - </TD> - <TD> + </td> + <td> <span style="display:none"> <% local date = {} date.year, date.month, date.day, date.hour, date.min, date.sec, remainder = string.match(v.date, "(%d+)%-(%d+)%-(%d+) (%d+):(%d+):(%d+)") @@ -83,11 +82,11 @@ html = require("acf.html") io.write((os.time(date) - 1318000000)..(rem or "")) %> </span> <%= html.html_escape(v.date) %> - </TD> - <TD><%= html.html_escape(v.mac) %></TD> - <TD><%= html.html_escape(v.ip) %></TD> - <TD><%= html.html_escape(v.agent) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.mac) %></td> + <td><%= html.html_escape(v.ip) %></td> + <td><%= html.html_escape(v.agent) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> diff --git a/provisioning-listtemplates-html.lsp b/provisioning-listtemplates-html.lsp index 4adc23f..ee67b17 100644 --- a/provisioning-listtemplates-html.lsp +++ b/provisioning-listtemplates-html.lsp @@ -17,7 +17,7 @@ html = require("acf.html") <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deletetemplate").click(function(){ return confirm("Are you sure you want to delete this template?")}); }); </script> @@ -26,20 +26,19 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"createtemplate"}, session, true) %> <h1>Templates</h1> -<DL> -<TABLE id="list" class="tablesorter"><THEAD> - <TR style="background:#eee;font-weight:bold;"> - <TH>Action</TH> - <TH>File Name</TH> - <TH>Label</TH> - <TH>Sequence</TH> - <TH>File Size</TH> - <TH>Last Modified</TH> - </TR> -</THEAD><TBODY> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Action</th> + <th>File Name</th> + <th>Label</th> + <th>Sequence</th> + <th>File Size</th> + <th>Last Modified</th> + </tr> +</thead><tbody> <% for k,v in ipairs( view.value ) do %> - <TR> - <TD> + <tr> + <td> <% if viewlibrary.check_permission("deletetemplate") and v.label then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletetemplate?submit=true&filename="..v.filename, label="Delete ", class="deletetemplate"} %> <% end %> @@ -49,16 +48,16 @@ html = require("acf.html") <% if viewlibrary.check_permission("createtemplate") and not v.label then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/createtemplate?filename="..v.filename.."&redir="..page_info.orig_action, label="Create "} %> <% end %> - </TD> - <TD><%= html.html_escape(v.filename) %></TD> - <TD><%= html.html_escape(v.label) %></TD> - <TD><%= html.html_escape(v.seq) %></TD> - <TD><%= html.html_escape(v.filesize) %></TD> - <TD><%= html.html_escape(v.mtime) %></TD> - </TR> + </td> + <td><%= html.html_escape(v.filename) %></td> + <td><%= html.html_escape(v.label) %></td> + <td><%= html.html_escape(v.seq) %></td> + <td><%= html.html_escape(v.filesize) %></td> + <td><%= html.html_escape(v.mtime) %></td> + </tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% if view.errtxt then %> <p class="error"><%= html.html_escape(view.errtxt) %></p> @@ -70,4 +69,3 @@ html = require("acf.html") <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createtemplate") then viewlibrary.dispatch_component("createtemplate") end %> -</DL> diff --git a/provisioning-searchbyextension-html.lsp b/provisioning-searchbyextension-html.lsp index 5ab9228..d8dda52 100644 --- a/provisioning-searchbyextension-html.lsp +++ b/provisioning-searchbyextension-html.lsp @@ -36,12 +36,16 @@ if session.searchdevicesresult then end %> -<H1>Search by Extension</H1> -<DL> -<form action="/cgi-bin/acf/provisioning/provisioning/searchdevices" method="POST"> +<h1>Search by Extension</h1> +<form action="/cgi-bin/acf/provisioning/provisioning/searchdevices" method="post"> <input type="hidden" name="id" value=".extension"> <input type="hidden" name="comparison" value="~"> -<DT>Extension</DT> -<DD><input class="text" type="text" name="value" value="" ></DD> -<DT></DT><DD><input class="submit" type="submit" name="submit" value="Search"></DD> -</FORM></DL> +<div class='item'><p class='left'>Extension</p> +<div class='right'> +<input class="text" type="text" name="value" value="" > +</div></div><!-- end .item --> +<div class='item'><p class='left'></p> +<div class='right'> +<input class="submit" type="submit" name="submit" value="Search"> +</div></div><!-- end .item --> +</form> diff --git a/provisioning-searchbymac-html.lsp b/provisioning-searchbymac-html.lsp index 6e6c1cc..ce50f47 100644 --- a/provisioning-searchbymac-html.lsp +++ b/provisioning-searchbymac-html.lsp @@ -36,11 +36,15 @@ end %> <H1>Search by MAC Address</H1> -<DL> -<form action="/cgi-bin/acf/provisioning/provisioning/searchdevices" method="POST"> +<form action="/cgi-bin/acf/provisioning/provisioning/searchdevices" method="post"> <input type="hidden" name="id" value="device.mac"> <input type="hidden" name="comparison" value="~"> -<DT>MAC Address</DT> -<DD><input class="text" type="text" name="value" value="" ></DD> -<DT></DT><DD><input class="submit" type="submit" name="submit" value="Search"></DD> -</FORM></DL> +<div class='item'><p class='left'>MAC Address</p> +<div class='right'> +<input class="text" type="text" name="value" value="" > +</div></div><!-- end .item --> +<div class='item'><p class='left'></p> +<div class='right'> +<input class="submit" type="submit" name="submit" value="Search"> +</div></div><!-- end .item --> +</form> diff --git a/provisioning-searchdevices-html.lsp b/provisioning-searchdevices-html.lsp index f5cd09f..4732c53 100644 --- a/provisioning-searchdevices-html.lsp +++ b/provisioning-searchdevices-html.lsp @@ -24,11 +24,13 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %> <% if form.value.values then %> -<H1>Device</H1> - <DL> -<% if form.errtxt then io.write("<P CLASS='error'>" .. string.gsub(html.html_escape(form.errtxt), "\n", "<BR>") .. "</P>\n") end %> - <DT>Device ID</DT><DD><input class="text" type="text" value="<%= html.html_escape(form.value.result.value[1].device_id) %>" readonly="true"></DD> -<H2>Parameter Values</H2> +<h1>Device</h1> +<% if form.errtxt then io.write("<p class='error'>" .. string.gsub(html.html_escape(form.errtxt), "\n", "<br/>") .. "</p>\n") end %> + <div class='item'><p class='left'>Device ID</p> + <div class='right'> + <input class="text" type="text" value="<%= html.html_escape(form.value.result.value[1].device_id) %>" readonly="true"> + </div></div><!-- end .item --> +<h2>Parameter Values</h2> <% session = require("session") val = session.serialize("values", form.value.values.value) @@ -39,10 +41,9 @@ elseif form.value.result then local func = haserl.loadfile(page_info.viewfile:gsub("searchdevices", "listdevices")) func(form.value.result, viewlibrary, page_info, session) %> - </DL> <% end %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% form.value.result = nil htmlviewfunctions.displayform(form, nil, nil, page_info, 2) |