mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
It allows the click handler for the "x" button, and the stacktrace toggler to be shared between webapp and the portico pages. Reimplements #17801.
15 lines
429 B
TypeScript
15 lines
429 B
TypeScript
import $ from "jquery";
|
|
|
|
// this will hide the alerts that you click "x" on.
|
|
$("body").on("click", ".alert-box > div .exit", function () {
|
|
const $alert = $(this).closest(".alert-box > div");
|
|
$alert.addClass("fade-out");
|
|
setTimeout(() => {
|
|
$alert.removeClass("fade-out show");
|
|
}, 300);
|
|
});
|
|
|
|
$(".alert-box").on("click", ".stackframe", function () {
|
|
$(this).siblings(".code-context").toggle("fast");
|
|
});
|