Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

js: Fix no-jquery/no-sizzle.

Anders Kaseorgeb7770565a79
diff --git a/static/js/settings_panel_menu.js b/static/js/settings_panel_menu.js
index d3393c8439b..817d98092d4 100644
--- a/static/js/settings_panel_menu.js
+++ b/static/js/settings_panel_menu.js
@@ -82,12 +82,12 @@ export class SettingsPanelMenu {
}
prev() {
- this.$curr_li.prevAll(":visible:first").trigger("focus").trigger("click");
+ this.$curr_li.prevAll(":visible").first().trigger("focus").trigger("click");
return true;
}
next() {
- this.$curr_li.nextAll(":visible:first").trigger("focus").trigger("click");
+ this.$curr_li.nextAll(":visible").first().trigger("focus").trigger("click");
return true;
}
diff --git a/static/js/settings_profile_fields.js b/static/js/settings_profile_fields.js
index 313181151eb..4be2caa0fcc 100644
--- a/static/js/settings_profile_fields.js
+++ b/static/js/settings_profile_fields.js
@@ -126,7 +126,7 @@ function clear_form_data() {
$("#custom_external_account_url_pattern").hide();
$("#profile_field_external_accounts").hide();
$("#profile_field_external_accounts_type").val(
- $("#profile_field_external_accounts_type option:first").val(),
+ $("#profile_field_external_accounts_type option:first-child").val(),
);
}
diff --git a/static/js/stream_create.js b/static/js/stream_create.js
index 5c92de4423d..6a3f8ec9674 100644
--- a/static/js/stream_create.js
+++ b/static/js/stream_create.js
@@ -294,7 +294,7 @@ export function show_new_stream_modal() {
stream_create_subscribers.build_widgets();
// Select the first visible and enabled choice for stream privacy.
- $("#make-invite-only input:visible:not([disabled]):first").prop("checked", true);
+ $("#make-invite-only input:visible:not([disabled])").first().prop("checked", true);
// Make the options default to the same each time:
// "announce stream" on.
$("#stream_creation_form .stream-message-retention-days-input").hide();
diff --git a/static/js/stream_settings_ui.js b/static/js/stream_settings_ui.js
index 93ab685375c..997f208583e 100644
--- a/static/js/stream_settings_ui.js
+++ b/static/js/stream_settings_ui.js
@@ -1022,12 +1022,14 @@ export function update_web_public_stream_privacy_option_state($container) {
}
$web_public_stream_elem.closest(".radio-input-parent").hide();
$container
- .find(".stream-privacy-values .radio-input-parent:visible:last")
+ .find(".stream-privacy-values .radio-input-parent:visible")
+ .last()
.css("border-bottom", "none");
} else {
if (!$web_public_stream_elem.is(":visible")) {
$container
- .find(".stream-privacy-values .radio-input-parent:visible:last")
+ .find(".stream-privacy-values .radio-input-parent:visible")
+ .last()
.css("border-bottom", "");
$web_public_stream_elem.closest(".radio-input-parent").show();
}