summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-11-20 22:40:32 +0000
committerTed Trask <ttrask01@yahoo.com>2015-11-20 22:40:32 +0000
commit2609c2a70d3f1dc75bc695c0421c5a54a523e961 (patch)
treeb1f5211d12a9f87534fcce6c95fbefc86980f2e9
parent3230c74174c729d1979343707718e62c2e68e91c (diff)
downloadacf-asterisk-2609c2a70d3f1dc75bc695c0421c5a54a523e961.tar.bz2
acf-asterisk-2609c2a70d3f1dc75bc695c0421c5a54a523e961.tar.xz
Replace convertsize function with orig_size
-rw-r--r--asterisk-listfiles-html.lsp16
1 files changed, 1 insertions, 15 deletions
diff --git a/asterisk-listfiles-html.lsp b/asterisk-listfiles-html.lsp
index 765b54a..d4d1080 100644
--- a/asterisk-listfiles-html.lsp
+++ b/asterisk-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>');
@@ -58,7 +44,7 @@ end %>
<tr>
<td><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="edit"}), page_info, -1) %></td>
<td><%= html.html_escape(file.filename) %></td>
- <td><span class="hide"><%= convertsize(file.size) %>b</span><%= html.html_escape(file.size) %></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 %>