Module: alfresco/menus/_AlfMenuItemMixin

alfresco/menus/_AlfMenuItemMixin

Author:
  • Dave Draper
  • Richard Smith
License:
Source:

Members

cssRequirements :object[]

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

disablementTopic :string

The topic whose publication should trigger disablement/enablement function
Type:
  • string
Default Value:
  • null
Source:

iconAltText :string

Type:
  • string
Source:

iconImageHeight :string

Defines the image height for the menu item icon. An image is only used if no explicit CSS class is set.
Type:
  • string
Default Value:
  • "16px"
Source:

iconImageWidth :string

Defines the image width for the menu item icon. An image is only used if no explicit CSS class is set.
Type:
  • string
Default Value:
  • "16px"
Source:

publishOnRender :Boolean

Should we publish the publishTopic when we initially render the item?
Type:
  • Boolean
Default Value:
  • false
Source:

selectionTopic :string

The topic that the widget will listen to.
Type:
  • string
Default Value:
  • null
Source:

targetUrl :string

If a 'targetUrl' attribute is provided the value will be passed as a publication event to the NavigationService to reload the page to the URL defined.
Type:
  • string
Default Value:
  • null
Source:

targetUrlLocation :string

Indicates whether or not the URL should be opened in the current window/tab or in a new window.
Type:
  • string
Default Value:
  • "CURRENT"
Source:

targetUrlType :string

Indicates how the target URL should be handled.
Type:
  • string
Default Value:
Source:

Methods

disable(payload)

This function enables or disables the menu item based upon parameter 'payload.value'.
Parameters:
Name Type Description
payload object
Source:

getAnchorTargetSelectors()

Returns an array containing the selector that identifies the span to wrap in an anchor. This overrides the mixed in function that just returns an empty array.
Source:

handleSelection(payload)

Parameters:
Name Type Description
payload object The payload from the publication on the selection topic
Source:

onClick(evt)

Overrides the default onClick function. Currently only supports page navigation.
Parameters:
Name Type Description
evt object The click event
Source:

onContextMenu(evt)

Extension point for handling context click events. By default this performs no action.
Parameters:
Name Type Description
evt event The context menu event
Source:

postCreate()

Ensures that the supplied menu item label is translated.
Source:

postMixInProperties()

It's important to perform label encoding before buildRendering occurs (e.g. before postCreate) to ensure that an unencoded label isn't set and then replaced.
Source:

setupIconNode()

Source: