Module: alfresco/dnd/DragAndDropNestedTarget

alfresco/dnd/DragAndDropNestedTarget

This extends the DragAndDropTarget to provide support for nested configuration. This is where an item dropped into another item can inherit configuration options that only apply to items dropped into that parent (e.g. the configuration is meaningless otherwise)
Author:
  • Dave Draper
License:
Source:

Members

widgetsForNestedConfig :array

An additional widgets configuration model (expected to be form controls) that are inherited from the DroppedNestedItemWrapper that this widget is expected to be used by.
Type:
  • array
Default Value:
  • null
Source:

widgetsForWrappingDroppedItems :array

The widget model used to wrap each dropped item.
Type:
  • array
Source:

Methods

allWidgetsProcessed(widgets)

Extends the inherited function to update all processed widgets to have the widgetsForNestedConfig
Parameters:
Name Type Description
widgets Array An array of all the widgets that have been processed
Source:

onItemDraggedOut()

Called whenever an item is dragged out of the current drop target. This is emits an event to indicating that this has occurred to enabled nested drop targets to be supported.
Source:

onItemDraggedOver()

Called whenever an item is dragged out of the current drop target. This is emits an event to indicating that this has occurred to enabled nested drop targets to be supported.
Source:

onItemSaved(evt)

This handles save events on any items that are nested within it. It stops the event and then emits a update items event to indicate that its overall value has been updated.
Parameters:
Name Type Description
evt object The save event
Source:

postCreate()

Extends the inherited function to capture save events emitted by nested items.
Source:

updateProcessedWidget(widget)

Sets the widgetsForNestedConfig on the processed widget.
Parameters:
Name Type Description
widget array The widget to update
Source: