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

Ensure tab state updates properly when toggling enable state

This commit is contained in:
Nick O'Leary 2021-10-08 15:09:51 +01:00
parent cdfeba0b82
commit edb8a120bd
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 6 additions and 2 deletions

View File

@ -1755,8 +1755,12 @@ RED.editor = (function() {
editState.changes.disabled = workspace.disabled;
editState.changed = true;
workspace.disabled = disabled;
}
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled);
if (workspace.id === RED.workspaces.active()) {
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled);
}
}
if (editState.changed) {
var historyEvent = {

View File

@ -450,7 +450,7 @@ RED.workspaces = (function() {
var changes = { disabled: workspace.disabled };
workspace.disabled = disabled;
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled);
if (id === activeWorkspace) {
if (id || activeWorkspace) {
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled);
}
var historyEvent = {