Commit 9a99bbaa authored by Ted Trask's avatar Ted Trask

Modify listsources to use tablesorter

parent 1c82ae0a
......@@ -3,33 +3,52 @@ 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() {
$("#sources").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']});
});
</script>
<% htmlviewfunctions.displaycommandresults({"deletesource", "editsource", "testsource", "createsource", "importlogs"}, session) %>
<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">Name</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Enabled</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Source</TD>
<TD style="white-space:nowrap;text-align:left;" class="header">Method</TD>
<TABLE id="sources" class="tablesorter"><THEAD>
<TR>
<TH>Action</TH>
<TH>Name</TH>
<TH>Enabled</TH>
<TH>Source</TH>
<TH>Method</TH>
</TR>
</THEAD><TBODY>
<% for i,source in ipairs(data.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<TD>
<%= html.link{value = "editsource?sourcename=" .. source.sourcename.."&redir="..page_info.orig_action, label="Edit "} %>
<%= html.link{value = "deletesource?submit=true&sourcename=" .. source.sourcename, label="Delete "} %>
<%= html.link{value = "testsource?submit=true&sourcename=" .. source.sourcename, label="Test "} %>
</TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(source.sourcename) %></TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(tostring(source.enabled)) %></TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(source.source) %></TD>
<TD style="white-space:nowrap;" width="90%"><%= html.html_escape(source.method) %></TD>
<TD><%= html.html_escape(source.sourcename) %></TD>
<TD><%= html.html_escape(tostring(source.enabled)) %></TD>
<TD><%= html.html_escape(source.source) %></TD>
<TD><%= html.html_escape(source.method) %></TD>
</TR>
<% end %>
</TBODY>
</TABLE>
<% if data.errtxt then %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment