From afa537e35c2671ff336cfdefc5e853042e618665 Mon Sep 17 00:00:00 2001 From: Sayam Samal Date: Wed, 13 Nov 2024 18:10:47 +0530 Subject: [PATCH] ui_report: Rename btn -> button in JS variables. This commit is a part of the efforts to rename btn-related classes and variables to align with Zulip's no-abbreviations policy and streamline the search results. --- web/src/ui_report.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/ui_report.ts b/web/src/ui_report.ts index 4c3d3da799..5cd6213154 100644 --- a/web/src/ui_report.ts +++ b/web/src/ui_report.ts @@ -68,7 +68,7 @@ export function generic_embed_error(error_html: string, remove_after?: number): } } -export function generic_row_button_error(xhr: JQuery.jqXHR, $btn: JQuery): void { +export function generic_row_button_error(xhr: JQuery.jqXHR, $button: JQuery): void { let parsed; if ( xhr.status >= 400 && @@ -76,9 +76,9 @@ export function generic_row_button_error(xhr: JQuery.jqXHR, $btn: JQuery): void (parsed = z.object({msg: z.string()}).safeParse(xhr.responseJSON)).success ) { const $error = $("

").addClass("text-error").text(parsed.data.msg); - $btn.closest("td").empty().append($error); + $button.closest("td").empty().append($error); } else { - $btn.text($t({defaultMessage: "Failed!"})); + $button.text($t({defaultMessage: "Failed!"})); } }