Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NotificationService

Service to handle notifications to the user.

Hierarchy

  • NotificationService

Index

Properties

notifications

notifications: SacGwhNotification[] = []

array storing all displayed notifications

Static DEFAULT_DISMISS

DEFAULT_DISMISS: number = 5000

default dismiss time in milliseconds

Static DISMISS_NEVER

DISMISS_NEVER: number = -1

constant to indicate that the notification should not be automatically dismissed after some time

Static MSG_ID_DOCUMENT_NOT_FOUND

MSG_ID_DOCUMENT_NOT_FOUND: number = 6

Message that shows the "document not found" when using "showModal" for example on search results.

Static MSG_ID_ERROR

MSG_ID_ERROR: number = 3

Message ID for error messages

Static MSG_ID_FILE_UPLOADER

MSG_ID_FILE_UPLOADER: number = 5

Message that was created by file uploader

Static MSG_ID_LOGIN_STUFF

MSG_ID_LOGIN_STUFF: number = 4

Message that was created by login/register mask

Static MSG_ID_SHOW_ALL_RESULTS

MSG_ID_SHOW_ALL_RESULTS: number = 2

Message ID for 'show more results' message

Static MSG_ID_URL_COPIED_TO_CLIPBOARD

MSG_ID_URL_COPIED_TO_CLIPBOARD: number = 1

Message ID for 'copied to clipboard' message

Static NOTIFICATION_TYPE_DANGER

NOTIFICATION_TYPE_DANGER: string = "danger"

constant for notification type to show an error

Static NOTIFICATION_TYPE_INFO

NOTIFICATION_TYPE_INFO: string = "info"

constant for notification type to show a information message

Static NOTIFICATION_TYPE_SUCCESS

NOTIFICATION_TYPE_SUCCESS: string = "success"

constant for notification type to indicate a successful operation

Static NOTIFICATION_TYPE_WARNING

NOTIFICATION_TYPE_WARNING: string = "warning"

constant for notification type to show a warning

Methods

addErrorResultNotification

  • addErrorResultNotification(errorResponse: IErrorResult): void
  • Creates an error notification out of an IErrorResult and displays it. This notification will not be closed after DEFAULT_DISMISS.

    Parameters

    • errorResponse: IErrorResult

      error response received from a AJAX call for example.

    Returns void

addNotification

dismissNotification

  • dismissNotification(i: number): void

getNotifications

Generated using TypeDoc