mirror of https://github.com/zulip/zulip.git
compose: Add a helper function to find the banner container.
This commit is contained in:
parent
3b35307c20
commit
394b3586b9
|
@ -51,6 +51,12 @@ export const CLASSNAMES = {
|
|||
user_not_subscribed: "user_not_subscribed",
|
||||
};
|
||||
|
||||
export function get_compose_banner_container($textarea: JQuery): JQuery {
|
||||
return $textarea.attr("id") === "compose-textarea"
|
||||
? $("#compose_banners")
|
||||
: $textarea.closest(".message_edit_form").find(".edit_form_banners");
|
||||
}
|
||||
|
||||
// This function provides a convenient way to add new elements
|
||||
// to a banner container. The function accepts a container element
|
||||
// as a parameter, to which a banner should be appended.
|
||||
|
|
Loading…
Reference in New Issue