mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
[OP-19404] Section cannot be dragged and dropped outside of current view (#23527)
Fix type form section drag auto-scroll
This commit is contained in:
committed by
GitHub
parent
57a64424d0
commit
78f5124afd
+1
-2
@@ -1,7 +1,6 @@
|
||||
<%=
|
||||
component_wrapper(
|
||||
class: "type-form-configuration-page--main-inner",
|
||||
data: main_inner_data
|
||||
class: "type-form-configuration-page--main-inner"
|
||||
) do
|
||||
flex_layout do |main|
|
||||
main.with_row do
|
||||
|
||||
@@ -47,13 +47,6 @@ module WorkPackageTypes
|
||||
@ee_available
|
||||
end
|
||||
|
||||
def main_inner_data
|
||||
{
|
||||
controller: "admin--type-form-configuration--drag-and-drop",
|
||||
"admin--type-form-configuration--drag-and-drop-handle-selector-value": ".group-handle"
|
||||
}
|
||||
end
|
||||
|
||||
def groups_container_data
|
||||
{
|
||||
"test-selector": "type-form-configuration-groups-container",
|
||||
|
||||
@@ -42,7 +42,10 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
<% end %>
|
||||
|
||||
<% content.with_main(classes: "type-form-configuration-page--main") do %>
|
||||
<div class="type-form-configuration-page--active-list" data-admin--type-form-configuration--rows-drag-and-drop-target="scrollContainer">
|
||||
<%= tag.div(
|
||||
class: "type-form-configuration-page--active-list",
|
||||
data: active_list_data
|
||||
) do %>
|
||||
<%= render(EnterpriseEdition::BannerComponent.new(:edit_attribute_groups, mb: 3)) %>
|
||||
|
||||
<% unless ee_available? %>
|
||||
@@ -58,7 +61,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
ee_available: ee_available?
|
||||
)
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -55,6 +55,15 @@ module WorkPackageTypes
|
||||
}
|
||||
end
|
||||
|
||||
def active_list_data
|
||||
{
|
||||
controller: "admin--type-form-configuration--drag-and-drop",
|
||||
"admin--type-form-configuration--drag-and-drop-handle-selector-value": ".group-handle",
|
||||
"admin--type-form-configuration--drag-and-drop-target": "scrollContainer",
|
||||
"admin--type-form-configuration--rows-drag-and-drop-target": "scrollContainer"
|
||||
}
|
||||
end
|
||||
|
||||
def group_components
|
||||
@groups.map.with_index do |group, i|
|
||||
WorkPackageTypes::FormConfiguration::GroupComponent.new(
|
||||
|
||||
Reference in New Issue
Block a user