Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

remove unnecessary methods and strings

bsatarnejad43a0277aa8f1
diff --git a/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-participants.controller.ts b/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-participants.controller.ts
index 19972443ccf..061508d40e8 100644
--- a/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-participants.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-participants.controller.ts
@@ -35,17 +35,11 @@ export default class MeetingsSidebarParticipantsController extends Controller {
declare readonly showHideButtonTarget:HTMLInputElement;
declare readonly hiddenParticipantsTarget:HTMLElement;
- connect():void {
- this.showHiddenParticipants();
- }
-
showHiddenParticipants():void {
- this.showHideButtonTarget.addEventListener('click', () => {
- if (this.hiddenParticipantsTarget.classList.contains('d-none')) {
- this.hiddenParticipantsTarget.classList.remove('d-none');
- } else {
- this.hiddenParticipantsTarget.classList.add('d-none');
- }
- });
+ if (this.hiddenParticipantsTarget.classList.contains('d-none')) {
+ this.hiddenParticipantsTarget.classList.remove('d-none');
+ } else {
+ this.hiddenParticipantsTarget.classList.add('d-none');
+ }
}
}
diff --git a/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb b/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb
index c87f86ee526..d4dbcf6a5a7 100644
--- a/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb
+++ b/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb
@@ -61,8 +61,9 @@
end
flex.with_row(mt: 1) do
render (Primer::Beta::Button.new(scheme: :invisible,
- data: { 'meetings-sidebar-participants-target': "showHideButton" })) { I18n.t('label_meeting_show_hide_participants',
- count: @meeting.invited_or_attended_participants.count - MAX_SHOWN_PARTICIPANTS) }
+ data: { 'meetings-sidebar-participants-target': "showHideButton",
+ action: 'click->meetings-sidebar-participants#showHiddenParticipants keydown.enter->meetings-sidebar-participants#showHiddenParticipants'}))
+ { I18n.t('label_meeting_show_hide_participants', count: @meeting.invited_or_attended_participants.count - MAX_SHOWN_PARTICIPANTS) }
end
end
end
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index f0d7e537bb9..8edaad09090 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -188,8 +188,6 @@ en:
label_meeting_manage_participants: "Manage participants"
label_meeting_no_participants: "No participants"
label_meeting_show_hide_participants: "Show/hide %{count} more"
- label_meeting_show_hide_all_participants: "Show/hide all"
- label_meeting_count_participants: "%{count} participants"
label_meeting_add_participants: "Add participants"
text_meeting_not_editable_anymore: "This meeting is not editable anymore."