mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
recent_view_ui: Cut import of user_card_popover.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
27991bd5b0
commit
70748181da
@@ -34,7 +34,6 @@ import * as timerender from "./timerender";
|
|||||||
import * as ui_util from "./ui_util";
|
import * as ui_util from "./ui_util";
|
||||||
import * as unread from "./unread";
|
import * as unread from "./unread";
|
||||||
import * as unread_ops from "./unread_ops";
|
import * as unread_ops from "./unread_ops";
|
||||||
import * as user_card_popover from "./user_card_popover";
|
|
||||||
import * as user_status from "./user_status";
|
import * as user_status from "./user_status";
|
||||||
import * as user_topics from "./user_topics";
|
import * as user_topics from "./user_topics";
|
||||||
import * as views_util from "./views_util";
|
import * as views_util from "./views_util";
|
||||||
@@ -1245,7 +1244,7 @@ export function change_focused_element($elt, input_key) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initialize() {
|
export function initialize({on_click_participant}) {
|
||||||
// load filters from local storage.
|
// load filters from local storage.
|
||||||
if (!page_params.is_spectator) {
|
if (!page_params.is_spectator) {
|
||||||
// A user may have a stored filter and can log out
|
// A user may have a stored filter and can log out
|
||||||
@@ -1257,8 +1256,7 @@ export function initialize() {
|
|||||||
$("body").on("click", "#recent_view_table .recent_view_participant_avatar", function (e) {
|
$("body").on("click", "#recent_view_table .recent_view_participant_avatar", function (e) {
|
||||||
const participant_user_id = Number.parseInt($(this).parent().attr("data-user-id"), 10);
|
const participant_user_id = Number.parseInt($(this).parent().attr("data-user-id"), 10);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const user = people.get_by_user_id(participant_user_id);
|
on_click_participant(this, participant_user_id);
|
||||||
user_card_popover.toggle_user_card_popover(this, user);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on(
|
$("body").on(
|
||||||
|
|||||||
@@ -592,7 +592,12 @@ export function initialize_everything() {
|
|||||||
realm_logo.initialize();
|
realm_logo.initialize();
|
||||||
message_lists.initialize();
|
message_lists.initialize();
|
||||||
message_list.initialize();
|
message_list.initialize();
|
||||||
recent_view_ui.initialize();
|
recent_view_ui.initialize({
|
||||||
|
on_click_participant(avatar_element, participant_user_id) {
|
||||||
|
const user = people.get_by_user_id(participant_user_id);
|
||||||
|
user_card_popover.toggle_user_card_popover(avatar_element, user);
|
||||||
|
},
|
||||||
|
});
|
||||||
inbox_ui.initialize();
|
inbox_ui.initialize();
|
||||||
alert_words.initialize(alert_words_params);
|
alert_words.initialize(alert_words_params);
|
||||||
emojisets.initialize();
|
emojisets.initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user