From 62876ca3779f7f8e76fc5835ce838007e66c71bf Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 10 Apr 2017 16:11:01 +0100 Subject: [PATCH] Toggling debug node enabled/disabled state should set state dirty Fixes #1203 --- nodes/core/core/58-debug.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nodes/core/core/58-debug.html b/nodes/core/core/58-debug.html index c421c0604..5eab64fad 100644 --- a/nodes/core/core/58-debug.html +++ b/nodes/core/core/58-debug.html @@ -83,6 +83,19 @@ url: "debug/"+this.id+"/"+(this.active?"enable":"disable"), type: "POST", 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) { RED.notify(node._("debug.notification.activated",{label:label}),"success"); } else if (xhr.status == 201) {