From 835ad294174112314644fd1242030d12f885922a Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 12 May 2017 22:22:47 +0100 Subject: [PATCH] Fix pop-out debug window for all the recent updates --- nodes/core/core/lib/debug/debug.js | 46 +++++++++++++++-------------- nodes/core/core/lib/debug/view.html | 3 +- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/nodes/core/core/lib/debug/debug.js b/nodes/core/core/lib/debug/debug.js index ac02543e3..d8e63e12b 100644 --- a/nodes/core/core/lib/debug/debug.js +++ b/nodes/core/core/lib/debug/debug.js @@ -1,28 +1,30 @@ $(function() { - var options = { - messageMouseEnter: function(sourceId) { - window.opener.postMessage({event:"mouseEnter",id:sourceId},'*'); - }, - messageMouseLeave: function(sourceId) { - window.opener.postMessage({event:"mouseLeave",id:sourceId},'*'); - }, - messageSourceClick: function(sourceId) { - window.opener.postMessage({event:"mouseClick",id:sourceId},'*'); - }, - clear: function() { - window.opener.postMessage({event:"clear"},'*'); + RED.i18n.init(function() { + var options = { + messageMouseEnter: function(sourceId) { + window.opener.postMessage({event:"mouseEnter",id:sourceId},'*'); + }, + messageMouseLeave: function(sourceId) { + window.opener.postMessage({event:"mouseLeave",id:sourceId},'*'); + }, + messageSourceClick: function(sourceId) { + window.opener.postMessage({event:"mouseClick",id:sourceId},'*'); + }, + clear: function() { + window.opener.postMessage({event:"clear"},'*'); + } } - } - var uiComponents = RED.debug.init(options); + var uiComponents = RED.debug.init(options); - $(".debug-window").append(uiComponents.content); + $(".debug-window").append(uiComponents.content); - window.addEventListener('message',function(evt) { - if (evt.data.event === "message") { - RED.debug.handleDebugMessage(evt.data.msg); - } else if (evt.data.event === "workspaceChange") { - RED.debug.refreshMessageList(evt.data.activeWorkspace); - } - },false); + window.addEventListener('message',function(evt) { + if (evt.data.event === "message") { + RED.debug.handleDebugMessage(evt.data.msg); + } else if (evt.data.event === "workspaceChange") { + RED.debug.refreshMessageList(evt.data.activeWorkspace); + } + },false); + }) }); diff --git a/nodes/core/core/lib/debug/view.html b/nodes/core/core/lib/debug/view.html index 964f633f5..35ec21921 100644 --- a/nodes/core/core/lib/debug/view.html +++ b/nodes/core/core/lib/debug/view.html @@ -1,5 +1,6 @@ + Node-RED Debug Tools @@ -7,7 +8,7 @@ - +