diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-10 05:37:15 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-10 05:37:15 +0000 |
commit | 4d2d461f33b8f0ac37c9e4effaf5ff02204a5934 (patch) | |
tree | b8715657479fbe320de1bebce93a19e2a1ef4890 | |
parent | 48a78f25883f5453df50c0607fec4541a71a6294 (diff) | |
download | acf-asterisk-4d2d461f33b8f0ac37c9e4effaf5ff02204a5934.tar.bz2 acf-asterisk-4d2d461f33b8f0ac37c9e4effaf5ff02204a5934.tar.xz |
Changes to use new htmlviewfunctions functions
-rw-r--r-- | asterisk-listfiles-html.lsp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/asterisk-listfiles-html.lsp b/asterisk-listfiles-html.lsp index c22a110..c9ba583 100644 --- a/asterisk-listfiles-html.lsp +++ b/asterisk-listfiles-html.lsp @@ -31,7 +31,7 @@ end <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({widgets: ['zebra']}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); }); </script> @@ -42,17 +42,26 @@ end viewlibrary.dispatch_component("status") end %> -<h1>Configuration</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Configuration"}), page_info) %> <table id="list" class="tablesorter"><thead> <tr> + <th>Action</th> <th>File</th> <th>Size</th> <th>Last Modified</th> </tr> </thead><tbody> -<% - for k,v in ipairs( view.value ) do - io.write( "<tr><td><a href=\"" .. html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) .. "/edit?filename=" .. html.html_escape(v.filename) .. "&redir=" .. html.html_escape(page_info.orig_action) .. "\">" .. html.html_escape(v.filename) .. '</a></td><td><span style="display:none">'..convertsize(v.size).."b</span>" .. html.html_escape(v.size) .."</td><td>" .. html.html_escape(v.mtime) .."</td></tr>\n" ) - end -%> +<% local filename = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> +<% for i,file in ipairs( view.value ) do %> + <% filename.value = file.filename %> + <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 style="display:none"><%= convertsize(file.size) %>b</span><%= html.html_escape(file.size) %></td> + <td><%= html.html_escape(file.mtime) %></td> + </tr> +<% end %> </tbody></table> +<% htmlviewfunctions.displaysectionend(header_level) %> + |