ui_report: Remove class when hiding the status element.

It is important to remove the class when hiding the status
element to make sure that when showing status again by calling
some other function than ui_report.message, for example using
loading.make_indicator, the status text should not be styled
as per the class used previously.

One example can be that "Saving" text in indicator can be shown
in "red" color, used for showing errors, if previously an error
response was showed in that status element.
This commit is contained in:
Sahil Batra
2025-06-16 17:04:18 +05:30
committed by Tim Abbott
parent b3a682f794
commit df0e70726c

View File

@@ -27,7 +27,7 @@ export function message(
.fadeTo(0, 1);
if (remove_after !== undefined) {
setTimeout(() => {
$status_box.fadeOut(400);
$status_box.fadeOut(400, () => $status_box.removeClass(cls));
}, remove_after);
}
$status_box.addClass("show");