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:
parent
e6e7747ae1
commit
2dfb443625
@ -107,8 +107,8 @@ RED.workspaces = (function() {
|
|||||||
changed = true;
|
changed = true;
|
||||||
workspace.info = info;
|
workspace.info = info;
|
||||||
}
|
}
|
||||||
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',workspace.disabled);
|
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',!!workspace.disabled);
|
||||||
$("#workspace").toggleClass("workspace-disabled",workspace.disabled);
|
$("#workspace").toggleClass("workspace-disabled",!!workspace.disabled);
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
var historyEvent = {
|
var historyEvent = {
|
||||||
@ -254,10 +254,9 @@ RED.workspaces = (function() {
|
|||||||
}
|
}
|
||||||
activeWorkspace = tab.id;
|
activeWorkspace = tab.id;
|
||||||
event.workspace = activeWorkspace;
|
event.workspace = activeWorkspace;
|
||||||
// $("#workspace").toggleClass("workspace-disabled",tab.disabled);
|
|
||||||
RED.events.emit("workspace:change",event);
|
RED.events.emit("workspace:change",event);
|
||||||
window.location.hash = 'flow/'+tab.id;
|
window.location.hash = 'flow/'+tab.id;
|
||||||
$("#workspace").toggleClass("workspace-disabled",tab.disabled);
|
$("#workspace").toggleClass("workspace-disabled",!!tab.disabled);
|
||||||
RED.sidebar.config.refresh();
|
RED.sidebar.config.refresh();
|
||||||
RED.view.focus();
|
RED.view.focus();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user