summaryrefslogtreecommitdiffstats
path: root/postfix-listfiles-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'postfix-listfiles-html.lsp')
-rw-r--r--postfix-listfiles-html.lsp18
1 files changed, 2 insertions, 16 deletions
diff --git a/postfix-listfiles-html.lsp b/postfix-listfiles-html.lsp
index 2a5a0c4..d21b875 100644
--- a/postfix-listfiles-html.lsp
+++ b/postfix-listfiles-html.lsp
@@ -3,20 +3,6 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
-<%
-function convertsize(size)
- if string.find(size, "k$") then
- 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.0 * 1024.0 * 1024.0
- else
- return tonumber(string.match(size, "[%d.]*"))
- end
-end
-%>
-
<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>');
@@ -31,7 +17,7 @@ end
<script type="text/javascript">
$(document).ready(function() {
- $("#list").tablesorter({widgets: ['zebra']});
+ $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']});
});
</script>
@@ -63,7 +49,7 @@ end %>
<% end %>
</td>
<td><%= html.html_escape(file.filename) %></td>
- <td><span class="hide"><%= convertsize(file.filesize) %>b</span><%= html.html_escape(file.filesize) %></td>
+ <td><span class="hide"><%= html.html_escape(file.orig_size) %>b</span><%= html.html_escape(file.size) %></td>
<td><%= html.html_escape(file.mtime) %></td>
</tr>
<% end %>