1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix pop-out debug window for all the recent updates

This commit is contained in:
Nick O'Leary 2017-05-12 22:22:47 +01:00
parent c09bea4710
commit 835ad29417
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 26 additions and 23 deletions

View File

@ -1,28 +1,30 @@
$(function() { $(function() {
var options = { RED.i18n.init(function() {
messageMouseEnter: function(sourceId) { var options = {
window.opener.postMessage({event:"mouseEnter",id:sourceId},'*'); messageMouseEnter: function(sourceId) {
}, window.opener.postMessage({event:"mouseEnter",id:sourceId},'*');
messageMouseLeave: function(sourceId) { },
window.opener.postMessage({event:"mouseLeave",id:sourceId},'*'); messageMouseLeave: function(sourceId) {
}, window.opener.postMessage({event:"mouseLeave",id:sourceId},'*');
messageSourceClick: function(sourceId) { },
window.opener.postMessage({event:"mouseClick",id:sourceId},'*'); messageSourceClick: function(sourceId) {
}, window.opener.postMessage({event:"mouseClick",id:sourceId},'*');
clear: function() { },
window.opener.postMessage({event:"clear"},'*'); 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) { window.addEventListener('message',function(evt) {
if (evt.data.event === "message") { if (evt.data.event === "message") {
RED.debug.handleDebugMessage(evt.data.msg); RED.debug.handleDebugMessage(evt.data.msg);
} else if (evt.data.event === "workspaceChange") { } else if (evt.data.event === "workspaceChange") {
RED.debug.refreshMessageList(evt.data.activeWorkspace); RED.debug.refreshMessageList(evt.data.activeWorkspace);
} }
},false); },false);
})
}); });

View File

@ -1,5 +1,6 @@
<html> <html>
<head> <head>
<link href="../../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="../../red/style.min.css"> <link rel="stylesheet" href="../../red/style.min.css">
<link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css">
<title>Node-RED Debug Tools</title> <title>Node-RED Debug Tools</title>
@ -7,7 +8,7 @@
<body class="debug-window"> <body class="debug-window">
</body> </body>
<script src="../../vendor/vendor.js"></script> <script src="../../vendor/vendor.js"></script>
<script src="../../red/red.js"></script> <script src="../../red/red.min.js"></script>
<script src="debug-utils.js"></script> <script src="debug-utils.js"></script>
<script src="debug.js"></script> <script src="debug.js"></script>
</html> </html>