Expand all

mw.echo.ui.PageFilterWidget

Extends

Constructor

new mw.echo.ui.PageFilterWidget(filterModel, source, [config]) #

A widget that displays wikis and their pages to choose a filter

Parameters:

Name Type Attributes Description
filterModel mw.echo.dm.FiltersModel

Filters model

source string

Symbolic name for the source

config Object optional

Configuration object

Source:
A widget that displays wikis and their pages to choose a filter

Methods

findInsertionIndex(item) → {number}private #

Find the proper insertion index for ordering when inserting items

Parameters:

Name Type Description
item mw.echo.ui.PageNotificationsOptionWidget

Item widget

Source:

Returns:

Insertion index

Type
number
Find the proper insertion index for ordering when inserting items

getSource() → {string} #

Get the source associated with this filter

Source:

Returns:

Source symbolic name

Type
string
Get the source associated with this filter

getTitleItem() → {mw.echo.ui.PageNotificationsOptionWidget} #

Get the title item

Source:

Returns:

Page title item

Type
mw.echo.ui.PageNotificationsOptionWidget
Get the title item

getTotalCount() → {number} #

Set the total count of this group

Source:

Returns:

Total count

Type
number
Set the total count of this group

populateDataFromModel() #

Populate the widget from the model

Source:
Populate the widget from the model

setItems(items) #

Set the page items in this widget, in order

Parameters:

Name Type Description
items Array.<mw.echo.ui.PageNotificationsOptionWidget>

Item widgets to order and insert

Source:
Set the page items in this widget, in order

sortingFunction(item, otherItem) → {number}private #

Sorting function for item insertion

Parameters:

Name Type Description
item mw.echo.ui.PageNotificationsOptionWidget

Item widget

otherItem mw.echo.ui.PageNotificationsOptionWidget

Another item widget

Source:

Returns:

Ordering value

Type
number
Sorting function for item insertion