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

Fix dynamically loading multiple node-sets from palette editor

This commit is contained in:
Nick O'Leary 2016-12-01 15:27:29 +00:00
parent 671d7e2beb
commit f68acca427

View File

@ -98,11 +98,9 @@
var i,m; var i,m;
var typeList; var typeList;
var info; var info;
if (topic == "node/added") { if (topic == "node/added") {
var addedTypes = []; var addedTypes = [];
for (i=0;i<msg.length;i++) { msg.forEach(function(m) {
m = msg[i];
var id = m.id; var id = m.id;
RED.nodes.addNodeSet(m); RED.nodes.addNodeSet(m);
addedTypes = addedTypes.concat(m.types); addedTypes = addedTypes.concat(m.types);
@ -111,7 +109,7 @@
$("body").append(data); $("body").append(data);
}); });
}); });
} });
if (addedTypes.length) { if (addedTypes.length) {
typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>"; typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success"); RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");