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.

group_settings: Make the top and bottom edit buttons have unique ids.

PieterCKb3415e3c3b20
diff --git a/web/src/user_group_edit.ts b/web/src/user_group_edit.ts
index 7868c3930ff..97106760cdc 100644
--- a/web/src/user_group_edit.ts
+++ b/web/src/user_group_edit.ts
@@ -251,12 +251,12 @@ function update_user_group_title_buttons(group: UserGroup): void {
`.selected-group-buttons[data-group-id='${CSS.escape(group.id.toString())}'] .deactivate`,
).hide();
$(
- `.selected-group-buttons[data-group-id='${CSS.escape(group.id.toString())}'] #open_group_info_modal`,
+ `.selected-group-buttons[data-group-id='${CSS.escape(group.id.toString())}'] #group_title_open_group_info_modal`,
).hide();
return;
}
$(
- `.selected-group-buttons[data-group-id='${CSS.escape(group.id.toString())}'] #open_group_info_modal`,
+ `.selected-group-buttons[data-group-id='${CSS.escape(group.id.toString())}'] #group_title_open_group_info_modal`,
).show();
if (group.deactivated) {
@@ -2072,7 +2072,7 @@ export function initialize(): void {
$("#groups_overlay_container").on(
"click",
- "#open_group_info_modal",
+ ".open-group-info-button",
function (this: HTMLElement, e) {
e.preventDefault();
e.stopPropagation();
diff --git a/web/templates/user_group_settings/selected_group_title.hbs b/web/templates/user_group_settings/selected_group_title.hbs
index d9d4ff8dbc0..c0c85657d4a 100644
--- a/web/templates/user_group_settings/selected_group_title.hbs
+++ b/web/templates/user_group_settings/selected_group_title.hbs
@@ -8,8 +8,8 @@
{{#unless is_system_group}}
<div class="button-group selected-group-buttons" data-group-id="{{group_id}}">
<div class="left-end button-group">
- {{> ../components/icon_button icon="edit" intent="neutral" custom_classes="tippy-zulip-delayed-tooltip"
- data-tippy-content=(t 'Change group info') id="open_group_info_modal" }}
+ {{> ../components/icon_button icon="edit" intent="neutral" custom_classes="open-group-info-button tippy-zulip-delayed-tooltip"
+ data-tippy-content=(t 'Change group info') id="group_title_open_group_info_modal" }}
</div>
<div class="right-end button-group">
<div class="join_leave_button_wrapper inline-block">
diff --git a/web/templates/user_group_settings/user_group_settings.hbs b/web/templates/user_group_settings/user_group_settings.hbs
index f679ba9ba59..0e1922e3c5f 100644
--- a/web/templates/user_group_settings/user_group_settings.hbs
+++ b/web/templates/user_group_settings/user_group_settings.hbs
@@ -16,7 +16,7 @@
rendered_description=group.description }}
</div>
{{#unless group.is_system_group}}
- {{> ../components/icon_button icon="edit" intent="neutral" custom_classes="tippy-zulip-delayed-tooltip"
+ {{> ../components/icon_button icon="edit" intent="neutral" custom_classes="open-group-info-button tippy-zulip-delayed-tooltip"
data-tippy-content=(t 'Change group info') id="open_group_info_modal" }}
{{/unless}}
</div>