mirror of https://github.com/zulip/zulip.git
popovers: Restructure hardcoded "top" for user popover.
The patch to bootstrap will make the position smarter, but we still want to preserve the 100px default vertical offset we chose for visual reasons. Tweaked by tabbott to preserve the visual design.
This commit is contained in:
parent
21ccf45db9
commit
66c6423001
|
@ -162,6 +162,7 @@ function render_user_info_popover(user, popover_element, is_sender_popover, priv
|
||||||
{user_avatar: "avatar/" + user.email,
|
{user_avatar: "avatar/" + user.email,
|
||||||
user_is_guest: user.is_guest}),
|
user_is_guest: user.is_guest}),
|
||||||
trigger: "manual",
|
trigger: "manual",
|
||||||
|
top_offset: 100,
|
||||||
});
|
});
|
||||||
popover_element.popover("show");
|
popover_element.popover("show");
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,6 @@ ul.remind_me_popover .remind_icon {
|
||||||
|
|
||||||
.user_popover {
|
.user_popover {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
top: 100px !important;
|
|
||||||
|
|
||||||
margin: -14px;
|
margin: -14px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -1262,6 +1262,9 @@
|
||||||
break
|
break
|
||||||
case 'left':
|
case 'left':
|
||||||
top = pos.top + pos.height / 2 - actualHeight / 2;
|
top = pos.top + pos.height / 2 - actualHeight / 2;
|
||||||
|
if (this.options.top_offset) {
|
||||||
|
top = this.options.top_offset;
|
||||||
|
}
|
||||||
left = pos.left - actualWidth;
|
left = pos.left - actualWidth;
|
||||||
break
|
break
|
||||||
case 'right':
|
case 'right':
|
||||||
|
|
Loading…
Reference in New Issue