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:
parent
9790211891
commit
44a0f1b505
@ -255,7 +255,9 @@ RED.palette.editor = (function() {
|
|||||||
nodeEntry.removeButton.hide();
|
nodeEntry.removeButton.hide();
|
||||||
} else {
|
} else {
|
||||||
nodeEntry.enableButton.removeClass('disabled');
|
nodeEntry.enableButton.removeClass('disabled');
|
||||||
|
if (moduleInfo.local) {
|
||||||
nodeEntry.removeButton.show();
|
nodeEntry.removeButton.show();
|
||||||
|
}
|
||||||
if (activeTypeCount === 0) {
|
if (activeTypeCount === 0) {
|
||||||
nodeEntry.enableButton.html(RED._('palette.editor.enableall'));
|
nodeEntry.enableButton.html(RED._('palette.editor.enableall'));
|
||||||
} else {
|
} else {
|
||||||
|
@ -281,6 +281,7 @@ function getModuleFiles(module) {
|
|||||||
}
|
}
|
||||||
nodeModuleFiles.forEach(function(node) {
|
nodeModuleFiles.forEach(function(node) {
|
||||||
nodeList[moduleFile.package.name].nodes[node.name] = node;
|
nodeList[moduleFile.package.name].nodes[node.name] = node;
|
||||||
|
nodeList[moduleFile.package.name].nodes[node.name].local = moduleFile.local || false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return nodeList;
|
return nodeList;
|
||||||
|
Loading…
Reference in New Issue
Block a user