Fix select box handling in Safari

Fixes #928
This commit is contained in:
Nick O'Leary
2016-07-04 11:21:58 +01:00
parent b8f578862e
commit dc00870461
9 changed files with 42 additions and 43 deletions

View File

@@ -86,14 +86,14 @@
},
oneditprepare: function() {
var updateOptions = function() {
var sockettype = $("#node-input-server option:selected").val();
var sockettype = $("#node-input-server").val();
if (sockettype == "client") {
$("#node-input-host-row").show();
} else {
$("#node-input-host-row").hide();
}
var datamode = $("#node-input-datamode option:selected").val();
var datatype = $("#node-input-datatype option:selected").val();
var datamode = $("#node-input-datamode").val();
var datatype = $("#node-input-datatype").val();
if (datamode == "stream") {
if (datatype == "utf8") {
$("#node-row-newline").show();
@@ -181,7 +181,7 @@
},
oneditprepare: function() {
var updateOptions = function() {
var sockettype = $("#node-input-beserver option:selected").val();
var sockettype = $("#node-input-beserver").val();
if (sockettype == "reply") {
$("#node-input-port-row").hide();
$("#node-input-host-row").hide();

View File

@@ -90,7 +90,7 @@
},
oneditprepare: function() {
$("#node-input-multicast").change(function() {
var id = $("#node-input-multicast option:selected").val();
var id = $("#node-input-multicast").val();
if (id == "false") {
$(".node-input-group").hide();
$(".node-input-iface").hide();
@@ -202,12 +202,10 @@
var bindtarget = this._("udp.bind.target");
var type = this.outport==""?"random":"fixed";
$("#node-input-outport-type option").filter(function() {
return $(this).val() == type;
}).attr('selected',true);
$("#node-input-outport-type").val(type);
$("#node-input-outport-type").change(function() {
var type = $(this).children("option:selected").val();
var type = $(this).val();
if (type == "random") {
$("#node-input-outport").val("").hide();
} else {
@@ -217,7 +215,7 @@
$("#node-input-outport-type").change();
$("#node-input-multicast").change(function() {
var id = $("#node-input-multicast option:selected").val();
var id = $("#node-input-multicast").val();
if (id === "multi") {
$(".node-input-iface").show();
$("#node-input-addr-label").html('<i class="fa fa-list"></i> ' + grouplabel);
@@ -233,7 +231,7 @@
$("#node-input-addr-label").html('<i class="fa fa-list"></i> ' + addresslabel);
$("#node-input-addr")[0].placeholder = addressph;
}
var type = $(this).children("option:selected").val();
var type = $(this).val();
if (type == "false") {
$("#node-input-outport-type-random").html(bindrandom);
} else {