Module: alfresco/renderers/Toggle

alfresco/renderers/Toggle

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/Toggle.css"}]
Source:

i18nRequirements :object[]

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

isToggleOn

Source:

offLabel :string

The label to show when the toggle is on
Type:
  • string
Default Value:
  • "toggle.off.label"
Source:

offTooltip :string

The tooltip to show when the toggle is on
Type:
  • string
Default Value:
  • "toggle.off.tooltip"
Source:

onLabel :string

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

onTooltip :string

The tooltip to show when the toggle is on
Type:
  • string
Default Value:
  • "toggle.on.tooltip"
Source:

propertyToRender :string

This should be set to the dot-notation property in the current item to use to render the state.
Type:
  • string
Default Value:
  • null
Source:

toggleClass :string

The CSS class to apply for the on display
Type:
  • string
Source:

toggleOffPublishGlobal :boolean

Whether or not to publish globally when toggling to the off state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOffPublishPayload :object

The payload to publish when toggling to the off state.
Type:
  • object
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOffPublishPayloadItemMixin :boolean

Indicates whether or not the currentItem should be mixed into the payload published when toggling to the off state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOffPublishPayloadModifiers :string[]

The modifiers to apply to the payload published when toggling to the off state (on applies when the toggleOffPublishPayloadType is configured to be "PROCESS").
Type:
  • string[]
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOffPublishPayloadType :string

The type of payload being published when toggling to the off state.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOffPublishScope :string[]

A custom scope to publish on when toggling to the off state.
Type:
  • string[]
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOffPublishToParent :boolean

Whether or not to publish on the global scope when toggling to the off state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOnPublishGlobal :boolean

Whether or not to publish globally when toggling to the on state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOnPublishPayload :object

The payload to publish when toggling to the on state.
Type:
  • object
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOnPublishPayloadItemMixin :boolean

Indicates whether or not the currentItem should be mixed into the payload published when toggling to the on state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOnPublishPayloadModifiers :string[]

The modifiers to apply to the payload published when toggling to the on state (on applies when the toggleOnPublishPayloadType is configured to be "PROCESS").
Type:
  • string[]
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOnPublishPayloadType :string

The type of payload being published when toggling to the on state.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOnPublishScope :string[]

A custom scope to publish on when toggling to the on state.
Type:
  • string[]
Since:
  • 1.0.86
Default Value:
  • null
Source:

toggleOnPublishToParent :boolean

Whether or not to publish on the global scope when toggling to the on state.
Type:
  • boolean
Since:
  • 1.0.86
Default Value:
  • false
Source:

toggleOnTopic :string

The topic to publish on when the toggle is switched "on"
Type:
  • string
Default Value:
  • null
Source:

tooltipIdProperty :string

The property of the currentItem to use as the identifier in the tooltips.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • null
Source:

Methods

createWidgetDom()

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

getInitialState() → {boolean}

Override this to select the item property to toggle on.
Source:
Returns:
Indicating the initial state of the toggle.
Type
boolean

onClick()

Toggle between the on and off states
Source:

onToggleOffFailure()

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

onToggleOffSuccess()

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

onToggleOnFailure()

Called whenever the "toggleOnFailureTopic" 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:

removeSubscriptionHandles()

Handles removing subscription handles setup during requests to toggle on or off
Source:

renderToggledOff()

Renders the appearance of the toggle when in the "off" position
Source:

renderToggledOn()

Renders the appearance of the toggle when in the "on" position
Source:

toggledOff()

This function is called whenever the toggle is switched to the "off" state. It publishes on the "toggleOffTopic" attribute.
Source:

toggledOn()

This function is called whenever the toggle is switched to the "on" state. It publishes on the "toggleOnTopic" attribute.
Source:

Events

toggleOffFailureTopic

The topic to subscribe to for failure toggle "off" events
Type:
  • string
Default Value:
  • null
Source:

toggleOffSuccessTopic

The topic to subscribe to for successful toggle "off" events
Type:
  • string
Default Value:
  • null
Source:

toggleOffTopic

The topic to publish on when the toggle is switched "off"
Type:
  • string
Default Value:
  • null
Source:

toggleOnFailureTopic

The topic to subscribe to for failed toggle "on" events
Type:
  • string
Default Value:
  • null
Source:

toggleOnSuccessTopic

The topic to subscribe to for successful toggle "on" events
Type:
  • string
Default Value:
  • null
Source: