2021-03-11 05:43:45 +01:00
|
|
|
import $ from "jquery";
|
|
|
|
|
2020-07-02 01:45:54 +02:00
|
|
|
$(() => {
|
2020-07-15 01:29:15 +02:00
|
|
|
$(".portico-header li.logout").on("click", () => {
|
2020-07-20 21:24:26 +02:00
|
|
|
$("#logout_form").trigger("submit");
|
2017-09-29 01:31:55 +02:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2020-07-20 21:26:58 +02:00
|
|
|
$("body").on("click", (e) => {
|
2019-11-02 00:06:25 +01:00
|
|
|
const $this = $(e.target);
|
2017-09-29 01:31:55 +02:00
|
|
|
|
2020-07-15 00:34:28 +02:00
|
|
|
if (
|
|
|
|
$this.closest(".dropdown .dropdown-pill").length > 0 &&
|
|
|
|
!$(".dropdown").hasClass("show")
|
|
|
|
) {
|
2017-09-29 01:31:55 +02:00
|
|
|
$(".dropdown").addClass("show");
|
|
|
|
} else if (!$this.is(".dropdown ul") && $this.closest(".dropdown ul").length === 0) {
|
|
|
|
$(".dropdown").removeClass("show");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|