Files
zulip/static/js/portico/header.js
Brock Whittaker 53d739f9aa portico-header: Add pill with org/realm name.
This adds a pill element that includes the org/realm name that you
are currently signed into.
2017-10-26 13:56:53 -07:00

17 lines
526 B
JavaScript

$(function () {
$('.portico-header a .logout').on('click', function () {
$('#logout_form').submit();
return false;
});
$("body").click(function (e) {
var $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");
}
});
});