js: Prefix jQuery object variable names with $.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-01-25 02:36:19 -08:00
parent f21842e920
commit f84a2c08d5
195 changed files with 4883 additions and 4835 deletions

View File

@@ -2,7 +2,7 @@ import $ from "jquery";
import * as common from "./common";
export function show(error_html: string, bad_input?: JQuery, alert_class = "alert-error"): void {
export function show(error_html: string, $bad_input?: JQuery, alert_class = "alert-error"): void {
$("#compose-send-status")
.removeClass(common.status_classes)
.addClass(alert_class)
@@ -14,13 +14,13 @@ export function show(error_html: string, bad_input?: JQuery, alert_class = "aler
$("#compose-send-button span").show();
$("#compose-send-button").removeClass("disable-btn");
if (bad_input !== undefined) {
bad_input.trigger("focus").trigger("select");
if ($bad_input !== undefined) {
$bad_input.trigger("focus").trigger("select");
}
}
export function show_not_subscribed(error_html: string, bad_input?: JQuery): void {
show(error_html, bad_input, "home-error-bar");
export function show_not_subscribed(error_html: string, $bad_input?: JQuery): void {
show(error_html, $bad_input, "home-error-bar");
$(".compose-send-status-close").hide();
}