summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua31
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua64
2 files changed, 51 insertions, 44 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua
index 08494644b..799386d29 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/network.lua
@@ -38,31 +38,34 @@ local tpl_networks = tpl.Template(nil, [[
</div>
</div>
</div>
- <div class="td col-5 left" id="<%=net[1]%>-ifc-description">
+ <div class="td col-5 left middle" id="<%=net[1]%>-ifc-description">
<em><%:Collecting data...%></em>
</div>
<div class="td cbi-section-actions">
- <input type="button" class="cbi-button cbi-button-neutral" onclick="iface_reconnect('<%=net[1]%>')" title="<%:Reconnect this interface%>" value="<%:Restart%>"<%=ifattr(disabled or dynamic, "disabled", "disabled")%> />
+ <div>
+ <input type="button" class="cbi-button cbi-button-neutral" onclick="iface_reconnect('<%=net[1]%>')" title="<%:Reconnect this interface%>" value="<%:Restart%>"<%=ifattr(disabled or dynamic, "disabled", "disabled")%> />
- <% if disabled then %>
- <input type="hidden" name="cbid.network.<%=net[1]%>.__disable__" value="1" />
- <input type="submit" name="cbi.apply" class="cbi-button cbi-button-neutral" onclick="this.previousElementSibling.value='0'" title="<%:Reconnect this interface%>" value="<%:Connect%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
- <% else %>
- <input type="hidden" name="cbid.network.<%=net[1]%>.__disable__" value="0" />
- <input type="submit" name="cbi.apply" class="cbi-button cbi-button-neutral" onclick="this.previousElementSibling.value='1'" title="<%:Shutdown this interface%>" value="<%:Stop%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
- <% end %>
+ <% if disabled then %>
+ <input type="hidden" name="cbid.network.<%=net[1]%>.__disable__" value="1" />
+ <input type="submit" name="cbi.apply" class="cbi-button cbi-button-neutral" onclick="this.previousElementSibling.value='0'" title="<%:Reconnect this interface%>" value="<%:Connect%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
+ <% else %>
+ <input type="hidden" name="cbid.network.<%=net[1]%>.__disable__" value="0" />
+ <input type="submit" name="cbi.apply" class="cbi-button cbi-button-neutral" onclick="this.previousElementSibling.value='1'" title="<%:Shutdown this interface%>" value="<%:Stop%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
+ <% end %>
- <input type="button" class="cbi-button cbi-button-action important" onclick="location.href='<%=url("admin/network/network", net[1])%>'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit"<%=ifattr(dynamic, "disabled", "disabled")%> />
+ <input type="button" class="cbi-button cbi-button-action important" onclick="location.href='<%=url("admin/network/network", net[1])%>'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit"<%=ifattr(dynamic, "disabled", "disabled")%> />
- <input type="hidden" name="cbid.network.<%=net[1]%>.__delete__" value="" />
- <input type="submit" name="cbi.apply" class="cbi-button cbi-button-negative" onclick="iface_delete(event)" value="<%:Delete%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
+ <input type="hidden" name="cbid.network.<%=net[1]%>.__delete__" value="" />
+ <input type="submit" name="cbi.apply" class="cbi-button cbi-button-negative" onclick="iface_delete(event)" value="<%:Delete%>"<%=ifattr(dynamic, "disabled", "disabled")%> />
+ </div>
</div>
</div>
<% end %>
</div>
</div>
-
- <input type="button" class="cbi-button cbi-button-add" value="<%:Add new interface...%>" onclick="location.href='<%=url("admin/network/iface_add")%>'" />
+ <div class="cbi-section-create">
+ <input type="button" class="cbi-button cbi-button-add" value="<%:Add new interface...%>" onclick="location.href='<%=url("admin/network/iface_add")%>'" />
+ </div>
]])
local _, net
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua
index 8e0e3b995..dda31fb1e 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua
@@ -69,26 +69,28 @@ local tpl_radio = tpl.Template(nil, [[
<div class="table">
<!-- physical device -->
<div class="tr cbi-rowstyle-2">
- <div class="td col-2 center">
+ <div class="td col-2 center middle">
<span class="ifacebadge"><img src="<%=resource%>/icons/wifi_toggled.png" id="<%=dev:name()%>-iw-upstate" /> <%=dev:name()%></span>
</div>
- <div class="td col-7 left">
+ <div class="td col-7 left middle">
<big><strong><%=hw%></strong></big><br />
<span id="<%=dev:name()%>-iw-devinfo"></span>
</div>
- <div class="td cbi-section-actions">
- <input type="button" class="cbi-button cbi-button-neutral" title="<%:Restart radio interface%>" value="<%:Restart%>" onclick="wifi_restart(event)" data-radio="<%=dev:name()%>" />
-
- <form action="<%=url('admin/network/wireless_join')%>" method="post" class="inline">
- <input type="hidden" name="device" value="<%=dev:name()%>" />
- <input type="hidden" name="token" value="<%=token%>" />
- <input type="submit" class="cbi-button cbi-button-action important" title="<%:Find and join network%>" value="<%:Scan%>" />
- </form>
- <form action="<%=url('admin/network/wireless_add')%>" method="post" class="inline">
- <input type="hidden" name="device" value="<%=dev:name()%>" />
- <input type="hidden" name="token" value="<%=token%>" />
- <input type="submit" class="cbi-button cbi-button-add" title="<%:Provide new network%>" value="<%:Add%>" />
- </form>
+ <div class="td middle cbi-section-actions">
+ <div>
+ <input type="button" class="cbi-button cbi-button-neutral" title="<%:Restart radio interface%>" value="<%:Restart%>" onclick="wifi_restart(event)" data-radio="<%=dev:name()%>" />
+
+ <form action="<%=url('admin/network/wireless_join')%>" method="post" class="inline">
+ <input type="hidden" name="device" value="<%=dev:name()%>" />
+ <input type="hidden" name="token" value="<%=token%>" />
+ <input type="submit" class="cbi-button cbi-button-action important" title="<%:Find and join network%>" value="<%:Scan%>" />
+ </form>
+ <form action="<%=url('admin/network/wireless_add')%>" method="post" class="inline">
+ <input type="hidden" name="device" value="<%=dev:name()%>" />
+ <input type="hidden" name="token" value="<%=token%>" />
+ <input type="submit" class="cbi-button cbi-button-add" title="<%:Provide new network%>" value="<%:Add%>" />
+ </form>
+ </div>
</div>
</div>
<!-- /physical device -->
@@ -97,25 +99,27 @@ local tpl_radio = tpl.Template(nil, [[
<% if #wnets > 0 then %>
<% for i, net in ipairs(wnets) do local disabled = (dev:get("disabled") == "1" or net:get("disabled") == "1") %>
<div class="tr cbi-rowstyle-<%=1 + ((i-1) % 2)%>">
- <div class="td col-2 center" id="<%=net:id()%>-iw-signal">
+ <div class="td col-2 center middle" id="<%=net:id()%>-iw-signal">
<span class="ifacebadge" title="<%:Not associated%>"><img src="<%=resource%>/icons/signal-<%= disabled and "none" or "0" %>.png" /> 0%</span>
</div>
- <div class="td col-7 left" id="<%=net:id()%>-iw-status" data-network="<%=net:id()%>" data-disabled="<%= disabled and "true" or "false" %>">
+ <div class="td col-7 left middle" id="<%=net:id()%>-iw-status" data-network="<%=net:id()%>" data-disabled="<%= disabled and "true" or "false" %>">
<em><%= disabled and translate("Wireless is disabled") or translate("Collecting data...") %></em>
</div>
- <div class="td cbi-section-actions">
- <% if disabled then %>
- <input name="cbid.wireless.<%=net:name()%>.__disable__" type="hidden" value="1" />
- <input name="cbi.apply" type="submit" class="cbi-button cbi-button-neutral" title="<%:Enable this network%>" value="<%:Enable%>" onclick="this.previousElementSibling.value='0'" />
- <% else %>
- <input name="cbid.wireless.<%=net:name()%>.__disable__" type="hidden" value="0" />
- <input name="cbi.apply" type="submit" class="cbi-button cbi-button-neutral" title="<%:Disable this network%>" value="<%:Disable%>" onclick="this.previousElementSibling.value='1'" />
- <% end %>
-
- <input type="button" class="cbi-button cbi-button-action important" onclick="location.href='<%=net:adminlink()%>'" title="<%:Edit this network%>" value="<%:Edit%>" />
-
- <input name="cbid.wireless.<%=net:name()%>.__delete__" type="hidden" value="" />
- <input name="cbi.apply" type="submit" class="cbi-button cbi-button-negative" title="<%:Delete this network%>" value="<%:Remove%>" onclick="wifi_delete(event)" />
+ <div class="td middle cbi-section-actions">
+ <div>
+ <% if disabled then %>
+ <input name="cbid.wireless.<%=net:name()%>.__disable__" type="hidden" value="1" />
+ <input name="cbi.apply" type="submit" class="cbi-button cbi-button-neutral" title="<%:Enable this network%>" value="<%:Enable%>" onclick="this.previousElementSibling.value='0'" />
+ <% else %>
+ <input name="cbid.wireless.<%=net:name()%>.__disable__" type="hidden" value="0" />
+ <input name="cbi.apply" type="submit" class="cbi-button cbi-button-neutral" title="<%:Disable this network%>" value="<%:Disable%>" onclick="this.previousElementSibling.value='1'" />
+ <% end %>
+
+ <input type="button" class="cbi-button cbi-button-action important" onclick="location.href='<%=net:adminlink()%>'" title="<%:Edit this network%>" value="<%:Edit%>" />
+
+ <input name="cbid.wireless.<%=net:name()%>.__delete__" type="hidden" value="" />
+ <input name="cbi.apply" type="submit" class="cbi-button cbi-button-negative" title="<%:Delete this network%>" value="<%:Remove%>" onclick="wifi_delete(event)" />
+ </div>
</div>
</div>
<% end %>