summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-03 21:29:39 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-03 21:29:39 +0000
commit8c84c4c0a88b7197ab414025339d4a2c504fd5e1 (patch)
tree9211729414809a3c928851caedcb213601e0cbb8
parent418c8cfe9a36c036a900c47059450f822095dab7 (diff)
downloadacf-freeswitch-vmail-8c84c4c0a88b7197ab414025339d4a2c504fd5e1.tar.bz2
acf-freeswitch-vmail-8c84c4c0a88b7197ab414025339d4a2c504fd5e1.tar.xz
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r--vmail-listmessages-html.lsp79
-rw-r--r--vmail-listusers-html.lsp57
2 files changed, 70 insertions, 66 deletions
diff --git a/vmail-listmessages-html.lsp b/vmail-listmessages-html.lsp
index 8b119a0..43de602 100644
--- a/vmail-listmessages-html.lsp
+++ b/vmail-listmessages-html.lsp
@@ -183,9 +183,9 @@ end
function PlayMessage() {
$(".temporaryplayer").remove();
if ( BrowserDetect.browser == "Safari" ) {
- $(this).parent().parent().after("<tr class='temporaryplayer'><td colspan='9'><object type='audio/x-wav' data='" + $(this).attr("href") + "' width='100%' height='25'><param name='src' value='" + $(this).attr("href") + "'> <param name='autoplay' value='true'> <param name='autoStart' value='1'> </object></TD></TR>");
+ $(this).parent().parent().after("<tr class='temporaryplayer'><td colspan='9'><object type='audio/x-wav' data='" + $(this).attr("href") + "' width='100%' height='25'><param name='src' value='" + $(this).attr("href") + "'> <param name='autoplay' value='true'> <param name='autoStart' value='1'> </object></td></tr>");
} else {
- $(this).parent().parent().after("<tr class='temporaryplayer'><td colspan='9'><embed width='100%' height='25px' autostart='1' playcount='1' src='" + $(this).attr("href") + "' type='application/x-mplayer2'></embed></TD></TR>");
+ $(this).parent().parent().after("<tr class='temporaryplayer'><td colspan='9'><embed width='100%' height='25px' autostart='1' playcount='1' src='" + $(this).attr("href") + "' type='application/x-mplayer2'></embed></td></tr>");
};
return false;
}
@@ -220,12 +220,11 @@ end
<% htmlviewfunctions.displaycommandresults({"deletemessage", "deletemymessage", "forwardmessage", "forwardmymessage", "emailmessage", "emailmymessage", "movemessage", "movemymessage", "callbackmessage", "callbackmymessage"}, session) %>
<h1>Messages</h1>
-<DL>
-<TABLE><TR><TD>
+<table><tr><td>
<% if viewlibrary.check_permission("deletemessage") or viewlibrary.check_permission("deletemymessage") then %>
<form id="multidelete" action="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller) %>/
<% if viewlibrary.check_permission("deletemessage") then io.write("deletemessage") else io.write("deletemymessage") end %>
- " method="POST">
+ " method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<input class="hidden" type="hidden" name="message" value="" >
<input class="submit" type="submit" name="submit" value="Delete">
@@ -234,59 +233,59 @@ end
<% if viewlibrary.check_permission("forwardmessage") or viewlibrary.check_permission("forwardmymessage") then %>
<form id="multiforward" action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/
<% if viewlibrary.check_permission("forwardmessage") then io.write("forwardmessage") else io.write("forwardmymessage") end %>
- " method="POST">
+ " method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<input class="hidden" type="hidden" name="message" value="" >
<input class="submit" type="submit" name="submit" value="Forward">
- <select name="newuser" style="width:auto;"><%= (useroptions or "") %></select>
+ <select name="newuser"><%= (useroptions or "") %></select>
</form>
<% end %>
<% if viewlibrary.check_permission("emailmessage") or viewlibrary.check_permission("emailmymessage") then %>
<form id="multiemail" action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/
<% if viewlibrary.check_permission("emailmessage") then io.write("emailmessage") else io.write("emailmymessage") end %>
- " method="POST">
+ " method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<input class="hidden" type="hidden" name="message" value="" >
<input class="submit" type="submit" name="submit" value="E-mail">
- <input class="text" type="text" name="address" value="" style="width:auto;">
+ <input class="text" type="text" name="address" value="">
</form>
<% end %>
<% if viewlibrary.check_permission("movemessage") or viewlibrary.check_permission("movemymessage") then %>
<% if not dontmove then %>
<form id="multimove" action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/
<% if viewlibrary.check_permission("movemessage") then io.write("movemessage") else io.write("movemymessage") end %>
- " method="POST">
+ " method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
<input class="hidden" type="hidden" name="message" value="" >
<input class="submit" type="submit" name="submit" value="Move">
- <select name="newfolder" style="width:auto;"><%= (folderoptions or "") %></select>
+ <select name="newfolder"><%= (folderoptions or "") %></select>
</form>
<% end %>
<% end %>
-</TD></TR></TABLE>
+</td></tr></table>
<table><tr><td>
<small>select: </small>
<small><a href='' OnClick='$(".multicheck").attr("checked", "true"); return false;'>all</a></small>
<small><a href='' OnClick='$(".multicheck").removeAttr("checked"); return false;'>none</a></small>
</td></tr></table>
-<TABLE id="list" class="tablesorter"><THEAD>
- <TR>
- <TH></TH>
- <TH>Action</TH>
- <TH>Date</TH>
- <TH>Time</TH>
- <TH>Caller ID</TH>
- <TH>Priority</TH>
- <TH>Orig Mailbox</TH>
- <TH>Folder</TH>
- <TH>Duration</TH>
- </TR>
-</THEAD><TBODY>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th>Caller ID</th>
+ <th>Priority</th>
+ <th>Orig Mailbox</th>
+ <th>Folder</th>
+ <th>Duration</th>
+ </tr>
+</thead><tbody>
<% for k,v in ipairs( view.value ) do %>
- <TR>
- <TD><input type=checkbox class="multicheck" value="<%= html.html_escape(v.uuid) %>"></TD>
- <TD>
+ <tr>
+ <td><input type=checkbox class="multicheck" value="<%= html.html_escape(v.uuid) %>"></td>
+ <td>
<% if viewlibrary.check_permission("downloadmessage") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/downloadmessage?viewtype=stream&message="..v.uuid, label="Download "} %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/downloadmessage?viewtype=stream&message="..v.uuid, class="playmessage", label="Play "} %>
@@ -297,18 +296,18 @@ end
<% if callmenumber then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/callbackmymessage?submit=true&message="..v.uuid.."&extension="..callmenumber, label="CallMe "} %>
<% end %>
- </TD>
- <TD><%= html.html_escape(os.date("%x", v.created_epoch)) %></TD>
- <TD><%= html.html_escape(os.date("%X", v.created_epoch)) %></TD>
- <TD><%= html.html_escape(v.cid_number) %></TD>
- <TD><%= html.html_escape(v.read_flags) %></TD>
- <TD><%= html.html_escape(v.username) %></TD>
- <TD><%= html.html_escape(reversefolders[v.in_folder] or v.in_folder) %></TD>
- <TD><%= html.html_escape(v.message_len) %></TD>
- </TR>
+ </td>
+ <td><%= html.html_escape(os.date("%x", v.created_epoch)) %></td>
+ <td><%= html.html_escape(os.date("%X", v.created_epoch)) %></td>
+ <td><%= html.html_escape(v.cid_number) %></td>
+ <td><%= html.html_escape(v.read_flags) %></td>
+ <td><%= html.html_escape(v.username) %></td>
+ <td><%= html.html_escape(reversefolders[v.in_folder] or v.in_folder) %></td>
+ <td><%= html.html_escape(v.message_len) %></td>
+ </tr>
<% end %>
-</TBODY>
-</TABLE>
+</tbody>
+</table>
<% if view.errtxt then %>
<p class="error"><%= html.html_escape(view.errtxt) %></p>
@@ -316,5 +315,3 @@ end
<% if #view.value == 0 then %>
<p>No messages found</p>
<% end %>
-
-</DL>
diff --git a/vmail-listusers-html.lsp b/vmail-listusers-html.lsp
index 22e2499..1204570 100644
--- a/vmail-listusers-html.lsp
+++ b/vmail-listusers-html.lsp
@@ -25,31 +25,31 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"createuser", "deleteuser", "editusersettings"}, session) %>
<h1>Users</h1>
-<DL><TABLE id="list" class="tablesorter"><THEAD>
- <TR>
- <TH>Action</TH>
- <TH>Extension</TH>
- <TH>First Name</TH>
- <TH>Last Name</TH>
- </TR>
-</THEAD><TBODY>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>Action</th>
+ <th>Extension</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ </tr>
+</thead><tbody>
<% for k,v in ipairs( view.value ) do %>
- <TR>
- <TD>
+ <tr>
+ <td>
<% if viewlibrary.check_permission("editusersettings") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editusersettings?username="..v.username, label="Edit "} %>
<% end %>
<% if viewlibrary.check_permission("deleteuser") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteuser?username="..v.username.."&submit=true", label="Delete ", class="deleteuser"} %>
<% end %>
- </TD>
- <TD><%= html.html_escape(v.username) %></TD>
- <TD><%= html.html_escape(v.firstname) %></TD>
- <TD><%= html.html_escape(v.lastname) %></TD>
- </TR>
+ </td>
+ <td><%= html.html_escape(v.username) %></td>
+ <td><%= html.html_escape(v.firstname) %></td>
+ <td><%= html.html_escape(v.lastname) %></td>
+ </tr>
<% end %>
-</TBODY>
-</TABLE>
+</tbody>
+</table>
<% if view.errtxt then %>
<p class="error"><%= html.html_escape(view.errtxt) %></p>
@@ -59,16 +59,23 @@ html = require("acf.html")
<% end %>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createuser") then %>
-<H2>Create New User</H2>
-<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/createuser" method="POST">
+<h2>Create New User</h2>
+<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/createuser" method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
-<dl><dt></dt><dd><input class="submit" type="submit" value="Create"></dd>
+<div class='item'><p class='left'></p>
+<div class='right'>
+<input class="submit" type="submit" value="Create">
+</div></div><!-- end .item -->
</form>
-<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/createmanyusers" method="POST">
+<% end %>
+
+<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createmanyusers") then %>
+<h2>Create Multiple Users</h2>
+<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/createmanyusers" method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
-<dt></dt><dd><input class="submit" type="submit" value="Create Many"></dd></dl>
+<div class='item'><p class='left'></p>
+<div class='right'>
+<input class="submit" type="submit" value="Create">
+</div></div><!-- end .item -->
</form>
-
<% end %>
-
-</DL>