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 |
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
Returns:
Page title item
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 |
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 |
Returns:
Ordering value
- Type
- number
Sorting function for item insertion