mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Toggling debug node enabled/disabled state should set state dirty
Fixes #1203
This commit is contained in:
parent
f987fa13ea
commit
62876ca377
@ -83,6 +83,19 @@
|
|||||||
url: "debug/"+this.id+"/"+(this.active?"enable":"disable"),
|
url: "debug/"+this.id+"/"+(this.active?"enable":"disable"),
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function(resp, textStatus, xhr) {
|
success: function(resp, textStatus, xhr) {
|
||||||
|
var historyEvent = {
|
||||||
|
t:'edit',
|
||||||
|
node:node,
|
||||||
|
changes:{
|
||||||
|
active: !node.active
|
||||||
|
},
|
||||||
|
dirty:node.dirty,
|
||||||
|
changed:node.changed
|
||||||
|
};
|
||||||
|
node.changed = true;
|
||||||
|
RED.nodes.dirty(true);
|
||||||
|
RED.history.push(historyEvent);
|
||||||
|
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
RED.notify(node._("debug.notification.activated",{label:label}),"success");
|
RED.notify(node._("debug.notification.activated",{label:label}),"success");
|
||||||
} else if (xhr.status == 201) {
|
} else if (xhr.status == 201) {
|
||||||
|
Loading…
Reference in New Issue
Block a user