flux
flux copied to clipboard
Drag and Drop ignores allowedContentTypes and deniedContentTypes
If dragging an element into a flux:grid which has a defined allowedContentTypes or deniedContentTypes, the defintions are ignored and the element is added to the column.
Only a insert over the element wizard checks the valid content type!
<flux:grid.column name="elements">
<flux:form.variable name="allowedContentTypes" value="fluidcontent_content"/>
<flux:form.variable name="Fluidcontent" value="{allowedContentTypes: 'Vendor.Extension:ContentElement.html'}"/>
</flux:grid.column>
Idea
- Insert a missing check in flux for a moved element if it is allowed to move into the column.
- Extend dropzones with data attributes
data-allowed-content-types="fluidcontent_content"ordata-denied-content-types="fluidcontent_content"and if needed withdata-allowed-fluidcontent="Vendor.Extension:ContentElement.html" - Extend all dragable elements with data attributes
data-content-type="fluidcontent_content" data-fluidcontent-type="Vendor.Extension:ContentElement.html" - Extend DragDrop.js - if Drag Start find all dropzones which not allowed to drop the element and hide them. After Drop reset the dropzones.
- Changing the DragDrop.js would be easier with the new DragDrop.js form the TYPO3 8 branch