Expand all

mw.echo.ui.NotificationBadgeWidget

Extends

Constructor

new mw.echo.ui.NotificationBadgeWidget(controller, manager, links, config) #

Notification badge button widget for echo popup.

Parameters:

Name Type Description
controller mw.echo.Controller

Echo notifications controller

manager mw.echo.dm.ModelManager

Model manager

links Object

Links object, containing 'notifications' and 'preferences' URLs

config Object

Configuration object

Source:
Notification badge button widget for echo popup.

Methods

onBadgeButtonClick() #

Respond to badge button click

Source:
Respond to badge button click

onMarkAllReadButtonClick() #

Respond to 'mark all as read' button click

Source:
Respond to 'mark all as read' button click

onNotificationsListModified() #

Respond to list widget modified event.

This means the list's actual DOM was modified and we should make sure that the popup resizes itself.

Source:
Respond to list widget modified event.

onPopupToggle(isVisible) #

Extend the response to button click so we can also update the notification list.

Parameters:

Name Type Description
isVisible boolean

The popup is visible

Source:

Fires:

Extend the response to button click so we can also update the notification list.

onSeenTimeModelUpdate() #

Respond to SeenTime model update event

Source:
Respond to SeenTime model update event

updateBadge() #

Update the badge state and label based on changes to the model

Source:
Update the badge state and label based on changes to the model

updateBadgeSeenState([hasUnseen]) #

Update the badge style to match whether it contains unseen notifications.

Parameters:

Name Type Attributes Default Description
hasUnseen boolean optional
false

There are unseen notifications

Source:
Update the badge style to match whether it contains unseen notifications.

Events

allRead() #

All notifications were marked as read

Source:
All notifications were marked as read

finishLoading() #

Notifications have successfully finished being processed and are fully loaded

Source:
Notifications have successfully finished being processed and are fully loaded