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:
commit
faae184f1c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user