Constructor
Renders a simple pager element for a SolrResults collection.
- Since:
- Source:
Extends
Members
className :string
The classes to use for this view's element
Type:
- Source:
events :object
An object literal of events to listen to on this view
Type:
- Source:
A SolrResults collection that contains the page data that this Pager
displays.
Type:
- Source:
tagName :string
The HTML tag to use for this view's element
Type:
- Source:
template :string
The HTML to display when no search results are found. This will be
updated by the view.
Type:
- Source:
Methods
goToPage(page)
Navigates to the given page in the search results
Parameters:
Name |
Type |
Description |
page |
number
|
The page number to navigate to (0-based) |
- Since:
- Source:
handleClick(evt)
Handles clicks on the pager links
Parameters:
Name |
Type |
Description |
evt |
Event
|
|
- Source:
hide()
Hides the pager
- Since:
- Source:
linkTemplate(data) → {string}
Constructs and returns the HTML template string for a single page link
in the pager
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
Returns:
-
Type
-
string
loading()
Shows the loading version of the pager
- Source:
removeLoading()
Removes the loading version of the pager
- Source:
render()
Renders the Pager View
- Source:
renderPages()
Render the page numbers and links.
- Source:
show()
Shows the pager
- Since:
- Source:
url(page) → {string}
Constructs and returns a URL string to use for the given page in this
pager. It assumes that the URL uses a ".../page/X" structure. To
provide a custom URL, override this function.
Parameters:
Name |
Type |
Description |
page |
number
|
string
|
The page number in base 0 |
- Source:
Returns:
The relative URL to use for the given page. This
will include the root part of the path name if it exists.
-
Type
-
string