Module: alfresco/renderers/_XhrActionsMixin

alfresco/renderers/_XhrActionsMixin

This mixin extends the standard actions mixin to allow Alfresco folder or document actions to be asynchronously retrieved when only the NodeRef is known.

Author:
  • Dave Draper
License:
Source:

Members

actionView :string

The name of the view for which to load actions. Depending on the backend loading actions this may allow a differentiation between various scopes that actions have been associated with.
Type:
  • string
Since:
  • 1.0.79
Source:

currentItemSiteShortNameKey :string

The lookup key into current item to retrieve the short name of the site in which the current item is located. This may be relevant to correctly obtain all item actions if evaluation of these actions is dependant on the site scope.
Type:
  • string
Since:
  • 1.0.79
Source:

i18nRequirements :object

The array of file(s) containing internationalised strings.
Type:
  • object
Since:
  • 1.0.46
Default Value:
  • [{i18nFile: "./i18n/_XhrActionsMixin.properties"}]
Source:

Methods

addXhrItems()

Adds the menu items for the asynchronously retrieved data. Called from onXhrData.
Source:

createDropDownMenu(callback)

Overrides the inherited function to call loadActions to ensure that the actions are loaded before the drop-down menu is displayed.
Parameters:
Name Type Description
callback function The function to call to display the drop-down
Since:
  • 1.0.62
Source:

getXhrData(callback)

Publishes a request to retrieve the full Node data for the current item.
Parameters:
Name Type Description
callback function The function to call to display the drop-down
Source:
Fires:
  • module:alfresco/core/topics#event:GET_DOCUMENT

loadActions(callback)

Called whenever the user opens up the actions pop-up menu. If an XHR request has not yet been made to retrieve the full Node data for the current item then the getXhrData function will be called, otherwise the previously rendered actions will be shown.
Parameters:
Name Type Description
callback function The function to call to display the drop-down
Source:

onXhrData(callback, payload)

Handles the processing of the asynchronously requested data. It calls addXhrItems to render the actions.
Parameters:
Name Type Description
callback function The function to call to display the drop-down
payload object
Source: