mirror of https://github.com/zulip/zulip.git
stream_settings: Remove unused parameters after migration to tippy.
This commit is contained in:
parent
920a5eac1a
commit
d221cb92c6
|
@ -143,7 +143,7 @@ function show_subscription_settings(sub) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stream_data.can_toggle_subscription(sub)) {
|
if (!stream_data.can_toggle_subscription(sub)) {
|
||||||
stream_ui_updates.initialize_cant_subscribe_popover(sub);
|
stream_ui_updates.initialize_cant_subscribe_popover();
|
||||||
}
|
}
|
||||||
|
|
||||||
const $subscriber_container = $edit_container.find(".edit_subscribers_for_stream");
|
const $subscriber_container = $edit_container.find(".edit_subscribers_for_stream");
|
||||||
|
|
|
@ -15,12 +15,7 @@ import * as stream_edit from "./stream_edit";
|
||||||
import * as stream_settings_containers from "./stream_settings_containers";
|
import * as stream_settings_containers from "./stream_settings_containers";
|
||||||
import * as stream_settings_ui from "./stream_settings_ui";
|
import * as stream_settings_ui from "./stream_settings_ui";
|
||||||
|
|
||||||
export function initialize_disable_btn_hint_popover(
|
export function initialize_disable_btn_hint_popover($btn_wrapper, hint_text) {
|
||||||
$btn_wrapper,
|
|
||||||
$popover_btn,
|
|
||||||
$disabled_btn,
|
|
||||||
hint_text,
|
|
||||||
) {
|
|
||||||
tippy($btn_wrapper[0], {
|
tippy($btn_wrapper[0], {
|
||||||
content: hint_text,
|
content: hint_text,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
@ -29,13 +24,10 @@ export function initialize_disable_btn_hint_popover(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initialize_cant_subscribe_popover(sub) {
|
export function initialize_cant_subscribe_popover() {
|
||||||
const $button_wrapper = $(".settings .stream_settings_header .sub_unsub_button_wrapper");
|
const $button_wrapper = $(".settings .stream_settings_header .sub_unsub_button_wrapper");
|
||||||
const $settings_button = stream_settings_ui.settings_button_for_sub(sub);
|
|
||||||
initialize_disable_btn_hint_popover(
|
initialize_disable_btn_hint_popover(
|
||||||
$button_wrapper,
|
$button_wrapper,
|
||||||
$settings_button,
|
|
||||||
$settings_button,
|
|
||||||
$t({defaultMessage: "Only stream members can add users to a private stream"}),
|
$t({defaultMessage: "Only stream members can add users to a private stream"}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +83,7 @@ export function update_settings_button_for_sub(sub) {
|
||||||
$settings_button.css("pointer-events", "");
|
$settings_button.css("pointer-events", "");
|
||||||
} else {
|
} else {
|
||||||
$settings_button.attr("title", "");
|
$settings_button.attr("title", "");
|
||||||
initialize_cant_subscribe_popover(sub);
|
initialize_cant_subscribe_popover();
|
||||||
$settings_button.prop("disabled", true);
|
$settings_button.prop("disabled", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,10 +220,6 @@ export function update_add_subscriptions_elements(sub) {
|
||||||
|
|
||||||
// Otherwise, we adjust whether the widgets are disabled based on
|
// Otherwise, we adjust whether the widgets are disabled based on
|
||||||
// whether this user is authorized to add subscribers.
|
// whether this user is authorized to add subscribers.
|
||||||
const $input_element = $add_subscribers_container.find(".input").expectOne();
|
|
||||||
const $button_element = $add_subscribers_container
|
|
||||||
.find('button[name="add_subscriber"]')
|
|
||||||
.expectOne();
|
|
||||||
const allow_user_to_add_subs = sub.can_add_subscribers;
|
const allow_user_to_add_subs = sub.can_add_subscribers;
|
||||||
|
|
||||||
enable_or_disable_add_subscribers_elements($add_subscribers_container, allow_user_to_add_subs);
|
enable_or_disable_add_subscribers_elements($add_subscribers_container, allow_user_to_add_subs);
|
||||||
|
@ -248,12 +236,7 @@ export function update_add_subscriptions_elements(sub) {
|
||||||
defaultMessage: "Only stream members can add users to a private stream.",
|
defaultMessage: "Only stream members can add users to a private stream.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initialize_disable_btn_hint_popover(
|
initialize_disable_btn_hint_popover($add_subscribers_container, tooltip_message);
|
||||||
$add_subscribers_container,
|
|
||||||
$input_element,
|
|
||||||
$button_element,
|
|
||||||
tooltip_message,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,6 @@ export function update_add_members_elements(group) {
|
||||||
|
|
||||||
stream_ui_updates.initialize_disable_btn_hint_popover(
|
stream_ui_updates.initialize_disable_btn_hint_popover(
|
||||||
$add_members_container,
|
$add_members_container,
|
||||||
$input_element,
|
|
||||||
$button_element,
|
|
||||||
$t({defaultMessage: "Only group members can add users to a group."}),
|
$t({defaultMessage: "Only group members can add users to a group."}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue