diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-05 19:56:42 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-05 19:56:42 +0000 |
commit | d77bf9609380d27301abeba31e467039517cb8d5 (patch) | |
tree | fedaa02dc2efd0d62cb696ed1163b7f8f7a59f01 | |
parent | 7dad3b2d66bfdc5d653961e8b4f87870106aaeee (diff) | |
download | acf-weblog-d77bf9609380d27301abeba31e467039517cb8d5.tar.bz2 acf-weblog-d77bf9609380d27301abeba31e467039517cb8d5.tar.xz |
Fix issues with tablesorter sorting
-rw-r--r-- | weblog-listfiles-html.lsp | 10 | ||||
-rw-r--r-- | weblog-viewweblog-html.lsp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/weblog-listfiles-html.lsp b/weblog-listfiles-html.lsp index 673afa8..ea2ab2c 100644 --- a/weblog-listfiles-html.lsp +++ b/weblog-listfiles-html.lsp @@ -6,13 +6,13 @@ html = require("acf.html") <% function convertsize(size) if string.find(size, "k$") then - return tonumber(string.match(size, "%d*")) * 1024 - elseif string.find(string.match(size, "%d*"), "M$") then - return tonumber(size) * 1024 * 1024 + return tonumber(string.match(size, "[%d.]*")) * 1024.0 + elseif string.find(size, "M$") then + return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0 elseif string.find(size, "G$") then - return tonumber(string.match(size, "%d*")) + 1024 * 1024 * 1024 + return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0 else - return tonumber(size) + return tonumber(string.match(size, "[%d.]*")) end end %> diff --git a/weblog-viewweblog-html.lsp b/weblog-viewweblog-html.lsp index 8841bde..061d8b0 100644 --- a/weblog-viewweblog-html.lsp +++ b/weblog-viewweblog-html.lsp @@ -80,7 +80,7 @@ end } $(function(){ - $("#loglist").tablesorter({headers: {0:{sorter: false}, 1:{sorter: 'text'}, 5:{sorter: false}, 6:{sorter: false}, 7:{sorter: false}}, widgets: ['zebra']}); + $("#loglist").tablesorter({headers: {0:{sorter: false}, 1:{sorter: 'text'}}, widgets: ['zebra']}); $('#chkHead').click(clickhead); $('.chktbl').click(clicktable); <% if data.value.focus.value ~= "" then %> @@ -188,9 +188,9 @@ end %> <td <% if data.value.clientip.value == watch.clientip then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientip) %></td> <td <% if data.value.clientuserid.value == watch.clientuserid then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientuserid) %></td> <td><%= html.html_escape(watch.bytes) %></td> - <td><% if watch.badyesno ~= "0" then %><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></td> - <td><% if watch.deniedyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></td> - <td><% if watch.bypassyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></td> + <td><span style="display:none"><%= html.html_escape(watch.badyesno) %></span><% if watch.badyesno ~= "0" then %><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></td> + <td><span style="display:none"><%= html.html_escape(watch.deniedyesno) %></span><% if watch.deniedyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></td> + <td><span style="display:none"><%= html.html_escape(watch.bypassyesno) %></span><% if watch.bypassyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></td> <td><%= html.html_escape(watch.score) %></td> <td<% if (watch.shortreason and watch.shortreason ~= "" and watch.reason and watch.reason ~= "") then %> title="<%= html.html_escape(watch.reason) %>"<% end %>> <% if (watch.shortreason and watch.shortreason ~= "") then %> |