mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure tooltip popover doesn't replace normal popover
This commit is contained in:
parent
d583c68de5
commit
b1b4b3fb63
@ -52,6 +52,11 @@ RED.popover = (function() {
|
|||||||
|
|
||||||
var openPopup = function(instant) {
|
var openPopup = function(instant) {
|
||||||
if (active) {
|
if (active) {
|
||||||
|
var existingPopover = target.data("red-ui-popover");
|
||||||
|
if (options.tooltip && existingPopover) {
|
||||||
|
active = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
div = $('<div class="red-ui-popover"></div>');
|
div = $('<div class="red-ui-popover"></div>');
|
||||||
if (size !== "default") {
|
if (size !== "default") {
|
||||||
div.addClass("red-ui-popover-size-"+size);
|
div.addClass("red-ui-popover-size-"+size);
|
||||||
@ -122,7 +127,10 @@ RED.popover = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.addClass('red-ui-popover-'+d).css({top: top, left: left});
|
div.addClass('red-ui-popover-'+d).css({top: top, left: left});
|
||||||
|
if (existingPopover) {
|
||||||
|
existingPopover.close(true);
|
||||||
|
}
|
||||||
|
target.data("red-ui-popover",res)
|
||||||
if (instant) {
|
if (instant) {
|
||||||
div.show();
|
div.show();
|
||||||
} else {
|
} else {
|
||||||
@ -142,6 +150,7 @@ RED.popover = (function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
div = null;
|
div = null;
|
||||||
|
target.removeData("red-ui-popover",res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,6 +245,7 @@ RED.popover = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RED.popover.create({
|
return RED.popover.create({
|
||||||
|
tooltip: true,
|
||||||
target:target,
|
target:target,
|
||||||
trigger: "hover",
|
trigger: "hover",
|
||||||
size: "small",
|
size: "small",
|
||||||
|
@ -139,9 +139,9 @@
|
|||||||
"clearLog": "Clear log",
|
"clearLog": "Clear log",
|
||||||
"filterLog": "Filter log",
|
"filterLog": "Filter log",
|
||||||
"openWindow": "Open in new window",
|
"openWindow": "Open in new window",
|
||||||
"copyPath": "copy Path",
|
"copyPath": "Copy path",
|
||||||
"copyPayload": "copy Value",
|
"copyPayload": "Copy value",
|
||||||
"pinPath": "pin open"
|
"pinPath": "Pin open"
|
||||||
},
|
},
|
||||||
"messageMenu": {
|
"messageMenu": {
|
||||||
"collapseAll": "Collapse all paths",
|
"collapseAll": "Collapse all paths",
|
||||||
|
Loading…
Reference in New Issue
Block a user