mirror of https://github.com/zulip/zulip.git
compose: Add utility function to clear all compose banners.
This commit is contained in:
parent
6608f2b211
commit
ff8d209807
|
@ -65,6 +65,10 @@ export function clear_warnings(): void {
|
|||
$(`#compose_banners .${CSS.escape(WARNING)}`).remove();
|
||||
}
|
||||
|
||||
export function clear_all(): void {
|
||||
$(`#compose_banners`).empty();
|
||||
}
|
||||
|
||||
export function show_error_message(message: string, classname: string, $bad_input?: JQuery): void {
|
||||
$(`#compose_banners .${CSS.escape(classname)}`).remove();
|
||||
|
||||
|
|
|
@ -310,9 +310,7 @@ export function process_escape_key(e) {
|
|||
|
||||
// Check for errors in compose box; close errors if they exist
|
||||
if ($(".compose_banner").length) {
|
||||
compose_banner.clear_message_sent_banners();
|
||||
compose_banner.clear_errors();
|
||||
compose_banner.clear_warnings();
|
||||
compose_banner.clear_all();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue