mirror of https://github.com/zulip/zulip.git
js: Fix no-jquery/no-sizzle.
The :first and :last selectors were deprecated in jQuery 3.4. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
8ef2c0a604
commit
eb7770565a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue