User interface improvements part #3
This commit is contained in:
parent
fce1109817
commit
e42779fcab
14 changed files with 194 additions and 55 deletions
|
@ -159,8 +159,10 @@ a_w_apisolation1 = "Prevents Client to Client communication"
|
||||||
a_w_hideessid = "Hide ESSID"
|
a_w_hideessid = "Hide ESSID"
|
||||||
a_w_ap = "Access Point"
|
a_w_ap = "Access Point"
|
||||||
a_w_adhoc = "Ad-Hoc"
|
a_w_adhoc = "Ad-Hoc"
|
||||||
|
a_w_ahdemo = "Pseudo Ad-Hoc (ahdemo)"
|
||||||
a_w_client = "Client"
|
a_w_client = "Client"
|
||||||
a_w_wds = "WDS"
|
a_w_wds = "WDS"
|
||||||
|
a_w_monitor = "Monitor"
|
||||||
|
|
||||||
dhcp_desc = "Dnsmasq is a combined DHCP-Server and DNS-Forwarder for NAT firewalls"
|
dhcp_desc = "Dnsmasq is a combined DHCP-Server and DNS-Forwarder for NAT firewalls"
|
||||||
dhcp_dnsmasq_domainneeded = "Domain required"
|
dhcp_dnsmasq_domainneeded = "Domain required"
|
||||||
|
|
|
@ -145,6 +145,8 @@ Kommunikation.]]
|
||||||
a_w_ap = "Access Point"
|
a_w_ap = "Access Point"
|
||||||
a_w_adhoc = "Ad-Hoc"
|
a_w_adhoc = "Ad-Hoc"
|
||||||
a_w_client = "Client"
|
a_w_client = "Client"
|
||||||
|
a_w_ahdemo = "Pseudo Ad-Hoc (ahdemo)"
|
||||||
|
a_w_monitor = "Monitor"
|
||||||
a_w_wds = "WDS"
|
a_w_wds = "WDS"
|
||||||
accept = [[Annehmen]]
|
accept = [[Annehmen]]
|
||||||
aliases = [[Aliasse]]
|
aliases = [[Aliasse]]
|
||||||
|
|
|
@ -7,7 +7,16 @@ function cbi_d_add(field, target, value) {
|
||||||
if (!cbi_d[target][value]) {
|
if (!cbi_d[target][value]) {
|
||||||
cbi_d[target][value] = [];
|
cbi_d[target][value] = [];
|
||||||
}
|
}
|
||||||
cbi_d[target][value].push(field);
|
|
||||||
|
var obj = document.getElementById(field);
|
||||||
|
if (obj) {
|
||||||
|
var entry = {
|
||||||
|
"node": obj,
|
||||||
|
"parent": obj.parentNode,
|
||||||
|
"next": obj.nextSibling
|
||||||
|
}
|
||||||
|
cbi_d[target][value].unshift(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cbi_d_update(target) {
|
function cbi_d_update(target) {
|
||||||
|
@ -17,16 +26,34 @@ function cbi_d_update(target) {
|
||||||
|
|
||||||
for (var x in cbi_d[target]) {
|
for (var x in cbi_d[target]) {
|
||||||
for (var i=0; i<cbi_d[target][x].length; i++) {
|
for (var i=0; i<cbi_d[target][x].length; i++) {
|
||||||
var y = document.getElementById(cbi_d[target][x][i])
|
var entry = cbi_d[target][x][i];
|
||||||
y.style.display = "none";
|
if (entry.node.parentNode) {
|
||||||
|
entry.parent.removeChild(entry.node)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var t = document.getElementById(target);
|
var t = document.getElementById(target);
|
||||||
if (t && t.value && cbi_d[target][t.value]) {
|
var value
|
||||||
for (var i=0; i<cbi_d[target][t.value].length; i++) {
|
|
||||||
var y = document.getElementById(cbi_d[target][t.value][i])
|
if (!t || !t.value) {
|
||||||
y.style.display = "block";
|
value = "";
|
||||||
|
} else {
|
||||||
|
value = t.value;
|
||||||
|
|
||||||
|
if (t.type == "checkbox") {
|
||||||
|
value = t.checked ? value : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cbi_d[target][value]) {
|
||||||
|
for (var i=0; i<cbi_d[target][value].length; i++) {
|
||||||
|
var entry = cbi_d[target][value][i];
|
||||||
|
if (!entry.next) {
|
||||||
|
entry.parent.appendChild(entry.node);
|
||||||
|
} else {
|
||||||
|
entry.parent.insertBefore(entry.node, entry.next);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
libs/cbi/htdocs/luci-static/resources/cbi/download.gif
Normal file
BIN
libs/cbi/htdocs/luci-static/resources/cbi/download.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 B |
BIN
libs/cbi/htdocs/luci-static/resources/cbi/key.gif
Normal file
BIN
libs/cbi/htdocs/luci-static/resources/cbi/key.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 230 B |
BIN
libs/cbi/htdocs/luci-static/resources/cbi/link.gif
Normal file
BIN
libs/cbi/htdocs/luci-static/resources/cbi/link.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 291 B |
BIN
libs/cbi/htdocs/luci-static/resources/cbi/user.gif
Normal file
BIN
libs/cbi/htdocs/luci-static/resources/cbi/user.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 246 B |
|
@ -24,16 +24,16 @@ $Id$
|
||||||
<div class="cbi-section-node">
|
<div class="cbi-section-node">
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<div class="cbi-value-title"><%:username%></div>
|
<div class="cbi-value-title"><%:username%></div>
|
||||||
<div class="cbi-value-field"><input type="text" name="username" value="<%=duser%>" /></div>
|
<div class="cbi-value-field"><input class="cbi-input-user" type="text" name="username" value="<%=duser%>" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<div class="cbi-value-title"><%:password%></div>
|
<div class="cbi-value-title"><%:password%></div>
|
||||||
<div class="cbi-value-field"><input type="password" name="password" /></div>
|
<div class="cbi-value-field"><input class="cbi-input-key" type="password" name="password" /></div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" value="<%:login%>" />
|
<input type="submit" class="cbi-button cbi-button-apply" value="<%:login%>" />
|
||||||
<input type="reset" value="<%:reset%>" />
|
<input type="reset" class="cbi-button cbi-button-reset" value="<%:reset%>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -47,7 +47,8 @@ s:option(Flag, "dynamicdhcp").rmempty = true
|
||||||
|
|
||||||
s:option(Value, "name", translate("name")).optional = true
|
s:option(Value, "name", translate("name")).optional = true
|
||||||
|
|
||||||
s:option(Flag, "ignore").optional = true
|
ignore = s:option(Flag, "ignore")
|
||||||
|
ignore.optional = true
|
||||||
|
|
||||||
s:option(Value, "netmask", translate("netmask")).optional = true
|
s:option(Value, "netmask", translate("netmask")).optional = true
|
||||||
|
|
||||||
|
@ -58,6 +59,14 @@ for i, line in pairs(luci.util.execl("dnsmasq --help dhcp")) do
|
||||||
s:option(Value, "dhcp"..k, v).optional = true
|
s:option(Value, "dhcp"..k, v).optional = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
for i, n in ipairs(s.children) do
|
||||||
|
if n ~= iface and n ~= ignore then
|
||||||
|
n:depends("ignore", "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
m2 = Map("luci_ethers", translate("luci_ethers"))
|
m2 = Map("luci_ethers", translate("luci_ethers"))
|
||||||
|
|
||||||
s = m2:section(TypedSection, "static_lease", "")
|
s = m2:section(TypedSection, "static_lease", "")
|
||||||
|
|
|
@ -113,6 +113,11 @@ mtu.isinteger = true
|
||||||
mac = s:option(Value, "macaddr", translate("macaddress"))
|
mac = s:option(Value, "macaddr", translate("macaddress"))
|
||||||
mac.optional = true
|
mac.optional = true
|
||||||
|
|
||||||
|
|
||||||
|
srv = s:option(Value, "server", translate("network_interface_server"))
|
||||||
|
srv:depends("proto", "pptp")
|
||||||
|
srv.rmempty = true
|
||||||
|
|
||||||
user = s:option(Value, "username", translate("username"))
|
user = s:option(Value, "username", translate("username"))
|
||||||
user.rmempty = true
|
user.rmempty = true
|
||||||
user:depends("proto", "pptp")
|
user:depends("proto", "pptp")
|
||||||
|
@ -139,10 +144,6 @@ demand.rmempty = true
|
||||||
demand:depends("proto", "pptp")
|
demand:depends("proto", "pptp")
|
||||||
demand:depends("proto", "pppoe")
|
demand:depends("proto", "pppoe")
|
||||||
|
|
||||||
srv = s:option(Value, "server", translate("network_interface_server"))
|
|
||||||
srv:depends("proto", "pptp")
|
|
||||||
srv.rmempty = true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,10 @@ luci.model.uci.foreach("network", "interface",
|
||||||
mode = s:option(ListValue, "mode", translate("mode"))
|
mode = s:option(ListValue, "mode", translate("mode"))
|
||||||
mode:value("ap", translate("a_w_ap"))
|
mode:value("ap", translate("a_w_ap"))
|
||||||
mode:value("adhoc", translate("a_w_adhoc"))
|
mode:value("adhoc", translate("a_w_adhoc"))
|
||||||
|
mode:value("ahdemo", translate("a_w_ahdemo"))
|
||||||
mode:value("sta", translate("a_w_client"))
|
mode:value("sta", translate("a_w_client"))
|
||||||
mode:value("wds", translate("a_w_wds"))
|
mode:value("wds", translate("a_w_wds"))
|
||||||
|
mode:value("monitor", translate("a_w_monitor"))
|
||||||
|
|
||||||
s:option(Value, "bssid", "BSSID").optional = true
|
s:option(Value, "bssid", "BSSID").optional = true
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ select:focus,
|
||||||
select:hover,
|
select:hover,
|
||||||
textarea:focus,
|
textarea:focus,
|
||||||
textarea:hover {
|
textarea:hover {
|
||||||
background: #f2f3f9;
|
background-color: #f2f3f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
select,
|
||||||
|
@ -263,35 +263,67 @@ td input[type=password] {
|
||||||
width: 99%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button {
|
input.cbi-input-user {
|
||||||
|
background: url('../resources/cbi/user.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-key {
|
||||||
|
background: url('../resources/cbi/key.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-add,
|
||||||
|
input.cbi-button-add {
|
||||||
|
background: url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
padding-left: 17px;
|
padding-left: 17px;
|
||||||
padding-right: 1px;
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button-add {
|
input.cbi-input-fieldadd,
|
||||||
background: transparent url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.cbi-button-fieldadd {
|
input.cbi-button-fieldadd {
|
||||||
background: transparent url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-reset,
|
||||||
input.cbi-button-reset {
|
input.cbi-button-reset {
|
||||||
background: transparent url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-save,
|
||||||
input.cbi-button-save {
|
input.cbi-button-save {
|
||||||
background: transparent url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-apply,
|
||||||
input.cbi-button-apply {
|
input.cbi-button-apply {
|
||||||
background: transparent url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-remove,
|
||||||
|
div.cbi-section-remove input {
|
||||||
|
background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.cbi-section-remove input {
|
div.cbi-section-remove input {
|
||||||
background: transparent url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
|
||||||
padding-left: 17px;
|
|
||||||
padding-right: 1px;
|
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ select:focus,
|
||||||
select:hover,
|
select:hover,
|
||||||
textarea:focus,
|
textarea:focus,
|
||||||
textarea:hover {
|
textarea:hover {
|
||||||
background: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
select,
|
||||||
|
@ -248,35 +248,67 @@ td input[type=password] {
|
||||||
width: 99%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button {
|
input.cbi-input-user {
|
||||||
|
background: url('../resources/cbi/user.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-key {
|
||||||
|
background: url('../resources/cbi/key.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-add,
|
||||||
|
input.cbi-button-add {
|
||||||
|
background: url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
padding-left: 17px;
|
padding-left: 17px;
|
||||||
padding-right: 1px;
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button-add {
|
input.cbi-input-fieldadd,
|
||||||
background: transparent url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.cbi-button-fieldadd {
|
input.cbi-button-fieldadd {
|
||||||
background: transparent url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-reset,
|
||||||
input.cbi-button-reset {
|
input.cbi-button-reset {
|
||||||
background: transparent url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-save,
|
||||||
input.cbi-button-save {
|
input.cbi-button-save {
|
||||||
background: transparent url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-apply,
|
||||||
input.cbi-button-apply {
|
input.cbi-button-apply {
|
||||||
background: transparent url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-remove,
|
||||||
|
div.cbi-section-remove input {
|
||||||
|
background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.cbi-section-remove input {
|
div.cbi-section-remove input {
|
||||||
background: transparent url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
|
||||||
padding-left: 17px;
|
|
||||||
padding-right: 1px;
|
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ select:focus,
|
||||||
select:hover,
|
select:hover,
|
||||||
textarea:focus,
|
textarea:focus,
|
||||||
textarea:hover {
|
textarea:hover {
|
||||||
background: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
select,
|
select,
|
||||||
|
@ -256,35 +256,67 @@ td input[type=password] {
|
||||||
width: 99%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button {
|
input.cbi-input-user {
|
||||||
|
background: url('../resources/cbi/user.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-key {
|
||||||
|
background: url('../resources/cbi/key.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-add,
|
||||||
|
input.cbi-button-add {
|
||||||
|
background: url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
padding-left: 17px;
|
padding-left: 17px;
|
||||||
padding-right: 1px;
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.cbi-button-add {
|
input.cbi-input-fieldadd,
|
||||||
background: transparent url('../resources/cbi/add.gif') no-repeat scroll 1px center;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.cbi-button-fieldadd {
|
input.cbi-button-fieldadd {
|
||||||
background: transparent url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-reset,
|
||||||
input.cbi-button-reset {
|
input.cbi-button-reset {
|
||||||
background: transparent url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-save,
|
||||||
input.cbi-button-save {
|
input.cbi-button-save {
|
||||||
background: transparent url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/save.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.cbi-input-apply,
|
||||||
input.cbi-button-apply {
|
input.cbi-button-apply {
|
||||||
background: transparent url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.cbi-input-remove,
|
||||||
|
div.cbi-section-remove input {
|
||||||
|
background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
||||||
|
background-color: inherit;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.cbi-section-remove input {
|
div.cbi-section-remove input {
|
||||||
background: transparent url('../resources/cbi/remove.gif') no-repeat scroll 1px center;
|
|
||||||
padding-left: 17px;
|
|
||||||
padding-right: 1px;
|
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue