1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix problem on displaying option label on Firefox

This commit is contained in:
Hiroyasu Nishiyama 2019-03-13 19:17:32 +09:00
parent 58914e5c5f
commit 515a8a9bbb

View File

@ -219,10 +219,11 @@
oneditprepare: function() {
var node = this;
var encSel = $("#node-input-encoding");
var label = node._("file.encoding.none");
$("<option/>", {
value: "none",
label: node._("file.encoding.none")
}).appendTo(encSel);
label: label
}).text(label).appendTo(encSel);
encodings.forEach(function(item) {
if(Array.isArray(item)) {
var group = $("<optgroup/>", {
@ -233,14 +234,14 @@
$("<option/>", {
value: enc,
label: enc
}).appendTo(group);
}).text(enc).appendTo(group);
}
}
else {
$("<option/>", {
value: item,
label: item
}).appendTo(encSel);
}).text(item).appendTo(encSel);
}
});
encSel.val(node.encoding);
@ -277,10 +278,11 @@
oneditprepare: function() {
var node = this;
var encSel = $("#node-input-encoding");
var label = node._("file.encoding.none");
$("<option/>", {
value: "none",
label: node._("file.encoding.none")
}).appendTo(encSel);
label: label
}).text(label).appendTo(encSel);
encodings.forEach(function(item) {
if(Array.isArray(item)) {
var group = $("<optgroup/>", {
@ -291,14 +293,14 @@
$("<option/>", {
value: enc,
label: enc
}).appendTo(group);
}).text(enc).appendTo(group);
}
}
else {
$("<option/>", {
value: item,
label: item
}).appendTo(encSel);
}).text(item).appendTo(encSel);
}
});
encSel.val(node.encoding);