Module: alfresco/renderers/DateLink

alfresco/renderers/DateLink

Extends the Date renderer (module:alfresco/renderers/Date) to provide a linked date.
Author:
  • Richard Smith
License:
Source:

Extends

  • alfresco/renderers/Date

Members

publishPayloadItemMixin :boolean

Sets the default behaviour to prevent the currentItem from being mixed into the publishPayload.
Type:
  • boolean
Default Value:
  • false
Source:

publishPayloadModifiers :array

Sets the default modifiers to use. These will automatically perform token substitution with values from the current item and replace any colons with underscores. These modifiers will only be applied if the publishPayloadType is not changed from "PROCESS".
Type:
  • array
Default Value:
  • ["processCurrentItemTokens", "replaceColons"]
Source:

publishPayloadType :string

Sets the default publishPayload generation to be "PROCESS" which will apply the modifier functions defined in the publishPayloadModifiers array.
Type:
  • string
Default Value:
  • "PROCESS"
Source:

useCurrentItemAsPayload :boolean

If this is set to true then the current item will be published when the link is clicked. If set to false then the payload will be generated from the configured value.
Type:
  • boolean
Default Value:
  • true
Source:

Methods

createWidgetDom()

Overrides the inherited function to construct the DOM for the widget using native browser capabilities.
Since:
  • 1.0.101
Source:

getPublishPayload() → {string}

Gets the topic to be published on. This has been abstracted to a separate function so that it can be easily overridden, an example of this is the SearchResultPropertyLink
Source:
Returns:
The currentItem being renderered.
Type
string

getPublishTopic() → {string}

Gets the topic to be published on. This has been abstracted to a separate function so that it can be easily overridden, an example of this is the SearchResultPropertyLink
Source:
Returns:
The configured publishTopic
Type
string

onLinkClick(evt)

Handles the date being clicked. This stops the click event from propogating further through the DOM (to prevent any wrapping anchor elements from triggering browser navigation) and then publishes the configured topic and payload.
Parameters:
Name Type Description
evt object The details of the click event
Source: