mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
Combine the actions popover with the timeinfo popover
The message timestamp is now always clickable, and the popover contains the full long-form date and time. This addresses one problem from usability testing (see #470). (imported from commit ad502dff128ad1c934fc0d3faaf5e2931c91c37e)
This commit is contained in:
@@ -387,24 +387,16 @@ function show_actions_popover(element, id) {
|
||||
select_message_by_id(id);
|
||||
var elt = $(element);
|
||||
if (elt.data('popover') === undefined) {
|
||||
var content, message = message_dict[id];
|
||||
if (elt.hasClass("message_sender") || elt.hasClass("profile_picture")) {
|
||||
elt.popover({placement: "bottom",
|
||||
title: templates.actions_popover_title(message),
|
||||
content: templates.actions_popover_content(message),
|
||||
trigger: "manual"
|
||||
});
|
||||
} else if (elt.hasClass("message_time")) {
|
||||
if (!narrow.active()) {
|
||||
// Only show the time-travel popover when narrowed
|
||||
return;
|
||||
}
|
||||
// Bootstrap takes the title from the 'title' attribute of elt
|
||||
elt.popover({placement: "bottom",
|
||||
content: templates.timeinfo_popover_content(message),
|
||||
trigger: "manual"
|
||||
});
|
||||
}
|
||||
var args = {
|
||||
message: message_dict[id],
|
||||
narrowed: narrow.active()
|
||||
};
|
||||
elt.popover({
|
||||
placement: "bottom",
|
||||
title: templates.actions_popover_title(args),
|
||||
content: templates.actions_popover_content(args),
|
||||
trigger: "manual"
|
||||
});
|
||||
elt.popover("show");
|
||||
current_actions_popover_elem = elt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user