The purpose of this renderer is to provide a simple action that publishes an action based on the rendered item. It was created for use in the DocumentListPicker and PickedItems widgets to allow items to be selected and unselected.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dijit/_OnDijitClickMixin
- module:alfresco/renderers/_JsNodeMixin
- module:alfresco/renderers/_PublishPayloadMixin
Members
-
altText :string
-
The alt-text for the action.
Type:
- string
- Source:
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/PublishAction.css"}]
- Source:
-
iconClass :string
-
This property has been superseded by the src and srcType properties, however it continues to work as it did previously, which is that the name of an icon (e.g. "add-icon-16") can be specified which is resolved according to the pattern `alfresco/renderers/css/images/${this.iconClass}.png`.
Type:
- string
- Default Value:
- null
- Source:
-
imageSrc :String
-
This property is auto-populated and will be injected into the template.
Type:
- String
- Since:
- 1.0.68
- Default Value:
- null
- Source:
-
onlyShowOnHover :boolean
-
Indicates that this should only be displayed when the item (note: NOT the renderer) is hovered over.
Type:
- boolean
- Since:
- 1.0.70
- Default Value:
- false
- Source:
-
publishTopic :string
-
This defines the topic that will be published on when the associated image is clicked. The payload will be the "currentItem" attribute.
Type:
- string
- Default Value:
- "ALF_ITEM_SELECTED"
- Source:
-
src :string
-
The URL of the image to use (this is used in conjunction with the [srcType]{@link module:alfresco/renderers/PublishAction#srcType} property).
Type:
- string
- Since:
- 1.0.68
- Default Value:
- "alfresco/renderers/css/images/add-icon-16.png"
- Source:
-
srcType :string
-
The type of URL to use (see urlTypes for possible values).
Type:
- string
- Since:
- 1.0.68
- Default Value:
- Source:
Methods
-
createWidgetDom()
-
Overrides the inherited function to construct the DOM for the widget using native browser capabilities.
- Since:
- 1.0.101
- Source:
-
onClick(evt)
-
Called when the user clicks on the associated image. It publishes the current item on the publishTopic attribute.
Parameters:
Name Type Description evt
object The click event object - Source:
-
postCreate()
-
Ensures that CSS classes are correctly applied.
- Since:
- 1.0.70
- Source:
-
postMixInProperties()
-
Set up the attributes to be used when rendering the template.
- Source: