mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Clear debug message when switching projects (#1523)
* Clear debug sidebar when switching project * Delete a unnecessary comment * Clear any filters the users has enabled * Clear filter settings only when the user opens a project
This commit is contained in:
committed by
Nick O'Leary
parent
5a6cde1446
commit
207d3d3340
@@ -183,6 +183,18 @@
|
||||
};
|
||||
RED.comms.subscribe("debug",this.handleDebugMessage);
|
||||
|
||||
this.clearMessageList = function() {
|
||||
RED.debug.clearMessageList(true);
|
||||
if (subWindow) {
|
||||
try {
|
||||
subWindow.postMessage({event:"projectChange"},"*");
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
RED.events.on("project:change", this.clearMessageList);
|
||||
|
||||
$("#debug-tab-open").click(function(e) {
|
||||
e.preventDefault();
|
||||
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
||||
|
Reference in New Issue
Block a user