Module: alfresco/notifications/AlfNotification

alfresco/notifications/AlfNotification

An Alfresco styled notification.
Author:
  • Martin Doyle
License:
Source:

Members

autoClose :boolean

Whether to remain open and not automatically close.
Type:
  • boolean
Since:
  • 1.0.63
Default Value:
  • true
Source:

closeTopic :String

If this property is specified, then it will be possible to close this notification by publishing to this topic.
Type:
  • String
Since:
  • 1.0.65
Default Value:
  • null
Source:

cssRequirements :object[]

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

destroyAfterHideMs :number

How many milliseconds to wait before destroying this widget after the notification has been hidden
Type:
  • number
Default Value:
  • 1000
Source:

id :String

The notification ID (helps with customisation)
Type:
  • String
Since:
  • 1.0.63
Default Value:
  • null
Source:
This allows a simple inline-link to be added to the notification which, when clicked, will publish the provided topic and payload.
Type:
  • Object
Properties:
Name Type Argument Description
label String The text to display on the link
publishTopic String The topic to be published
publishPayload Object <optional>
The payload to be published
Since:
  • 1.0.63
Default Value:
  • null
Source:

notificationFocusSecs :number

Estimate how many seconds it might take a user to focus on a notification
Type:
  • number
Default Value:
  • 1
Source:

templateString :String

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

widgets :Object[]

An array of widgets to be inserted into the notification, underneath the message.
Type:
  • Object[]
Since:
  • 1.0.63
Default Value:
  • null
Source:

widgetSecs :number

How many seconds to add on for each included widget
Type:
  • number
Since:
  • 1.0.63
Default Value:
  • 1
Source:
If the inlineLink object has been specified then use this widgets structure to create the button to be inserted.
Type:
  • Object[]
Since:
  • 1.0.63
Source:

wordsPerSecond :number

How many words per second a person will read, used to determine how long to display the message. First attempt to gauge how long to show message ... may need refining!
Type:
  • number
Default Value:
  • 5
Source:

<inner> destroyDeferred :object

Variable to hold the Deferred object that will resolve once this notification is destroyed
Type:
  • object
Source:

Methods

<private> _countWidgets() → {number}

Count the number of widgets provided in the config
Since:
  • 1.0.63
Source:
Returns:
The number of widgets
Type
number

<private> _hide()

Hide the notification (and destroy it)
Source:

<private> _onCloseClick(evt)

Handle clicks on the close button
Parameters:
Name Type Description
evt Object Dojo-normalised event object
Source:

<private> _show()

Show the notification
Source:

destroy()

Called when widget is destroyed
Source:

display() → {object}

Display the notification.
Source:
Returns:
A promise that will resolve once the notification is destroyed.
Type
object

postCreate()

Called after widget created, but not sub-widgets
Source:

postMixInProperties()

This is run after the properties have been mixed in, but before the widget is created.
Since:
  • 1.0.63
Source: