mirror of https://github.com/zulip/zulip.git
portico-header: Fix navbar user dropdown not working.
As part of #24678, this code was accidentally removed. We just add it back to fix the broken user profile dropdown in the navbar of non corporate pages.
This commit is contained in:
parent
c27ff12b8c
commit
2553858c91
|
@ -80,4 +80,21 @@ $(() => {
|
|||
document.body.classList.remove("_full-height-no-scroll");
|
||||
}
|
||||
});
|
||||
|
||||
/* Used by navbar of non-corporate URLs. */
|
||||
$(".portico-header li.logout").on("click", () => {
|
||||
$("#logout_form").trigger("submit");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".dropdown").on("click", (e) => {
|
||||
const $this = $(e.target);
|
||||
const dropdown_is_shown = $this.closest(".dropdown").hasClass("show");
|
||||
|
||||
if (!dropdown_is_shown) {
|
||||
$this.closest(".dropdown").addClass("show");
|
||||
} else if (dropdown_is_shown) {
|
||||
$this.closest(".dropdown").removeClass("show");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue