Expand all

mw.echo.dm.PaginationModel

Constructor

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

Pagination model for echo notifications pages.

Parameters:

Name Type Description
config Object

Configuration object

Mixes in:
Source:
Pagination model for echo notifications pages.

Methods

backwards() #

Move backwards to the previous page

Source:

Fires:

Move backwards to the previous page

forwards() #

Move forward to the next page

getCurrPageContinue() → {string} #

Get the current page continue value

Source:

Returns:

Current page continue value

Type
string
Get the current page continue value

getCurrPageIndex() → {number} #

Get the current page index

Source:

Returns:

Current page index

Type
number
Get the current page index

getCurrentPageItemCount() → {number} #

Get the number of items in the current page

Source:

Returns:

Number of items

Type
number
Get the number of items in the current page

getItemsPerPage() → {number} #

Get the number of items per page

Source:

Returns:

Number of items per page

Type
number
Get the number of items per page

getNextPageContinue() → {string} #

Get the next page continue value

Source:

Returns:

Next page continue value

Type
string
Get the next page continue value

getPageContinue(page) → {string} #

Get the 'continue' value of a certain page

Parameters:

Name Type Description
page number

Page index

Source:

Returns:

Continue string value

Type
string
Get the 'continue' value of a certain page

getPrevPageContinue() → {string} #

Get the previous page continue value

Source:

Returns:

Previous page continue value

Type
string
Get the previous page continue value

hasNextPage() → {boolean} #

Check whether a next page exists

Source:

Returns:

Next page exists

Type
boolean
Check whether a next page exists

hasPrevPage() → {boolean} #

Check whether a previous page exists

Source:

Returns:

Previous page exists

Type
boolean
Check whether a previous page exists

reset() #

Reset pagination data

setCurrPageIndex(index)private #

Set the current page index

Parameters:

Name Type Description
index number

Current page index

Source:
Set the current page index

setCurrentPageItemCount(count) #

Set the number of items in the current page

Parameters:

Name Type Description
count number

Number of items

Source:

Fires:

Set the number of items in the current page

setItemsPerPage(count) #

Set the number of items per page

Parameters:

Name Type Description
count number

Number of items per page

Source:
Set the number of items per page

setNextPageContinue(cont) #

Set the next page continue value

Parameters:

Name Type Description
cont string

Next page continue value

Source:
Set the next page continue value

setPageContinue(page, continueVal) #

Set a page index with its 'continue' value, used for API fetching

Parameters:

Name Type Description
page number

Page index

continueVal string

Continue string value

Source:

Fires:

Set a page index with its 'continue' value, used for API fetching

Events

update() #

Pagination information was updated

Source:
Pagination information was updated