summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-commands/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-11-21 18:36:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-11-21 18:36:43 +0000
commit3451d533e561b186ed38ff50ff3d5b0c58aede17 (patch)
tree737f533f9e964d9cb5623ddef404b7c77ec52bc5 /applications/luci-commands/luasrc/view
parent1a530635c930a7a23b6ff941c89365dd5e692198 (diff)
applications/luci-commands: improve dashboard html, remove inline styles, fix layout for both openwrt and bootstrap themes, use command basename when naming output download
Diffstat (limited to 'applications/luci-commands/luasrc/view')
-rw-r--r--applications/luci-commands/luasrc/view/commands.htm37
1 files changed, 33 insertions, 4 deletions
diff --git a/applications/luci-commands/luasrc/view/commands.htm b/applications/luci-commands/luasrc/view/commands.htm
index 888033c271..83792a91fd 100644
--- a/applications/luci-commands/luasrc/view/commands.htm
+++ b/applications/luci-commands/luasrc/view/commands.htm
@@ -10,6 +10,35 @@ You may obtain a copy of the License at
-%>
+<% css = [[
+
+.commandbox {
+ height: 12em;
+ width: 30%;
+ float: left;
+ height: 12em;
+ margin: 5px;
+ position: relative;
+}
+
+.commandbox h3 {
+ font-size: 1.5em !important;
+ line-height: 2em !important;
+ margin: 0 !important;
+}
+
+.commandbox input[type="text"] {
+ width: 50% !important;
+}
+
+.commandbox div {
+ position: absolute;
+ left: 0;
+ bottom: 1.5em;
+}
+
+]] -%>
+
<%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
@@ -94,7 +123,7 @@ You may obtain a copy of the License at
legend.style.display = 'none';
output.parentNode.style.display = 'block';
output.innerHTML = String.format(
- '<div class="alert-message warning"><%:Access command with%> <a href="%s">%s</a></div>',
+ '<div class="alert-message"><%:Access command with%> <a href="%s">%s</a></div>',
link, link
);
@@ -117,13 +146,13 @@ You may obtain a copy of the License at
<fieldset class="cbi-section">
<% local _, command; for _, command in ipairs(commands) do %>
- <div style="width:30%; float:left; height:150px; position:relative">
+ <div class="commandbox">
<h3><%=pcdata(command.name)%></h3>
<p><%:Command:%> <code><%=pcdata(command.command)%></code></p>
<% if command.param == "1" then %>
- <p><%:Arguments:%> <input style="width: 50%" type="text" id="<%=command['.name']%>" /></p>
+ <p><%:Arguments:%> <input type="text" id="<%=command['.name']%>" /></p>
<% end %>
- <div style="position:absolute; left:0; bottom:20px">
+ <div>
<input type="button" value="<%:Run%>" class="cbi-button cbi-button-apply" onclick="command_run('<%=command['.name']%>')" />
<input type="button" value="<%:Download%>" class="cbi-button cbi-button-download" onclick="command_download('<%=command['.name']%>')" />
<% if command.public == "1" then %>