Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ui_report: Use fadeOut to hide error.
Aman Agrawalf97d35ebd244
diff --git a/static/js/message_edit.js b/static/js/message_edit.jsindex 9c5a47239ee..04daa9d6885 100644--- a/static/js/message_edit.js+++ b/static/js/message_edit.js@@ -878,10 +878,7 @@ exports.move_topic_containing_message_to_stream =},error: function (xhr) {ui_report.error(i18n.t("Error moving the topic"), xhr,- $("#home-error"));- // The fadeTo method used by ui_report.message doesn't work- // on this. Hence we fadeOut it here.- setTimeout(() => { $("#home-error").fadeOut('slow'); }, 4000);+ $("#home-error"), 4000);},});};diff --git a/static/js/ui_report.js b/static/js/ui_report.jsindex 62b9bb89202..2af9af51f2e 100644--- a/static/js/ui_report.js+++ b/static/js/ui_report.js@@ -15,13 +15,13 @@ exports.message = function (response, status_box, cls, remove_after) {.html(response).stop(true).fadeTo(0, 1);if (remove_after) {setTimeout(() => {- status_box.fadeTo(200, 0);+ status_box.fadeOut(400);}, remove_after);}status_box.addClass("show");};-exports.error = function (response, xhr, status_box) {+exports.error = function (response, xhr, status_box, remove_after) {if (xhr && xhr.status.toString().charAt(0) === "4") {// Only display the error response for 4XX, where we've crafted// a nice response.@@ -33,7 +33,7 @@ exports.error = function (response, xhr, status_box) {}}- exports.message(response, status_box, 'alert-error');+ exports.message(response, status_box, 'alert-error', remove_after);};exports.success = function (response, status_box, remove_after) {