Factor out popup menu component.
Factor out the popup menu inside user tooltips into a reusable component.
This commit is contained in:
@@ -25,19 +25,6 @@ UserTooltip.initialize = function () {
|
||||
onShow: UserTooltip.on_show,
|
||||
onHide: UserTooltip.on_hide,
|
||||
});
|
||||
|
||||
delegate("#user-tooltips", {
|
||||
allowHTML: true,
|
||||
interactive: true,
|
||||
theme: "common-tooltip",
|
||||
target: ".user-tooltip-menu-button",
|
||||
placement: "bottom",
|
||||
touch: false,
|
||||
trigger: "click",
|
||||
content: (element) => {
|
||||
return $(element).parents(".user-tooltip").find(".user-tooltip-menu").get(0);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
UserTooltip.on_show = async function (instance) {
|
||||
|
||||
@@ -57,29 +57,11 @@
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
a.user-tooltip-menu-button {
|
||||
color: var(--muted-text-color);
|
||||
div.popup-menu {
|
||||
grid-area: menu;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border-radius: 50%;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--subnav-menu-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
> ul.user-tooltip-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.user-tooltip-menu {
|
||||
.icon {
|
||||
width: 1.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user