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:
parent
9b46dbaff1
commit
c8bcd2818d
@ -488,12 +488,12 @@
|
|||||||
/* */
|
/* */
|
||||||
|
|
||||||
var eList = $('#node-input-property-container').css('min-height','120px').css('min-width','450px');
|
var eList = $('#node-input-property-container').css('min-height','120px').css('min-width','450px');
|
||||||
|
|
||||||
eList.editableList({
|
eList.editableList({
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
id: "node-inject-test-inject-button",
|
id: "node-inject-test-inject-button",
|
||||||
label: node._("inject.inject"),
|
label: node._("inject.injectNow"),
|
||||||
icon: "fa fa-bolt",
|
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
var items = eList.editableList('items');
|
var items = eList.editableList('items');
|
||||||
var result = getProps(items);
|
var result = getProps(items);
|
||||||
@ -538,7 +538,11 @@
|
|||||||
removable: true,
|
removable: true,
|
||||||
sortable: 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) {
|
if (!node.props) {
|
||||||
var payload = {
|
var payload = {
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
},
|
},
|
||||||
"inject": {
|
"inject": {
|
||||||
"inject": "inject",
|
"inject": "inject",
|
||||||
|
"injectNow": "inject now",
|
||||||
"repeat": "repeat = __repeat__",
|
"repeat": "repeat = __repeat__",
|
||||||
"crontab": "crontab = __crontab__",
|
"crontab": "crontab = __crontab__",
|
||||||
"stopped": "stopped",
|
"stopped": "stopped",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user