mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
[popover] Allow hover-type popovers to contain buttons
This commit is contained in:
parent
9fbfc3d677
commit
010e20989a
@ -136,6 +136,23 @@ RED.popover = (function() {
|
||||
closePopup(true);
|
||||
});
|
||||
}
|
||||
if (trigger === 'hover' && options.interactive) {
|
||||
div.on('mouseenter', function(e) {
|
||||
clearTimeout(timer);
|
||||
active = true;
|
||||
})
|
||||
div.on('mouseleave', function(e) {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
if (active) {
|
||||
timer = setTimeout(function() {
|
||||
active = false;
|
||||
closePopup();
|
||||
},delay.hide);
|
||||
}
|
||||
})
|
||||
}
|
||||
if (instant) {
|
||||
div.show();
|
||||
} else {
|
||||
@ -163,8 +180,10 @@ RED.popover = (function() {
|
||||
if (trigger === 'hover') {
|
||||
target.on('mouseenter',function(e) {
|
||||
clearTimeout(timer);
|
||||
active = true;
|
||||
timer = setTimeout(openPopup,delay.show);
|
||||
if (!active) {
|
||||
active = true;
|
||||
timer = setTimeout(openPopup,delay.show);
|
||||
}
|
||||
});
|
||||
target.on('mouseleave disabled', function(e) {
|
||||
if (timer) {
|
||||
|
@ -150,6 +150,16 @@
|
||||
|
||||
.red-ui-popover a.red-ui-button,
|
||||
.red-ui-popover button.red-ui-button {
|
||||
&:not(.primary) {
|
||||
border-color: $popover-button-border-color;
|
||||
background: $popover-background;
|
||||
color: $popover-color !important;
|
||||
}
|
||||
&:not(.primary):not(.disabled):not(.ui-button-disabled):hover {
|
||||
border-color: $popover-button-border-color-hover;
|
||||
}
|
||||
|
||||
|
||||
&.primary {
|
||||
border-color: $popover-button-border-color;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user