summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:30:00 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:30:00 +0000
commit2bd635102285c76c592290dd1fad8d2597aef3e7 (patch)
tree6729a65cd01d6acf2c718872791d4007d0febf1a
parentbfef8c642017b8a58d2da72324f09460f42ec22c (diff)
downloadacf-freeswitch-2bd635102285c76c592290dd1fad8d2597aef3e7.tar.bz2
acf-freeswitch-2bd635102285c76c592290dd1fad8d2597aef3e7.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r--freeswitch-listfiles-html.lsp64
1 files changed, 41 insertions, 23 deletions
diff --git a/freeswitch-listfiles-html.lsp b/freeswitch-listfiles-html.lsp
index f4a8bcc..5b38091 100644
--- a/freeswitch-listfiles-html.lsp
+++ b/freeswitch-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", "reloadxml"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createfile"}, session, true) %>
@@ -11,44 +29,44 @@ 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">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 k,v 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="..v.filename.."&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="..v.filename, label="Delete "} %>
<% end %>
- </TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;"><%= html.html_escape(v.filename) %></TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;"><%= html.html_escape(v.size) %></TD>
- <TD style="white-space:nowrap;"><%= html.html_escape(v.mtime) %></TD>
- </TR>
+ </td>
+ <td><%= html.html_escape(v.filename) %></td>
+ <td><%= html.html_escape(v.size) %></td>
+ <td><%= html.html_escape(v.mtime) %></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)
end %>
<% if viewlibrary.check_permission("reloadxml") then %>
-<H1>Reload XML</H1>
-<DL>
- <DT>Reload XML</DT>
- <DD><form action="<%= html.html_escape(page_info.script .. page_info.prefix) %>freeswitch/reloadxml" method="POST">
- <input class="submit" type="submit" name="submit" value="Reload"></form></DD>
-</DL>
+<h1>Reload XML</h1>
+ <div class='item'><p class='left'>Reload XML</p>
+ <div class='right'>
+ <form action="<%= html.html_escape(page_info.script .. page_info.prefix) %>freeswitch/reloadxml" method="post">
+ <input class="submit" type="submit" name="submit" value="Reload"></form>
+ </div></div><!-- end .item -->
<% end %>