Module: alfresco/menus/AlfMenuItemWrapper

alfresco/menus/AlfMenuItemWrapper

This module is used by the AlfDropDownMenu to wrap any widgets placed into a menu where the widget structure does not match the required DOM fragment for a menu item. This widget is then able to delegate user actions such as click and focus to prevent errors and ensure that keyboard navigation of menus continues to work correctly.

Author:
  • Dave Draper
License:
Source:

Mixes In

Members

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/AlfMenuItemWrapper.css"}]
Source:

item :object

The item to be wrapped.
Type:
  • object
Default Value:
  • null
Source:

templateString :string

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

Methods

_onItemFocus(arg)

This function is implemented to delegate the handling of item focus events to the wrapped item. This was added as a result of ALF-19367 because the omitted function was resulting in an error being generated in IE.
Parameters:
Name Type Description
arg object The argument to pass on
Source:

_setSelected(Indicates)

This function is implemented to delegate the handling of _setSelected calls to the wrapped item.
Parameters:
Name Type Description
Indicates boolean whether ot not the item is selected
Source:

focus()

This function is implemented to delegate the handling of focus events to the wrapped item.
Source:

isFocusable() → {boolean}

This function is implemented to indicate whether or not the wrapped item can be focused. It is focusable if the item has a focus function that can be called.
Source:
Returns:
true if there is a wrapped item and it has a focus function.
Type
boolean

onClick(evt)

This function is implemented to delegate the handling of onClick calls to the wrapped item.
Parameters:
Name Type Description
evt object The click event
Source:

postCreate()

Add the assigned item (the thing that is to be wrapped) to the appropriate DOM node in the HTML template.
Source: