mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add name to node and flow context view labels
slight adjust spacing for context view
This commit is contained in:
parent
60b1a05894
commit
5a7592a953
@ -186,6 +186,10 @@ RED.sidebar.context = (function() {
|
|||||||
|
|
||||||
function updateNode(node,force) {
|
function updateNode(node,force) {
|
||||||
currentNode = node;
|
currentNode = node;
|
||||||
|
if (currentNode && currentNode.hasOwnProperty("name") && currentNode.name.length > 0 ) {
|
||||||
|
$(nodeSection.title).text(RED._("sidebar.context.node") + ": " + currentNode.name);
|
||||||
|
}
|
||||||
|
else { $(nodeSection.title).text(RED._("sidebar.context.node")); }
|
||||||
if (force) {
|
if (force) {
|
||||||
if (node) {
|
if (node) {
|
||||||
updateEntry(nodeSection,"context/node/"+node.id,node.id);
|
updateEntry(nodeSection,"context/node/"+node.id,node.id);
|
||||||
@ -211,6 +215,7 @@ RED.sidebar.context = (function() {
|
|||||||
}
|
}
|
||||||
function updateFlow(flow, force) {
|
function updateFlow(flow, force) {
|
||||||
currentFlow = flow;
|
currentFlow = flow;
|
||||||
|
$(flowSection.title).text(RED._("sidebar.context.flow") + ": " + currentFlow.label);
|
||||||
if (force || flowAutoRefresh.prop("checked")) {
|
if (force || flowAutoRefresh.prop("checked")) {
|
||||||
if (flow) {
|
if (flow) {
|
||||||
updateEntry(flowSection,"context/flow/"+flow.id,flow.id);
|
updateEntry(flowSection,"context/flow/"+flow.id,flow.id);
|
||||||
@ -325,7 +330,6 @@ RED.sidebar.context = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
popover.open();
|
popover.open();
|
||||||
|
|
||||||
});
|
});
|
||||||
RED.popover.tooltip(deleteItem,RED._("sidebar.context.delete"));
|
RED.popover.tooltip(deleteItem,RED._("sidebar.context.delete"));
|
||||||
var payload = v.msg;
|
var payload = v.msg;
|
||||||
@ -346,6 +350,7 @@ RED.sidebar.context = (function() {
|
|||||||
$(section.timestamp).text(new Date().toLocaleString());
|
$(section.timestamp).text(new Date().toLocaleString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateEntry(section,baseUrl,id) {
|
function updateEntry(section,baseUrl,id) {
|
||||||
var container = section.table;
|
var container = section.table;
|
||||||
if (id) {
|
if (id) {
|
||||||
@ -356,11 +361,10 @@ RED.sidebar.context = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
RED.sidebar.show("context");
|
RED.sidebar.show("context");
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init: init
|
init: init
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
|
|
||||||
.red-ui-debug-msg-row {
|
.red-ui-debug-msg-row {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 4px 2px 2px;
|
padding: 2px 2px 2px;
|
||||||
position: relative;
|
position: relative;
|
||||||
&.red-ui-debug-msg-row-pinned {
|
&.red-ui-debug-msg-row-pinned {
|
||||||
background: $secondary-background-selected;
|
background: $secondary-background-selected;
|
||||||
|
@ -92,12 +92,12 @@ table.red-ui-info-table tr:not(.blank) td:first-child{
|
|||||||
color: $header-text-color;
|
color: $header-text-color;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
padding: 3px 3px 3px 6px;
|
padding: 6px 3px 3px 6px;
|
||||||
background:$tertiary-background;
|
background:$tertiary-background;
|
||||||
border-right: 1px solid $secondary-border-color;
|
border-right: 1px solid $secondary-border-color;
|
||||||
}
|
}
|
||||||
table.red-ui-info-table tr:not(.blank) td:last-child{
|
table.red-ui-info-table tr:not(.blank) td:last-child{
|
||||||
padding: 3px 3px 3px 6px;
|
padding: 5px 3px 3px 6px;
|
||||||
color: $primary-text-color;
|
color: $primary-text-color;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user