mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3745 from node-red-hitachi/fix-debug-path-menu
Fix clear pinned paths of debug sidebar menu
This commit is contained in:
commit
e308e02f9d
@ -459,30 +459,38 @@ RED.debug = (function() {
|
||||
function showMessageMenu(button,dbgMessage,sourceId) {
|
||||
activeMenuMessage = dbgMessage;
|
||||
if (!menuOptionMenu) {
|
||||
menuOptionMenu = RED.menu.init({id:"red-ui-debug-msg-option-menu",
|
||||
options: [
|
||||
{id:"red-ui-debug-msg-menu-item-collapse",label:RED._("node-red:debug.messageMenu.collapseAll"),onselect:function(){
|
||||
activeMenuMessage.collapse();
|
||||
}},
|
||||
var opts = [
|
||||
{id:"red-ui-debug-msg-menu-item-collapse",label:RED._("node-red:debug.messageMenu.collapseAll"),onselect:function(){
|
||||
activeMenuMessage.collapse();
|
||||
}},
|
||||
];
|
||||
if (activeMenuMessage.clearPinned) {
|
||||
opts.push(
|
||||
{id:"red-ui-debug-msg-menu-item-clear-pins",label:RED._("node-red:debug.messageMenu.clearPinned"),onselect:function(){
|
||||
activeMenuMessage.clearPinned();
|
||||
}},
|
||||
null,
|
||||
{id:"red-ui-debug-msg-menu-item-filter", label:RED._("node-red:debug.messageMenu.filterNode"),onselect:function(){
|
||||
var candidateNodes = RED.nodes.filterNodes({type:'debug'});
|
||||
candidateNodes.forEach(function(n) {
|
||||
filteredNodes[n.id] = true;
|
||||
});
|
||||
delete filteredNodes[sourceId];
|
||||
$("#red-ui-sidebar-debug-filterSelected").trigger("click");
|
||||
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
|
||||
refreshMessageList();
|
||||
}},
|
||||
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
||||
$("#red-ui-sidebar-debug-filterAll").trigger("click");
|
||||
refreshMessageList();
|
||||
}}
|
||||
]
|
||||
);
|
||||
}
|
||||
opts.push(
|
||||
null,
|
||||
{id:"red-ui-debug-msg-menu-item-filter", label:RED._("node-red:debug.messageMenu.filterNode"),onselect:function(){
|
||||
var candidateNodes = RED.nodes.filterNodes({type:'debug'});
|
||||
candidateNodes.forEach(function(n) {
|
||||
filteredNodes[n.id] = true;
|
||||
});
|
||||
delete filteredNodes[sourceId];
|
||||
$("#red-ui-sidebar-debug-filterSelected").trigger("click");
|
||||
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
|
||||
refreshMessageList();
|
||||
}},
|
||||
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
||||
$("#red-ui-sidebar-debug-filterAll").trigger("click");
|
||||
refreshMessageList();
|
||||
}}
|
||||
);
|
||||
|
||||
menuOptionMenu = RED.menu.init({id:"red-ui-debug-msg-option-menu",
|
||||
options: opts
|
||||
});
|
||||
menuOptionMenu.css({
|
||||
position: "absolute"
|
||||
|
Loading…
Reference in New Issue
Block a user