mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add visual cue as to whether the workspace is focused
This commit is contained in:
parent
b10141d71f
commit
128c4fe222
@ -73,6 +73,9 @@ RED.tabs = (function() {
|
|||||||
ul.children().addClass("red-ui-tab");
|
ul.children().addClass("red-ui-tab");
|
||||||
|
|
||||||
function onTabClick() {
|
function onTabClick() {
|
||||||
|
if (options.onclick) {
|
||||||
|
options.onclick(tabs[$(this).attr('href').slice(1)]);
|
||||||
|
}
|
||||||
activateTab($(this));
|
activateTab($(this));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -384,6 +384,12 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$("#chart").focus(function() {
|
||||||
|
$("#workspace-tabs").addClass("workspace-focussed")
|
||||||
|
});
|
||||||
|
$("#chart").blur(function() {
|
||||||
|
$("#workspace-tabs").removeClass("workspace-focussed")
|
||||||
|
});
|
||||||
|
|
||||||
RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection);
|
RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection);
|
||||||
RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();});
|
RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();});
|
||||||
|
@ -39,6 +39,7 @@ RED.workspaces = (function() {
|
|||||||
RED.nodes.dirty(true);
|
RED.nodes.dirty(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RED.view.focus();
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
function deleteWorkspace(ws) {
|
function deleteWorkspace(ws) {
|
||||||
@ -139,6 +140,10 @@ RED.workspaces = (function() {
|
|||||||
RED.events.emit("workspace:change",event);
|
RED.events.emit("workspace:change",event);
|
||||||
window.location.hash = 'flow/'+tab.id;
|
window.location.hash = 'flow/'+tab.id;
|
||||||
RED.sidebar.config.refresh();
|
RED.sidebar.config.refresh();
|
||||||
|
RED.view.focus();
|
||||||
|
},
|
||||||
|
onclick: function(tab) {
|
||||||
|
RED.view.focus();
|
||||||
},
|
},
|
||||||
ondblclick: function(tab) {
|
ondblclick: function(tab) {
|
||||||
if (tab.type != "subflow") {
|
if (tab.type != "subflow") {
|
||||||
|
@ -51,3 +51,10 @@
|
|||||||
#workspace-footer {
|
#workspace-footer {
|
||||||
@include component-footer;
|
@include component-footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#workspace-tabs:not(.workspace-focussed) {
|
||||||
|
opacity:0.8;
|
||||||
|
li.red-ui-tab.active a {
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user