Paginator.ui.PageLinks Class
ui Component to generate the page links
Constructor
Paginator.ui.PageLinks
-
p
Parameters:
-
p
PagintorPaginator instance to attach to
Item Index
Methods
calculateRange
-
currentPage
-
[totalPages]
-
[numPages]
Calculates start and end page numbers given a current page, attempting to keep the current page in the middle
Parameters:
-
currentPage
IntThe current page
-
[totalPages]
Int optionalMaximum number of pages
-
[numPages]
Int optionalPreferred number of pages in range
Returns:
[start_page_number, end_page_number]
destroy
()
private
Removes the page links container node and clears event listeners
onClick
-
e
Listener for the container's onclick event. Looks for qualifying link clicks, and pulls the page number from the link's page attribute. Sends link's page attribute to the Paginator's setPage method.
Parameters:
-
e
DOMEventThe click event
render
-
id_base
Generate the nodes and return the container node containing page links appropriate to the current pagination state.
Parameters:
-
id_base
Stringused to create unique ids for generated nodes
Returns:
Properties
container
HTMLElement
private
Span node containing the page links
templates
Unknown
static
Templates for generating page links.