flux icon indicating copy to clipboard operation
flux copied to clipboard

Drag and Drop ignores allowedContentTypes and deniedContentTypes

Open monosize opened this issue 8 years ago • 6 comments

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"or data-denied-content-types="fluidcontent_content" and if needed with data-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

monosize avatar Jan 31 '17 11:01 monosize