Module: alfresco/creation/DropZone

alfresco/creation/DropZone

Author:
  • Dave Draper
License:
Source:

Mixes In

Members

acceptTypes :string[]

The types that this drop zone will accept. By default this is set to null but if not specified in the configuration this will be initialised to ["widget"].
Type:
  • string[]
Default Value:
  • null
Source:

cssRequirements :Array

An array of the CSS files to use with this widget.
Type:
  • Array
Source:

horizontal :boolean

Type:
  • boolean
Default Value:
  • false
Source:

initialItems :object[]

A list of the initial items to add to the drop zone when it is first created.
Type:
  • object[]
Default Value:
  • null
Source:

previewTarget :object

The target for dropping widgets onto.
Type:
  • object
Default Value:
  • null
Source:

templateString :String

The HTML template to use for the widget.
Type:
  • String
Source:

Methods

creator()

This handles the creation of the widget in the preview panel.
Source:

deleteItem(evt)

Parameters:
Name Type Description
evt object The event.
Source:

getAvailableFields() → {object[]}

Source:
Returns:
The currently available fields.
Type
object[]

getMyUuid() → {string}

Source:
Returns:
The UUID of the widget associated with this DropZone.
Type
string

onWidgetSelected(e)

Although this function's name suggests it handles an nodes selection, there is no guarantee that a node has actually been selected. This is simply attached to the mouseDown event.
Parameters:
Name Type Description
e object The selection event
Source:

postCreate()

Source:

publishAvailableFields()

Publishes an array of the names of all of the currently configured fields.
Source:

refreshChildren()

This function is called as an after aspect of the onDrop function of the DND target. It is used to capture widgets being added to or removed from the DropZone.
Source:

removeReferencesFromParent(parentId, childIdToRemove)

Parameters:
Name Type Description
parentId string The ID of the parent to remove the child from
childIdToRemove string The ID of the child to remove
Source:

updateItem()

Handles updates to the configuration for a currently rendered item.
Source:

updateWidgetConfig(configToUpdateFrom, widget, i)

Parameters:
Name Type Description
configToUpdateFrom object The configuration to update the widget config from
widget object The widget to update
i number The index of the widget
Source: