mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
stream setting: Fix bug in email address popover.
Email address popover was not showing, because add popover jquery function was executed before DOM elements get load.
This commit is contained in:
@@ -158,18 +158,17 @@ exports.rerender_subscribers_count = function (sub) {
|
|||||||
function add_email_hint(row, email_address_hint_content) {
|
function add_email_hint(row, email_address_hint_content) {
|
||||||
// Add a popover explaining stream e-mail addresses on hover.
|
// Add a popover explaining stream e-mail addresses on hover.
|
||||||
var hint_id = "#email-address-hint-" + row.stream_id;
|
var hint_id = "#email-address-hint-" + row.stream_id;
|
||||||
var email_address_hint = $(hint_id);
|
|
||||||
email_address_hint.popover({placement: "bottom",
|
$("body").on("mouseover", hint_id, function (e) {
|
||||||
|
$(hint_id).popover({placement: "bottom",
|
||||||
title: "Email integration",
|
title: "Email integration",
|
||||||
content: email_address_hint_content,
|
content: email_address_hint_content,
|
||||||
trigger: "manual"});
|
trigger: "manual"});
|
||||||
|
$(hint_id).popover('show');
|
||||||
$("body").on("mouseover", hint_id, function (e) {
|
|
||||||
email_address_hint.popover('show');
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
$("body").on("mouseout", hint_id, function (e) {
|
$("body").on("mouseout", hint_id, function (e) {
|
||||||
email_address_hint.popover('hide');
|
$(hint_id).popover('hide');
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user