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

Remove list of flows from menu

This commit is contained in:
Nick O'Leary 2016-09-30 23:34:26 +01:00
parent b00985f99f
commit aad29e4487
4 changed files with 1 additions and 17 deletions

View File

@ -234,10 +234,6 @@ RED.history = (function() {
n.outputs = ev.node.out.length; n.outputs = ev.node.out.length;
RED.editor.updateNodeProperties(n); RED.editor.updateNodeProperties(n);
}); });
if (ev.node.type === 'subflow') {
$("#menu-item-workspace-menu-"+ev.node.id.replace(".","-")).text(RED.text.bidi.enforceTextDirectionWithUCC(ev.node.name));
}
} else { } else {
RED.editor.updateNodeProperties(ev.node); RED.editor.updateNodeProperties(ev.node);
RED.editor.validateNode(ev.node); RED.editor.validateNode(ev.node);

View File

@ -203,8 +203,7 @@ var RED = (function() {
menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[ menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[
{id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:RED.workspaces.add}, {id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:RED.workspaces.add},
{id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:RED.workspaces.edit}, {id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:RED.workspaces.edit},
{id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:RED.workspaces.remove}, {id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:RED.workspaces.remove}
null
]}); ]});
menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [ menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [
{id:"menu-item-subflow-create",label:RED._("menu.label.createSubflow"),onselect:RED.subflow.createSubflow}, {id:"menu-item-subflow-create",label:RED._("menu.label.createSubflow"),onselect:RED.subflow.createSubflow},

View File

@ -1221,7 +1221,6 @@ RED.editor = (function() {
changes['name'] = editing_node.name; changes['name'] = editing_node.name;
editing_node.name = newName; editing_node.name = newName;
changed = true; changed = true;
$("#menu-item-workspace-menu-"+editing_node.id.replace(".","-")).text(RED.text.bidi.enforceTextDirectionWithUCC(newName));
} }
var newDescription = subflowEditor.getValue(); var newDescription = subflowEditor.getValue();

View File

@ -97,7 +97,6 @@ RED.workspaces = (function() {
workspace_tabs.renameTab(workspace.id,label); workspace_tabs.renameTab(workspace.id,label);
RED.nodes.dirty(true); RED.nodes.dirty(true);
RED.sidebar.config.refresh(); RED.sidebar.config.refresh();
$("#menu-item-workspace-menu-"+workspace.id.replace(".","-")).text(RED.text.bidi.enforceTextDirectionWithUCC(label));
} }
RED.tray.close(); RED.tray.close();
} }
@ -148,18 +147,10 @@ RED.workspaces = (function() {
} }
}, },
onadd: function(tab) { onadd: function(tab) {
RED.menu.addItem("menu-item-workspace",{
id:"menu-item-workspace-menu-"+tab.id.replace(".","-"),
label:tab.label,
onselect:function() {
workspace_tabs.activateTab(tab.id);
}
});
RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1); RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1);
}, },
onremove: function(tab) { onremove: function(tab) {
RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1); RED.menu.setDisabled("menu-item-workspace-delete",workspace_tabs.count() == 1);
RED.menu.removeItem("menu-item-workspace-menu-"+tab.id.replace(".","-"));
}, },
onreorder: function(oldOrder, newOrder) { onreorder: function(oldOrder, newOrder) {
RED.history.push({t:'reorder',order:oldOrder,dirty:RED.nodes.dirty()}); RED.history.push({t:'reorder',order:oldOrder,dirty:RED.nodes.dirty()});
@ -235,7 +226,6 @@ RED.workspaces = (function() {
refresh: function() { refresh: function() {
RED.nodes.eachWorkspace(function(ws) { RED.nodes.eachWorkspace(function(ws) {
workspace_tabs.renameTab(ws.id,ws.label); workspace_tabs.renameTab(ws.id,ws.label);
$("#menu-item-workspace-menu-"+ws.id.replace(".","-")).text(RED.text.bidi.enforceTextDirectionWithUCC(ws.label));
}) })
RED.nodes.eachSubflow(function(sf) { RED.nodes.eachSubflow(function(sf) {