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

fix further action menu bug reported by @HDinger

Jonas Jabari7a2e78e880cc
diff --git a/modules/meeting/app/controllers/meeting_sections_controller.rb b/modules/meeting/app/controllers/meeting_sections_controller.rb
index 3b4bc3ba519..71e4fc6fe7f 100644
--- a/modules/meeting/app/controllers/meeting_sections_controller.rb
+++ b/modules/meeting/app/controllers/meeting_sections_controller.rb
@@ -52,7 +52,8 @@ class MeetingSectionsController < ApplicationController
if call.success?
add_section_via_turbo_stream
update_section_header_via_turbo_stream(state: :edit)
- update_new_button_via_turbo_stream(disabled: true)
+ # update the section header of the previously last section in order to ensure the action menu move options are updated
+ update_section_header_via_turbo_stream(meeting_section: @meeting.sections.last(2).first)
else
render_base_error_in_flash_message_via_turbo_stream(call.errors)
end
@@ -90,7 +91,6 @@ class MeetingSectionsController < ApplicationController
if call.success?
update_section_header_via_turbo_stream(state: :show)
- update_new_button_via_turbo_stream(disabled: false)
update_header_component_via_turbo_stream
update_sidebar_details_component_via_turbo_stream
else
@@ -112,6 +112,8 @@ class MeetingSectionsController < ApplicationController
# in case the destroy action was called from the cancel_edit action
# we need to update the new button state, which was disabled before
update_new_button_via_turbo_stream(disabled: false)
+ # update all section headers in order to ensure the action menu move options are updated
+ update_section_headers_via_turbo_stream
else
generic_call_failure_response(call)
end
@@ -128,7 +130,7 @@ class MeetingSectionsController < ApplicationController
# the DOM is already updated on the client-side through the drag
# in order to preserve an edit state within the section,
# we don't send a server-side rendered update via `move_section_via_turbo_stream`
- # update all section header in order to ensure the action menu move options are updated
+ # update all section headers in order to ensure the action menu move options are updated
update_section_headers_via_turbo_stream
# update all time slots as a section position change affects potentially all time slots
update_show_items_via_turbo_stream
@@ -150,6 +152,8 @@ class MeetingSectionsController < ApplicationController
# unlike at the drop action, we need to send server-side rendered updates in order to reflect the new position
# thus an edit state inside the section gets lost
update_header_component_via_turbo_stream
+ # update all section headers in order to ensure the action menu move options are updated
+ update_section_headers_via_turbo_stream
# update all time slots as a section position change affects potentially all time slots
update_show_items_via_turbo_stream
else