Module: alfresco/documentlibrary/AlfSelectedItemsMenuBarPopup

alfresco/documentlibrary/AlfSelectedItemsMenuBarPopup

Extends the AlfMenuBarPopup widget to listen to publications that indicate that documents have been selected and disables the menu bar if nothing is selected. This widget actively monitors the state of selected items so that any menu items contained in the pop-up menu that are used will have the selected nodes "attached" to their payload by the onSelectedDocumentsAction function. If [processActionPayloads]{@link module:alfresco/menus/AlfMenuBarPopup#processActionPayloads} is configured to be true then this function will also process the action payload and swap out any "{nodes}" tokens with the array of selected nodes.
Author:
  • Dave Draper
License:
Source:

Members

disabled :boolean

Overrides the default to initialise as disabled.
Type:
  • boolean
Default Value:
  • true
Source:

disableWhenNothingSelected :boolean

Overrides the inherited default to ensure that the popup is disabled when no items are selected.
Type:
  • boolean
Since:
  • 1.0.39
Default Value:
  • true
Source:

passive :boolean

Controls whether or not this widget actively tracks the selected items or passively subscribes to topics that indicate the items that have been selected. It is NOT passive by default.
Type:
  • boolean
Default Value:
  • true
Source:

processActionPayloads :boolean

This can be configured so that action payloads are processed for the existence of a "{nodes}" token. If one is found then it will be swapped out with the array of selected nodes.
Type:
  • boolean
Since:
  • 1.0.38
Default Value:
  • false
Source:

Methods

onFilesSelected(payload)

Called when selectedDocumentsChangeTopic is published on and disables the popup menu if no files have been selected.
Parameters:
Name Type Description
payload object The details of the selected files.
Source:

onSelectedDocumentsAction(payload)

This function handles requests to perform actions on the currently selected documents. It takes the provided payload and updates it with the
Parameters:
Name Type Description
payload object The payload containing the details of the action being requested
Source:
Fires:
  • alfresco/core/topics#event:MULTIPLE_ITEM_ACTION_REQUEST

postCreate()

Extends the superclass function to subscribe to the selectedDocumentsChangeTopic topic which is handled by [onFilesSelected]{@link module:alfresco/documentlibrary/AlfSelectedItemsMenuBarPopup#onFilesSelected}. However, when passive is configured as false then it subscribes to the topics to track item selection and deselection
Source:
Listens to Events: