Namespace: Notification

OC.Notification

Source:
To Do:
  • Write documentation

Members

(static) notificationTimers :Array.<int>

array of notification timers
Type:
Source:

Methods

(static) hide($rowopt, callbackopt)

Hides a notification. If a row is given, only hide that one. If no row is given, hide all notifications.
Parameters:
Name Type Attributes Description
$row jQuery <optional>
notification row
callback function <optional>
callback
Source:

(static) isHidden() → {boolean}

Returns whether a notification is hidden.
Source:
Returns:
Type
boolean

(static) setDefault(callback)

Parameters:
Name Type Description
callback
Source:
To Do:
  • Write documentation

(static) show(text, optionsopt) → {jQuery}

Shows a sanitized notification
Parameters:
Name Type Attributes Description
text string Message to display
options Object <optional>
options
Properties
Name Type Attributes Default Description
type string <optional>
notification type
timeout int <optional>
0 timeout value, defaults to 0 (permanent)
Source:
Returns:
jQuery element for notification row
Type
jQuery

(static) showHtml(html, optionsopt) → {jQuery}

Shows a notification as HTML without being sanitized before. If you pass unsanitized user input this may lead to a XSS vulnerability. Consider using show() instead of showHTML()
Parameters:
Name Type Attributes Description
html string Message to display
options Object <optional>
options
Properties
Name Type Attributes Default Description
type string <optional>
notification type
timeout int <optional>
0 timeout value, defaults to 0 (permanent)
Source:
Returns:
jQuery element for notification row
Type
jQuery

(static) showTemporary(text, optionsopt)

Shows a notification that disappears after x seconds, default is 7 seconds
Parameters:
Name Type Attributes Description
text string Message to show
options array <optional>
options array
Properties
Name Type Attributes Default Description
timeout int <optional>
7 timeout in seconds, if this is 0 it will show the message permanently
isHTML boolean <optional>
false an indicator for HTML notifications (true) or text (false)
type string <optional>
notification type
Source:

(static) showUpdate(text) → {jQuery}

Updates (replaces) a sanitized notification.
Parameters:
Name Type Description
text string Message to display
Source:
Returns:
JQuery element for notificaiton row
Type
jQuery