mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4850 from kazuhitoyokoi/master-fixpagetitle
Refresh page title after changing tab name
This commit is contained in:
commit
98ca0f163e
@ -920,6 +920,17 @@ RED.workspaces = (function() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
|
var workspace = RED.nodes.workspace(RED.workspaces.active());
|
||||||
|
if (workspace) {
|
||||||
|
document.title = `${documentTitle} : ${workspace.label}`;
|
||||||
|
} else {
|
||||||
|
var subflow = RED.nodes.subflow(RED.workspaces.active());
|
||||||
|
if (subflow) {
|
||||||
|
document.title = `${documentTitle} : ${subflow.name}`;
|
||||||
|
} else {
|
||||||
|
document.title = documentTitle
|
||||||
|
}
|
||||||
|
}
|
||||||
RED.nodes.eachWorkspace(function(ws) {
|
RED.nodes.eachWorkspace(function(ws) {
|
||||||
workspace_tabs.renameTab(ws.id,ws.label);
|
workspace_tabs.renameTab(ws.id,ws.label);
|
||||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user