Expand all

mw.echo.ui.DatedNotificationsWidget

Extends

Constructor

new mw.echo.ui.DatedNotificationsWidget(controller, modelManager, [config]) #

A notifications list organized and separated by dates

Parameters:

Name Type Attributes Description
controller mw.echo.Controller

Echo controller

modelManager mw.echo.dm.ModelManager

Model manager

config Object optional

Configuration object

Mixes in:
Source:
A notifications list organized and separated by dates

Methods

attachModel(modelId, model) #

Attach a model to the widget

Parameters:

Name Type Description
modelId string

Symbolic name for the model

model mw.echo.dm.SortedList

Notifications list model

Source:
Attach a model to the widget

detachModel(modelId) #

Detach a model from the widget

Parameters:

Name Type Description
modelId string

Notifications list model

Source:
Detach a model from the widget

getAllNotificationCount() → {number} #

Get the number of all notifications in all sections of the widget

Source:

Returns:

The number of all notifications

Type
number
Get the number of all notifications in all sections of the widget

getList() → {mw.echo.ui.SortedListWidget} #

Get the list widget contained in this item

Source:

Returns:

List widget

Type
mw.echo.ui.SortedListWidget
Get the list widget contained in this item

onModelRemoveSource(source) #

Respond to model removing source group

Parameters:

Name Type Description
source string

Symbolic name of the source group

Source:
Respond to model removing source group

populateFromModel(models) #

Respond to model manager update event. This event means we are repopulating the entire list and the associated models within it.

Parameters:

Name Type Description
models Object

List models, indexed by ID

Source:
Respond to model manager update event.