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

Handle missing tab.disabled property

This commit is contained in:
Nick O'Leary 2018-11-13 13:39:06 +00:00
parent e6e7747ae1
commit 2dfb443625
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -107,8 +107,8 @@ RED.workspaces = (function() {
changed = true;
workspace.info = info;
}
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',workspace.disabled);
$("#workspace").toggleClass("workspace-disabled",workspace.disabled);
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',!!workspace.disabled);
$("#workspace").toggleClass("workspace-disabled",!!workspace.disabled);
if (changed) {
var historyEvent = {
@ -254,10 +254,9 @@ RED.workspaces = (function() {
}
activeWorkspace = tab.id;
event.workspace = activeWorkspace;
// $("#workspace").toggleClass("workspace-disabled",tab.disabled);
RED.events.emit("workspace:change",event);
window.location.hash = 'flow/'+tab.id;
$("#workspace").toggleClass("workspace-disabled",tab.disabled);
$("#workspace").toggleClass("workspace-disabled",!!tab.disabled);
RED.sidebar.config.refresh();
RED.view.focus();
},