1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #4259 from kazuhitoyokoi/master-fixtooltip4textdiff

Add tooltip to text diff button
This commit is contained in:
Nick O'Leary 2023-08-14 11:11:32 +01:00 committed by GitHub
commit 9542c22191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -989,9 +989,10 @@ RED.diff = (function() {
}
if (localNode && remoteNode && typeof localNode[d] === "string") {
if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
$('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
var textDiff = $('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
showTextDiff(localNode[d],remoteNode[d]);
}).appendTo(propertyNameCell);
RED.popover.tooltip(textDiff, RED._("diff.compareChanges"));
}
}