Expand all

mw.echo.dm.SourcePagesModel

Constructor

new mw.echo.dm.SourcePagesModel(config) #

Source pages model for notification filtering

Parameters:

Name Type Description
config Object

Configuration object

Mixes in:
Source:
Source pages model for notification filtering

Methods

getCurrentPage() → {string} #

Get the title of the currently selected page

Source:

Returns:

Page title

Type
string
Get the title of the currently selected page

getCurrentSource() → {string} #

Get the current source

Source:

Returns:

Current source

Type
string
Get the current source

getGroupedPagesForCurrentTitle() → {Array.<string>} #

Get the list of page titles associated with the current group title.

Source:

Returns:

Page titles

Type
Array.<string>
Get the list of page titles associated with the current group title.

getGroupedPagesForTitle(source, title) → {Array.<string>} #

Get the list of page titles associated with one group title.

Parameters:

Name Type Description
source string

Symbolic name of the source

title string

Group title

Source:

Returns:

Page titles

Type
Array.<string>
Get the list of page titles associated with one group title.

getSourcePages(source) → {Object} #

Get all pages in a source

Parameters:

Name Type Description
source string

Symbolic name of the source

Source:

Returns:

Page definitions in this source

Type
Object
Get all pages in a source

getSourceTitle(source) → {string} #

Get the title of a source

Parameters:

Name Type Description
source string

Symbolic name of the source

Source:

Returns:

Source title

Type
string
Get the title of a source

getSourceTotalCount(source) → {number} #

Get the total count of a source

Parameters:

Name Type Description
source string

Symbolic name of the source

Source:

Returns:

Total count

Type
number
Get the total count of a source

getSourcesArray() → {Array.<string>} #

Get an array of all source names

Source:

Returns:

Array of source names

Type
Array.<string>
Get an array of all source names

reset() #

Reset the data

setAllSources(sourceData) #

Set all sources and pages. This will also reset and override any previously set information.

Parameters:

Name Type Description
sourceData Object

A detailed object about sources and pages

Source:

Fires:

Set all sources and pages.

setCurrentSourcePage(source, page) #

Set the current source and page.

Parameters:

Name Type Description
source string

New source

page string

New page

Source:

Fires:

Set the current source and page.

setSourcePagesDetails(source, details)private #

Set the details of a source and its page definitions

Parameters:

Name Type Description
source string

Source symbolic name

details Object

Details object

Source:
Set the details of a source and its page definitions

Events

update() #

The state of the source page model has changed

Source:
The state of the source page model has changed