mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update workspace switcher menu when tabs removed
This commit is contained in:
parent
2e15944b20
commit
9c72b65611
@ -1049,8 +1049,7 @@ RED.view = function() {
|
||||
text: "Ok",
|
||||
click: function() {
|
||||
var workspace = $(this).dialog('option','workspace');
|
||||
workspace_tabs.removeTab(workspace.id);
|
||||
// TODO: make undoable
|
||||
RED.view.removeWorkspace(workspace);
|
||||
var historyEvent = RED.nodes.removeWorkspace(workspace.id);
|
||||
historyEvent.t = 'delete';
|
||||
historyEvent.dirty = dirty;
|
||||
@ -1084,6 +1083,7 @@ RED.view = function() {
|
||||
},
|
||||
removeWorkspace: function(ws) {
|
||||
workspace_tabs.removeTab(ws.id);
|
||||
$('#workspace-menu-list a[href="#'+ws.id+'"]').parent().remove();
|
||||
},
|
||||
getWorkspace: function() {
|
||||
return activeWorkspace;
|
||||
|
Loading…
Reference in New Issue
Block a user