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

Merge pull request #2090 from node-red-hitachi/fix-file-node-encoding-menu

Fix problem on displaying option label on Firefox
This commit is contained in:
Nick O'Leary 2019-03-13 10:46:23 +00:00 committed by GitHub
commit faae184f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);