Module: alfresco/renderers/QuickShare

alfresco/renderers/QuickShare

The QuickShare renderer is a customization of the toggle renderer that allows non-container nodes to be publicly shared. It renders as one of two states, unshared being the basic "toggle off" state and shared being a menu bar containing menu items for removing the share and, viewing the shared location.
Author:
  • Dave Draper
License:
Source:

Members

cssRequirements :object[]

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

i18nRequirements :object[]

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

offLabel :string

The label to show when the toggle is on
Type:
  • string
Default Value:
  • "quick-share.disabled.label"
Source:

offTooltip :string

The tooltip to show when the toggle is on
Type:
  • string
Default Value:
  • "quick-share.disabled.description"
Source:

onLabel :string

The label to show when the toggle is on
Type:
  • string
Default Value:
  • "quick-share.enabled.label"
Source:

onTooltip :string

The tooltip to show when the toggle is on
Type:
  • string
Default Value:
  • "quick-share.enabled.description"
Source:

propertyToRender :string

The property that will contain the shared ID when shared.
Type:
  • string
Default Value:
  • "jsNode.properties.qshare:sharedId"
Source:
The default quick share link
Type:
  • string
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

toggleClass :string

The CSS class to apply for the on display
Type:
  • string
Default Value:
  • "quick-share"
Source:

Methods

defineWidgets()

Defines a JSON structure for the widgets to represent the shared state options.
Source:

getInitialState() → {boolean}

Overridden to get the liked state of the current item.
Source:
Returns:
Indicating the initial state of the toggle.
Type
boolean

onToggleOffSuccess()

Called whenever the "toggleOffSuccessTopic" attribute is published on
Source:

onToggleOnSuccess()

Called whenever the "toggleOnSuccessTopic" attribute is published on
Source:

postCreate()

Source:

postMixInProperties()

Set up the attributes to be used when rendering the template.
Source:
This function is passed as the callback handler when publishing a request for the quick share link. It simply sets the "quickShareLink" attribute with the argument passed.
Parameters:
Name Type Description
link string The link to access quick shared content
Source:
This function is passed as the callback handler when publishing a request for the social link configuration. It simply sets the "socialLinks" attribute with the argument passed.
Parameters:
Name Type Description
links array The links to use when publishing quick shared content
Source: