Commit b7cfe6a7 by Őry Máté

network: use dot notation in js

parent 4e337898
......@@ -47,18 +47,18 @@ $("#ipv6-magic").click(function() {
data: {ipv4: $("[name=ipv4]").val(),
vlan: $("[name=vlan]").val()},
success: function(data) {
$("[name=ipv6]").val(data["ipv6"]);
$("[name=ipv6]").val(data.ipv6);
}});
});
$("#ipv4-magic").click(function() {
$.ajax({url: window.location,
data: {vlan: $("[name=vlan]").val()},
success: function(data) {
$("[name=ipv4]").val(data["ipv4"]);
if ($("[name=ipv6]").val() != data["ipv6"]) {
$("[name=ipv4]").val(data.ipv4);
if ($("[name=ipv6]").val() != data.ipv6) {
doBlink("[name=ipv6]", 3);
}
$("[name=ipv6]").val(data["ipv6"]);
$("[name=ipv6]").val(data.ipv6);
}});
});
$("#ipv6-tpl-magic").click(function() {
......@@ -66,11 +66,11 @@ $("#ipv6-tpl-magic").click(function() {
data: {network4: $("[name=network4]").val(),
network6: $("[name=network6]").val()},
success: function(data) {
$("[name=ipv6_template]").val(data["ipv6_template"]);
if ($("[name=host_ipv6_prefixlen]").val() != data["host_ipv6_prefixlen"]) {
$("[name=ipv6_template]").val(data.ipv6_template);
if ($("[name=host_ipv6_prefixlen]").val() != data.host_ipv6_prefixlen) {
doBlink("[name=host_ipv6_prefixlen]", 3);
}
$("[name=host_ipv6_prefixlen]").val(data["host_ipv6_prefixlen"]);
$("[name=host_ipv6_prefixlen]").val(data.host_ipv6_prefixlen);
}});
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment