mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix diff view node properties table rendering
This commit is contained in:
parent
1c0e794f87
commit
0f93929544
@ -587,7 +587,8 @@ RED.diff = (function() {
|
||||
if (localNode) {
|
||||
localCell.addClass("node-diff-node-unchanged");
|
||||
$('<span class="node-diff-status"></span>').appendTo(localCell);
|
||||
RED.utils.createObjectElement(localNode.id).appendTo(localCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(localCell);
|
||||
RED.utils.createObjectElement(localNode.id).appendTo(element);
|
||||
} else {
|
||||
localCell.addClass("node-diff-empty");
|
||||
}
|
||||
@ -596,7 +597,8 @@ RED.diff = (function() {
|
||||
remoteCell.addClass("node-diff-node-unchanged");
|
||||
if (remoteNode) {
|
||||
$('<span class="node-diff-status"></span>').appendTo(remoteCell);
|
||||
RED.utils.createObjectElement(remoteNode.id).appendTo(remoteCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(remoteCell);
|
||||
RED.utils.createObjectElement(remoteNode.id).appendTo(element);
|
||||
} else {
|
||||
remoteCell.addClass("node-diff-empty");
|
||||
}
|
||||
@ -628,7 +630,8 @@ RED.diff = (function() {
|
||||
if (localNode) {
|
||||
localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged"));
|
||||
$('<span class="node-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell);
|
||||
RED.utils.createObjectElement({x:localNode.x,y:localNode.y}).appendTo(localCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(localCell);
|
||||
RED.utils.createObjectElement({x:localNode.x,y:localNode.y}).appendTo(element);
|
||||
} else {
|
||||
localCell.addClass("node-diff-empty");
|
||||
}
|
||||
@ -638,7 +641,8 @@ RED.diff = (function() {
|
||||
remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged"));
|
||||
if (remoteNode) {
|
||||
$('<span class="node-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell);
|
||||
RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y}).appendTo(remoteCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(remoteCell);
|
||||
RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y}).appendTo(element);
|
||||
} else {
|
||||
remoteCell.addClass("node-diff-empty");
|
||||
}
|
||||
@ -742,7 +746,8 @@ RED.diff = (function() {
|
||||
localCell.addClass("node-diff-node-conflict");
|
||||
$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(localCell);
|
||||
}
|
||||
RED.utils.createObjectElement(localNode[d]).appendTo(localCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(localCell);
|
||||
RED.utils.createObjectElement(localNode[d]).appendTo(element);
|
||||
} else {
|
||||
localCell.addClass("node-diff-empty");
|
||||
}
|
||||
@ -756,7 +761,8 @@ RED.diff = (function() {
|
||||
remoteCell.addClass("node-diff-node-conflict");
|
||||
$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(remoteCell);
|
||||
}
|
||||
RED.utils.createObjectElement(remoteNode[d]).appendTo(remoteCell);
|
||||
element = $('<span class="node-diff-element"></span>').appendTo(remoteCell);
|
||||
RED.utils.createObjectElement(remoteNode[d]).appendTo(element);
|
||||
} else {
|
||||
remoteCell.addClass("node-diff-empty");
|
||||
}
|
||||
|
@ -395,10 +395,12 @@ RED.utils = (function() {
|
||||
for (i=0;i<keys.length;i++) {
|
||||
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element);
|
||||
var newPath = path;
|
||||
if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) {
|
||||
newPath += (newPath.length > 0?".":"")+keys[i];
|
||||
} else {
|
||||
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
|
||||
if (newPath) {
|
||||
if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) {
|
||||
newPath += (newPath.length > 0?".":"")+keys[i];
|
||||
} else {
|
||||
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
|
||||
}
|
||||
}
|
||||
buildMessageElement(obj[keys[i]],keys[i],false,false,newPath,sourceId,rootPath,expandPaths).appendTo(row);
|
||||
}
|
||||
|
@ -313,6 +313,10 @@
|
||||
margin-bottom: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
.node-diff-element {
|
||||
display: inline-block;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.node-diff-node-description {
|
||||
color: $form-text-color;
|
||||
|
Loading…
Reference in New Issue
Block a user