popovers: Apply email overflow changes to ".message-info-popover".

This applies the same overflow changes to “.message-info-popover” by
imposing a max width on the popover (so it doesn’t increase in width
when it gets larger) and adding the tooltip on hover.
This commit is contained in:
Brock Whittaker
2017-12-13 11:45:06 -08:00
committed by showell
parent 97c3d5fce3
commit 20f3b0f599
2 changed files with 12 additions and 8 deletions

View File

@@ -476,16 +476,16 @@ exports.register_click_handlers = function () {
current_user_sidebar_user_id = user_id;
current_user_sidebar_popover = target.data('popover');
});
$('.my_email').hover(function () {
var tooltip_holder = $(this).find('div');
$('body').on("mouseenter", ".my_email", function () {
var tooltip_holder = $(this).find('div');
if (this.offsetWidth < this.scrollWidth) {
tooltip_holder.addClass('display-tooltip');
} else {
tooltip_holder.removeClass('display-tooltip');
}
});
if (this.offsetWidth < this.scrollWidth) {
tooltip_holder.addClass('display-tooltip');
} else {
tooltip_holder.removeClass('display-tooltip');
}
});
$('body').on('click', '.respond_button', function (e) {

View File

@@ -88,6 +88,10 @@ ul.actions_popover i {
padding: 0;
}
.message-info-popover {
width: 240px;
}
.user_popover .popover-title {
padding: 0;
}