summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-01-22 16:32:46 +0000
committerTed Trask <ttrask01@yahoo.com>2014-01-22 16:32:46 +0000
commitdbbb88812817d58aa7dd53633f9d81a1a1fa6565 (patch)
treed598c632218a757c5f087a2dd86dd4c647404c20 /app
parent52525eed79994b294af9cf905f6574fc75955369 (diff)
downloadacf-core-dbbb88812817d58aa7dd53633f9d81a1a1fa6565.tar.bz2
acf-core-dbbb88812817d58aa7dd53633f9d81a1a1fa6565.tar.xz
Modify HTML to replace DL,DT,DD with divs. Also cleanup other HTML.
Diffstat (limited to 'app')
-rw-r--r--app/acf-util/password-status-html.lsp54
-rw-r--r--app/acf-util/roles-read-html.lsp49
-rw-r--r--app/acf-util/roles-viewroles-html.lsp46
-rw-r--r--app/acf-util/skins-read-html.lsp10
-rw-r--r--app/acf-util/welcome-html.lsp2
-rw-r--r--app/debug-html.lsp8
-rw-r--r--app/filedetails-html.lsp20
-rw-r--r--app/status-html.lsp18
8 files changed, 117 insertions, 90 deletions
diff --git a/app/acf-util/password-status-html.lsp b/app/acf-util/password-status-html.lsp
index f322b55..9316bda 100644
--- a/app/acf-util/password-status-html.lsp
+++ b/app/acf-util/password-status-html.lsp
@@ -4,35 +4,35 @@
<% htmlviewfunctions.displaycommandresults({"newuser", "edituser", "deleteuser"}, session) %>
-<H1>User Accounts</H1>
-<H2>Create new account</H2>
-<form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/newuser" method="POST">
+<h1>User Accounts</h1>
+<h2>Create new account</h2>
+<form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/newuser" method="post">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
-<dl><dt></dt><dd><input class="submit" type="submit" value="Create"></dd></dl>
+<div class='item'><p class='left'></p><div class='right'><input class="submit" type="submit" value="Create"></div></div><!-- end .item -->
</form>
-<H2>Existing account</H2>
-<DL>
+<h2>Existing account</h2>
<% for i,user in ipairs(form.value) do
local name = html.html_escape(user.value.userid.value) %>
- <DT><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/apps/system-users.png' HEIGHT='16' WIDTH='16'> <%= name %></DT>
- <DD><TABLE>
- <TR>
- <TD STYLE='border:none;'><B><%= html.html_escape(user.value.userid.label) %></B></TD>
- <TD STYLE='border:none;' WIDTH='90%'><%= html.html_escape(user.value.userid.value) %></TD>
- </TR><TR>
- <TD STYLE='border:none;'><B><%= html.html_escape(user.value.username.label) %></B></TD>
- <TD STYLE='border:none;'><%= html.html_escape(user.value.username.value) %></TD>
- </TR><TR>
- <TD STYLE='border:none;'><B><%= html.html_escape(user.value.roles.label) %></B></TD>
- <TD STYLE='border:none;'><%= html.html_escape(table.concat(user.value.roles.value, ", ")) %></TD>
- </TR><TR>
- <TD STYLE='border:none;'><B>Option</B></TD>
- <TD STYLE='border:none;'>
- [<A HREF='edituser?userid=<%= name %>&redir=<%= html.html_escape(page_info.orig_action) %>'>Edit this account</A>]
- [<A HREF='deleteuser?userid=<%= name %>&submit=true'>Delete this account</A>]
- [<A HREF='<%= html.html_escape(page_info.script) %>/acf-util/roles/viewuserroles?userid=<%= name %>'>View roles for this account</A>]
- </TD>
- </TR>
- </TABLE></DD>
+ <div class='item'><p class='left'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/apps/system-users.png' height='16' width='16'> <%= name %></p>
+ <div class='right'>
+ <table><tbody>
+ <tr>
+ <td style='border:none;'><b><%= html.html_escape(user.value.userid.label) %></b></td>
+ <td style='border:none;' width='90%'><%= html.html_escape(user.value.userid.value) %></td>
+ </tr><tr>
+ <td style='border:none;'><b><%= html.html_escape(user.value.username.label) %></b></td>
+ <td style='border:none;'><%= html.html_escape(user.value.username.value) %></td>
+ </tr><tr>
+ <td style='border:none;'><b><%= html.html_escape(user.value.roles.label) %></b></td>
+ <td style='border:none;'><%= html.html_escape(table.concat(user.value.roles.value, ", ")) %></td>
+ </tr><tr>
+ <td style='border:none;'><b>Option</b></td>
+ <td style='border:none;'>
+ [<a href='edituser?userid=<%= name %>&redir=<%= html.html_escape(page_info.orig_action) %>'>Edit this account</a>]
+ [<a href='deleteuser?userid=<%= name %>&submit=true'>Delete this account</a>]
+ [<a href='<%= html.html_escape(page_info.script) %>/acf-util/roles/viewuserroles?userid=<%= name %>'>View roles for this account</a>]
+ </td>
+ </tr>
+ </tbody></table>
+ </div></div><!-- end .item -->
<% end %>
-</DL>
diff --git a/app/acf-util/roles-read-html.lsp b/app/acf-util/roles-read-html.lsp
index 9d1a003..c0fbaab 100644
--- a/app/acf-util/roles-read-html.lsp
+++ b/app/acf-util/roles-read-html.lsp
@@ -1,32 +1,48 @@
-<% local view= ... %>
+<% local view, viewlibrary, page_info, session = ... %>
<% 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() {
+ $("#permissions").tablesorter({headers: {1:{sorter: false}}, widgets: ['zebra']});
+ });
+</script>
+
<% if view.value.userid then %>
- <H1>Roles/Permission list for <%= html.html_escape(view.value.userid.value) %>:</H1>
+ <h1>Roles/Permission list for <%= html.html_escape(view.value.userid.value) %>:</h1>
<% elseif view.value.role then %>
- <H1>Permission list for <%= html.html_escape(view.value.role.value) %>:</H1>
+ <h1>Permission list for <%= html.html_escape(view.value.role.value) %>:</h1>
<% else %>
- <H1>Complete permission list:</H1>
+ <h1>Complete permission list:</h1>
<% end %>
<% if view.value.roles then %>
- <H2><%= html.html_escape(view.value.userid.value) %> is valid in these roles</H2>
- <DL>
+ <h2><%= html.html_escape(view.value.userid.value) %> is valid in these roles</h2>
<% for a,b in pairs(view.value.roles.value) do
- print("<dt>",html.html_escape(b),"</dt><dd>&nbsp;</dd>")
+ print("<p>",html.html_escape(b),"</p>")
end %>
- </DL>
<% end %>
<% if view.value.permissions then %>
<% if view.value.userid then %>
- <H2><%= html.html_escape(view.value.userid.value) %>'s full permissions are</H2>
+ <h2><%= html.html_escape(view.value.userid.value) %>'s full permissions are</h2>
<% elseif view.value.role then %>
- <H2><%= html.html_escape(view.value.role.value) %>'s full permissions are</H2>
+ <h2><%= html.html_escape(view.value.role.value) %>'s full permissions are</h2>
<% end %>
- <DL>
- <TABLE>
- <TR><TD CLASS='header'>Controller</TD><TD CLASS='header'>Action(s)</TD></TR>
+ <table id="permissions" class="tablesorter"><thead>
+ <tr><th>Controller</th><th>Action(s)</th></tr>
+ </thead><tbody>
<% local prefixes = {}
-- It's nice to have it in alphabetical order
for pref in pairs(view.value.permissions.value) do
@@ -41,7 +57,7 @@
end
table.sort(controllers)
for x,cont in ipairs(controllers) do
- print("<TR><TD STYLE='font-weight:bold;'>",html.html_escape(pref..cont),"</TD><TD>")
+ print("<tr><td style='font-weight:bold;'>",html.html_escape(pref..cont),"</td><td>")
-- Again, alphabetical order
local actions = {}
for act in pairs(view.value.permissions.value[pref][cont]) do
@@ -51,10 +67,9 @@
for y,act in pairs(actions) do
print((html.html_escape(act)))
end
- io.write("<TD></TR>")
+ io.write("</td></tr>")
end
end
%>
- </TABLE>
- </DL>
+ </tbody></table>
<% end %>
diff --git a/app/acf-util/roles-viewroles-html.lsp b/app/acf-util/roles-viewroles-html.lsp
index 779d8fc..59aa4e9 100644
--- a/app/acf-util/roles-viewroles-html.lsp
+++ b/app/acf-util/roles-viewroles-html.lsp
@@ -2,36 +2,54 @@
<% 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() {
+ $("#list").tablesorter({headers: {1:{sorter: false}}, widgets: ['zebra']});
+ });
+</script>
+
<% htmlviewfunctions.displaycommandresults({"newrole", "editrole", "deleterole"}, session) %>
-<H1>Roles</H1>
-<H2>Create new role</H2>
+<h1>Roles</h1>
+<h2>Create new role</h2>
<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) %>/newrole" method="POST">
<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
-<dl><dt></dt><dd><input class="submit" type="submit" value="Create"></dd></dl>
+<div class='item'><p class='left'></p><div class='right'><input class="submit" type="submit" value="Create"></div></div><!-- end .item -->
</form>
-<H2>Existing roles</H2>
-<DL>
-<TABLE>
+<h2>Existing roles</h2>
+<table id="list" class="tablesorter"><thead>
+ <tr><th>Role</th><th>Action</th></tr>
+</thead><tbody>
<% if view.value.defined_roles then %>
<% for x,role in pairs(view.value.defined_roles.value) do %>
- <TR><TD><dt><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/apps/system-users.png' height='16' width='16'> <%= html.html_escape(role) %></dt>
- <dd>
+ <tr><td><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/apps/system-users.png' height='16' width='16'> <%= html.html_escape(role) %></td>
+ <td>
[<a href='viewroleperms?role=<%= html.html_escape(role) %>'>View this role</a>]
[<a href='editrole?role=<%= html.html_escape(role) %>&redir=<%= html.html_escape(page_info.orig_action) %>'>Edit this role</a>]
[<a href='deleterole?role=<%= html.html_escape(role) %>&submit=true'>Delete this role</a>]
- </dd></TD></TR>
+ </td></tr>
<% end %>
<% end %>
<% if view.value.default_roles then %>
<% for x,role in pairs(view.value.default_roles.value) do %>
- <TR><TD><dt><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/categories/applications-system.png' height='16' width='16'> <%= html.html_escape(role) %></dt>
- <dd>
+ <tr><td><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/categories/applications-system.png' height='16' width='16'> <%= html.html_escape(role) %></td>
+ <td>
[<a href='viewroleperms?role=<%= html.html_escape(role) %>'>View this role</a>]
[<a href='editrole?role=<%= html.html_escape(role) %>&redir=<%= html.html_escape(page_info.orig_action) %>'>Edit this role</a>]
- </dd></TD></TR>
+ </td></tr>
<% end %>
<% end %>
-</TABLE>
-</DL>
+</tbody></table>
diff --git a/app/acf-util/skins-read-html.lsp b/app/acf-util/skins-read-html.lsp
index dff5ae2..c2e0456 100644
--- a/app/acf-util/skins-read-html.lsp
+++ b/app/acf-util/skins-read-html.lsp
@@ -6,13 +6,13 @@
<h1>Available skins</h1>
-<DL>
<% for i,skin in ipairs(view.value) do %>
- <dt><%= html.html_escape(skin.value) %></dt>
+ <div class='item'><p class='left'><%= html.html_escape(skin.value) %></p>
+ <div class='right'>
<% if (skin.inuse) then %>
- <dd>in use</dd>
+ in use
<% else %>
- <dd>[<a href="update?skin=<%= html.html_escape(skin.value) %>&submit=true">use this skin</a>]</dd>
+ [<a href="update?skin=<%= html.html_escape(skin.value) %>&submit=true">use this skin</a>]
<% end %>
+ </div></div><!-- end .item -->
<% end %>
-</DL>
diff --git a/app/acf-util/welcome-html.lsp b/app/acf-util/welcome-html.lsp
index 7540b94..6a22375 100644
--- a/app/acf-util/welcome-html.lsp
+++ b/app/acf-util/welcome-html.lsp
@@ -1,7 +1,7 @@
<% view = ... %>
<% htmlviewfunctions = require("htmlviewfunctions") %>
<h1>Alpine Configuration Framework</h1>
-<DL><p>Welcome.</p></DL>
+<p>Welcome.</p>
<% --[[
io.write(htmlviewfunctions.cfe_unpack(view))
diff --git a/app/debug-html.lsp b/app/debug-html.lsp
index f857b4f..bf593f7 100644
--- a/app/debug-html.lsp
+++ b/app/debug-html.lsp
@@ -1,9 +1,9 @@
<% local data, viewlibrary, page_info, session = ... %>
<% htmlviewfunctions = require("htmlviewfunctions") %>
-<H1>Debugging</H1>
-<H2>View Data:</H2>
+<h1>Debugging</h1>
+<h2>View Data:</h2>
<%= htmlviewfunctions.cfe_unpack(data) %>
-<H2>Session:</H2>
+<h2>Session:</h2>
<%= htmlviewfunctions.cfe_unpack(session) %>
-<H2>Page Info:</H2>
+<h2>Page Info:</h2>
<%= htmlviewfunctions.cfe_unpack(page_info) %>
diff --git a/app/filedetails-html.lsp b/app/filedetails-html.lsp
index 1d5f446..2901841 100644
--- a/app/filedetails-html.lsp
+++ b/app/filedetails-html.lsp
@@ -3,36 +3,30 @@
<% html = require("acf.html") %>
<% if form.type == "form" then %>
-<H1>Configuration</H1>
-<H2>Expert Configuration</H2>
+<h1>Configuration</h1>
+<h2>Expert Configuration</h2>
<% else %>
-<H1>View File</H1>
+<h1>View File</h1>
<% end %>
-<H3>File Details</H3>
-<DL>
+<h3>File Details</h3>
<%
htmlviewfunctions.displayitem(form.value.filename)
htmlviewfunctions.displayitem(form.value.filesize)
htmlviewfunctions.displayitem(form.value.mtime)
%>
-</DL>
-<H3>File Content</H3>
+<h3>File Content</h3>
<% if form.type == "form" then %>
<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>
<% htmlviewfunctions.displayformstart(form) %>
<input type="hidden" name="filename" value="<%= html.html_escape(form.value.filename.value) %>">
-<% else %>
-<DL>
<% end %>
<textarea name="filecontent">
<%= html.html_escape(form.value.filecontent.value) %>
</textarea>
-<% if form.value.filecontent.errtxt then %><P CLASS='error'><%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "<BR>") %></P><% end %>
-<% if form.value.filecontent.descr then %><P CLASS='descr'><%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "<BR>") %></P><% end %>
+<% if form.value.filecontent.errtxt then %><p class='error'><%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "<br/>") %></p><% end %>
+<% if form.value.filecontent.descr then %><p class='descr'><%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "<br/>") %></p><% end %>
<% if form.type == "form" then %>
<% htmlviewfunctions.displayformend(form) %>
-<% else %>
-</DL>
<% end %>
diff --git a/app/status-html.lsp b/app/status-html.lsp
index d8f7b37..8fa6b33 100644
--- a/app/status-html.lsp
+++ b/app/status-html.lsp
@@ -6,31 +6,31 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"install","edit"}, session) %>
<% htmlviewfunctions.displaycommandresults({"startstop"}, session) %>
-<H1>System Info</H1>
-<DL>
+<h1>System Info</h1>
<%
htmlviewfunctions.displayitem(data.value.status)
htmlviewfunctions.displayitem(data.value.version)
if data.value.version and data.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then
%>
- <DT>Install package</DT>
- <DD><form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="POST">
+ <div class='item'><p class='left'>Install package</p>
+ <div class='right'><form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="post">
<input type='hidden' name='package' value='<%= html.html_escape(data.value.version.name) %>'>
- <input class='submit' type='submit' name='submit' value='Install'></form></DD>
+ <input class='submit' type='submit' name='submit' value='Install'></form>
+ </div></div><!-- end .item -->
<%
end
htmlviewfunctions.displayitem(data.value.autostart)
if not (data.value.version and data.value.version.errtxt) and data.value.autostart and data.value.autostart.errtxt and viewlibrary.check_permission("alpine-baselayout/rc/edit") then
%>
- <DT>Enable autostart</DT>
- <DD><form action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit") %>" method="POST">
+ <div class='item'><p class='left'>Enable autostart</p>
+ <div class='right'><form action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit") %>" method="POST">
<input type='hidden' name='servicename' value='<%= html.html_escape(data.value.autostart.name) %>'>
<input type='hidden' name='redir' value='<%= html.html_escape(page_info.orig_action) %>'>
- <input class='submit' type='submit' value='Enable'></form></DD>
+ <input class='submit' type='submit' value='Enable'></form>
+ </div></div><!-- end .item -->
<% end %>
-</DL>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("startstop") then
viewlibrary.dispatch_component("startstop")