Module: aikau/core/BaseWidget

aikau/core/BaseWidget

This renderer can be used to both display a count of comments on a particular node as well as providing a link to where comments can be added, edited or deleted. The link can either be to particular page or alternatively can be used with a VerticalReveal, the DialogService or some other widget or service to display a Comments List. For example the standard Document Library Detailed View uses the [VerticalReveal]{@link module:alfresco/layout/VerticalReveal} approach to allow inline commenting.
Author:
  • Dave Draper
License:
Source:

Mixes In

Members

commentCountProperty :string

The dot-notation property to use for the count of comments. Can be overridden.
Type:
  • string
Default Value:
  • "node.properties.fm:commentCount"
Source:

cssRequirements :object[]

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

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/Comments.properties"}]
Source:

linkTarget :string

The comment link target, defaults to opening the link in the current browser tab or window.
Type:
  • string
Default Value:
  • "CURRENT"
Source:

publicationCountProperty :string

The dot-notation property to retrieve from the payload published on the subscriptionTopic to use to set the comment count with. By default this assumes it will be triggered from an list publishing on the same scope and therefore uses the total number of documents that this list contains.
Type:
  • string
Default Value:
  • "totalRecords"
Source:

subscriptionTopic :string

The topic to subscribe to in order to get the latest count of comments.
Type:
  • string
Default Value:
  • null
Source:

targetUrlType :string

The type of comment link URL. Should only be overridden by extending modules not through configuration.
Type:
  • string
Default Value:
  • "FULL_PATH"
Source:

Methods

createWidgetDom()

Overrides the inherited function to construct the DOM for the widget using native browser capabilities.
Since:
  • 1.0.101
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:

onCommentClick(evt)

Handles clicking on the comments link click and issues a navigation request unless a specific publishTopic has been provided (in which case that topic will be published on instead using the configured publishPayload).
Parameters:
Name Type Description
evt object The click event
Source:

onCommentCountUpdate(payload)

Called whenever the subscriptionTopic is published on and updates the rendered count of comments with the attribute defined by the publicationCountProperty.
Parameters:
Name Type Description
payload object
Source:

postCreate()

Source:

postMixInProperties()

Set up the attributes to be used when rendering the template.
Source: