summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-11-20 15:11:57 +0000
committerTed Trask <ttrask01@yahoo.com>2013-11-20 15:11:57 +0000
commit9a99bbaa769d88d5b91f3f35d20f73dccb9eee23 (patch)
treec99331fbc3d28db24c0f301a5b9464453629fd0a
parent1c82ae0a7f04733f8c1b089d0631d55b25bcfefd (diff)
downloadacf-weblog-9a99bbaa769d88d5b91f3f35d20f73dccb9eee23.tar.bz2
acf-weblog-9a99bbaa769d88d5b91f3f35d20f73dccb9eee23.tar.xz
Modify listsources to use tablesorter
-rw-r--r--weblog-listsources-html.lsp45
1 files changed, 32 insertions, 13 deletions
diff --git a/weblog-listsources-html.lsp b/weblog-listsources-html.lsp
index 85817fb..7f71bdb 100644
--- a/weblog-listsources-html.lsp
+++ b/weblog-listsources-html.lsp
@@ -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 %>