mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Emit nodes:change event for config node users list modified
This commit is contained in:
parent
e3c8466819
commit
5b1fe9aa0a
@ -331,10 +331,12 @@ RED.history = (function() {
|
||||
var currentConfigNode = RED.nodes.node(ev.node[i]);
|
||||
if (currentConfigNode) {
|
||||
currentConfigNode.users.splice(currentConfigNode.users.indexOf(ev.node),1);
|
||||
RED.events.emit("nodes:change",currentConfigNode);
|
||||
}
|
||||
var newConfigNode = RED.nodes.node(ev.changes[i]);
|
||||
if (newConfigNode) {
|
||||
newConfigNode.users.push(ev.node);
|
||||
RED.events.emit("nodes:change",newConfigNode);
|
||||
}
|
||||
}
|
||||
ev.node[i] = ev.changes[i];
|
||||
|
@ -1283,10 +1283,12 @@ RED.editor = (function() {
|
||||
if (configNode) {
|
||||
var users = configNode.users;
|
||||
users.splice(users.indexOf(editing_node),1);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
configNode = RED.nodes.node(newValue);
|
||||
if (configNode) {
|
||||
configNode.users.push(editing_node);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
}
|
||||
changes[d] = editing_node[d];
|
||||
@ -1911,10 +1913,12 @@ RED.editor = (function() {
|
||||
if (configNode) {
|
||||
var users = configNode.users;
|
||||
users.splice(users.indexOf(editing_config_node),1);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
configNode = RED.nodes.node(newValue);
|
||||
if (configNode) {
|
||||
configNode.users.push(editing_config_node);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
}
|
||||
editing_config_node[d] = newValue;
|
||||
@ -2503,10 +2507,12 @@ RED.editor = (function() {
|
||||
if (configNode) {
|
||||
var users = configNode.users;
|
||||
users.splice(users.indexOf(editing_node),1);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
configNode = RED.nodes.node(newValue);
|
||||
if (configNode) {
|
||||
configNode.users.push(editing_node);
|
||||
RED.events.emit("nodes:change",configNode);
|
||||
}
|
||||
}
|
||||
changes[d] = editing_node[d];
|
||||
|
Loading…
Reference in New Issue
Block a user