Module: alfresco/core/_PublishOrLinkMixin

alfresco/core/_PublishOrLinkMixin

This mixin makes it easy to add clickable functionality to a widget that will either publish a topic or navigate to a page.

By providing a publishTopic in the config, the widget will publish to that topic when clicked (publishPayload, publishGlobal and publishToParent are also supported).

By providing a targetUrl (and optional targetUrlType), the widget will act as a link when clicked

This mixin derives its functionality from two other mixins in order to provide a simple way of decorating a widget to add "clicking functionality". Please note though that the enhanced capabilities of _HtmlAnchorMixin and _PublishPayloadMixin are also available to anyone mixing in this class.

Since:
  • 1.0.40
Author:
  • Martin Doyle
License:
Source:

Members

clickBubbling :boolean

By default, clicks on the image will bubble up. To prevent click bubbling, simply set this to false.
Type:
  • boolean
Since:
  • 1.0.69
Default Value:
  • true
Source:

cssRequirements :object[]

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

excludeFromTabOrder :boolean

When set to true, the widget/anchors will be removed from the page tab-order by setting the tabindex to -1. This overrides and changes the inherited value.
Type:
  • boolean
Default Value:
  • false
Source:
See:

label :string

The title text to put on the generated link(s).
Type:
  • string
Default Value:
  • null
Source:

targetUrl :string

This is the URL to navigate to when the widget is clicked.
Type:
  • string
Default Value:
  • null
Source:

targetUrlType :string

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

wrapAllChildren :boolean

When set to true, all of the direct children of this widget's root node will be wrapped in a single anchor, rather than the default _HtmlAnchorMixin behaviour. This overrides and changes the inherited value.
Type:
  • boolean
Default Value:
  • true
Source:
See:

Methods

doPublish(evt)

Publish to the specified topic.
Parameters:
Name Type Description
evt Object The click-event that triggered the publish.
Source:

postCreate()

Run after widget created
Source: