Files
zulip/static/js/portico/header.js
Anders Kaseorg f3726db89a js: Normalize strings to double quotes.
Prettier would do this anyway, but it’s separated out for a more
reviewable diff.  Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:24 -07:00

17 lines
510 B
JavaScript

$(() => {
$(".portico-header li.logout").on("click", () => {
$("#logout_form").submit();
return false;
});
$("body").click((e) => {
const $this = $(e.target);
if ($this.closest(".dropdown .dropdown-pill").length > 0 && !$(".dropdown").hasClass("show")) {
$(".dropdown").addClass("show");
} else if (!$this.is(".dropdown ul") && $this.closest(".dropdown ul").length === 0) {
$(".dropdown").removeClass("show");
}
});
});