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

Disable inject-now button if inside subflow

This commit is contained in:
Nick O'Leary 2021-06-08 10:56:34 +01:00
parent 9b46dbaff1
commit c8bcd2818d
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 8 additions and 3 deletions

View File

@ -488,12 +488,12 @@
/* */
var eList = $('#node-input-property-container').css('min-height','120px').css('min-width','450px');
eList.editableList({
buttons: [
{
id: "node-inject-test-inject-button",
label: node._("inject.inject"),
icon: "fa fa-bolt",
label: node._("inject.injectNow"),
click: function(e) {
var items = eList.editableList('items');
var result = getProps(items);
@ -538,7 +538,11 @@
removable: true,
sortable: true
});
$('#node-inject-test-inject-button').addClass('primary').css("float", "right").css("margin-right", "unset");
$('#node-inject-test-inject-button').css("float", "right").css("margin-right", "unset");
if (RED.nodes.subflow(node.z)) {
$('#node-inject-test-inject-button').attr("disabled",true);
}
if (!node.props) {
var payload = {

View File

@ -32,6 +32,7 @@
},
"inject": {
"inject": "inject",
"injectNow": "inject now",
"repeat": "repeat = __repeat__",
"crontab": "crontab = __crontab__",
"stopped": "stopped",