mirror of https://github.com/zulip/zulip.git
left_sidebar: Use DM identifiers on DM containers.
This commit is contained in:
parent
f496b40cd6
commit
01ca3e119b
|
@ -713,7 +713,7 @@ export function initialize() {
|
|||
|
||||
$("body").on(
|
||||
"click",
|
||||
".private_messages_container.zoom-out #private_messages_section_header",
|
||||
".direct-messages-container.zoom-out #private_messages_section_header",
|
||||
(e) => {
|
||||
if ($(e.target).closest("#show_all_private_messages").length === 1) {
|
||||
// Let the browser handle the "all direct messages" widget.
|
||||
|
@ -747,7 +747,7 @@ export function initialize() {
|
|||
* this click handler rather than just a link. */
|
||||
$("body").on(
|
||||
"click",
|
||||
".private_messages_container.zoom-in #private_messages_section_header",
|
||||
".direct-messages-container.zoom-in #private_messages_section_header",
|
||||
(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
|
@ -21,7 +21,7 @@ let zoomed = false;
|
|||
|
||||
function get_private_messages_section_header() {
|
||||
return $(
|
||||
".private_messages_container #private_messages_section #private_messages_section_header",
|
||||
".direct-messages-container #private_messages_section #private_messages_section_header",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -118,11 +118,11 @@ export function update_dom_with_unread_counts(counts) {
|
|||
}
|
||||
|
||||
export function highlight_all_private_messages_view() {
|
||||
$(".private_messages_container").addClass("active_private_messages_section");
|
||||
$(".direct-messages-container").addClass("active_private_messages_section");
|
||||
}
|
||||
|
||||
function unhighlight_all_private_messages_view() {
|
||||
$(".private_messages_container").removeClass("active_private_messages_section");
|
||||
$(".direct-messages-container").removeClass("active_private_messages_section");
|
||||
}
|
||||
|
||||
function scroll_pm_into_view($target_li) {
|
||||
|
@ -188,7 +188,7 @@ export function toggle_private_messages_section() {
|
|||
function zoom_in() {
|
||||
zoomed = true;
|
||||
update_private_messages();
|
||||
$(".private_messages_container").removeClass("zoom-out").addClass("zoom-in");
|
||||
$(".direct-messages-container").removeClass("zoom-out").addClass("zoom-in");
|
||||
$("#streams_list").hide();
|
||||
$(".left-sidebar .right-sidebar-items").hide();
|
||||
}
|
||||
|
@ -196,20 +196,20 @@ function zoom_in() {
|
|||
function zoom_out() {
|
||||
zoomed = false;
|
||||
update_private_messages();
|
||||
$(".private_messages_container").removeClass("zoom-in").addClass("zoom-out");
|
||||
$(".direct-messages-container").removeClass("zoom-in").addClass("zoom-out");
|
||||
$("#streams_list").show();
|
||||
$(".left-sidebar .right-sidebar-items").show();
|
||||
}
|
||||
|
||||
export function initialize() {
|
||||
$(".private_messages_container").on("click", "#show-more-direct-messages", (e) => {
|
||||
$(".direct-messages-container").on("click", "#show-more-direct-messages", (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
zoom_in();
|
||||
});
|
||||
|
||||
$(".private_messages_container").on("click", "#hide-more-direct-messages", (e) => {
|
||||
$(".direct-messages-container").on("click", "#hide-more-direct-messages", (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ export function initialize() {
|
|||
delegate("body", {
|
||||
target: "#pm_tooltip_container",
|
||||
onShow(instance) {
|
||||
if ($(".private_messages_container").hasClass("zoom-in")) {
|
||||
if ($(".direct-messages-container").hasClass("zoom-in")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
.app-main,
|
||||
.column-middle,
|
||||
#streams_header,
|
||||
.private_messages_container {
|
||||
.direct-messages-container {
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ li.show-more-topics {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.private_messages_container {
|
||||
.direct-messages-container {
|
||||
margin-right: 16px;
|
||||
margin-left: 6px;
|
||||
z-index: 1;
|
||||
|
@ -1168,7 +1168,7 @@ li.topic-list-item {
|
|||
display: none;
|
||||
}
|
||||
|
||||
&.private_messages_container ul.pm-list {
|
||||
&.direct-messages-container ul.pm-list {
|
||||
margin-bottom: $bottom_scrolling_buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="private_messages_sticky_header" class="private_messages_container zoom-out hidden-for-spectators">
|
||||
<div id="private_messages_sticky_header" class="direct-messages-container zoom-out hidden-for-spectators">
|
||||
<div id="private_messages_section">
|
||||
<div id="private_messages_section_header" class="zoom-out zoom-in-sticky">
|
||||
<span id="pm_tooltip_container">
|
||||
|
@ -148,7 +148,7 @@
|
|||
</div>
|
||||
{{~!-- squash whitespace --~}}
|
||||
<div id="left_sidebar_scroll_container" class="scrolling_list" data-simplebar>
|
||||
<div class="private_messages_container zoom-out hidden-for-spectators">
|
||||
<div class="direct-messages-container zoom-out hidden-for-spectators">
|
||||
<div id="private_messages_list"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ run_test("update_dom_with_unread_counts", () => {
|
|||
|
||||
const $total_count = $.create("total-count-stub");
|
||||
const $private_li = $(
|
||||
".private_messages_container #private_messages_section #private_messages_section_header",
|
||||
".direct-messages-container #private_messages_section #private_messages_section_header",
|
||||
);
|
||||
$private_li.set_find_results(".unread_count", $total_count);
|
||||
|
||||
|
|
Loading…
Reference in New Issue