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

Palette editor fixes (#1033)

* ensure remove button is only enabled for local modules when refreshing palette editor

* ensure local field is propagated to the nodes when a new module is added to the registry
This commit is contained in:
telogis-nodered 2016-11-17 03:12:31 +13:00 committed by Nick O'Leary
parent 9790211891
commit 44a0f1b505
2 changed files with 4 additions and 1 deletions

View File

@ -255,7 +255,9 @@ RED.palette.editor = (function() {
nodeEntry.removeButton.hide();
} else {
nodeEntry.enableButton.removeClass('disabled');
nodeEntry.removeButton.show();
if (moduleInfo.local) {
nodeEntry.removeButton.show();
}
if (activeTypeCount === 0) {
nodeEntry.enableButton.html(RED._('palette.editor.enableall'));
} else {

View File

@ -281,6 +281,7 @@ function getModuleFiles(module) {
}
nodeModuleFiles.forEach(function(node) {
nodeList[moduleFile.package.name].nodes[node.name] = node;
nodeList[moduleFile.package.name].nodes[node.name].local = moduleFile.local || false;
});
});
return nodeList;