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",
|
text: "Ok",
|
||||||
click: function() {
|
click: function() {
|
||||||
var workspace = $(this).dialog('option','workspace');
|
var workspace = $(this).dialog('option','workspace');
|
||||||
workspace_tabs.removeTab(workspace.id);
|
RED.view.removeWorkspace(workspace);
|
||||||
// TODO: make undoable
|
|
||||||
var historyEvent = RED.nodes.removeWorkspace(workspace.id);
|
var historyEvent = RED.nodes.removeWorkspace(workspace.id);
|
||||||
historyEvent.t = 'delete';
|
historyEvent.t = 'delete';
|
||||||
historyEvent.dirty = dirty;
|
historyEvent.dirty = dirty;
|
||||||
@ -1084,6 +1083,7 @@ RED.view = function() {
|
|||||||
},
|
},
|
||||||
removeWorkspace: function(ws) {
|
removeWorkspace: function(ws) {
|
||||||
workspace_tabs.removeTab(ws.id);
|
workspace_tabs.removeTab(ws.id);
|
||||||
|
$('#workspace-menu-list a[href="#'+ws.id+'"]').parent().remove();
|
||||||
},
|
},
|
||||||
getWorkspace: function() {
|
getWorkspace: function() {
|
||||||
return activeWorkspace;
|
return activeWorkspace;
|
||||||
|
Loading…
Reference in New Issue
Block a user