jsdoc

$.ui.simplicityPagination

Namespace $.ui.simplicityPagination

Pagination widget for simplicityDiscoverySearch.

Pagination widget bound to the simplicitySearchResponse event.

The current page can be bound either via an input element or directly to the simplicityState.
Defined in: ui.simplicityPagination.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
$.ui.simplicityPagination.options
Widget options.
Method Summary
Method Attributes Method Name and Description
<private> <static>  
$.ui.simplicityPagination._getStartEnd()
Calculates the range of pagination links that might be displayed based on num_display_entries, currentPage, and numPages.
<private> <static>  
$.ui.simplicityPagination._makeLink()
Helper that makes a pagination link.
<private> <static>  
$.ui.simplicityPagination._makeLinks()
Helper that makes a range of pagination links, appending them to the parent.
<private> <static>  
$.ui.simplicityPagination._paginationCallback()
Callback for when a pagination link is clicked.
<private> <static>  
$.ui.simplicityPagination._searchResponseHandler()
Event handler for the simplicitySearchResponse event.
<private> <static>  
$.ui.simplicityPagination._setPage()
Changes the underlying search to reflect the requested page if page is different from the current page.
<private> <static>  
$.ui.simplicityPagination._stateResetHandler()
Event handler for the simplicityStateReset event.
<static>  
$.ui.simplicityPagination.getPage()
Get the current page - 1 based.
<static>  
$.ui.simplicityPagination.nextPage()
Move to the next page in the results.
<static>  
$.ui.simplicityPagination.prevPage()
Move to the previous page in the results.
<static>  
$.ui.simplicityPagination.setPage()
Move to a specific page in the results.
Namespace Detail
$.ui.simplicityPagination
  // Bound directly to simplicityState
  <div id="pagination"></div>
  <script type="text/javascript">
    $('#pagination').simplicityPagination();
  </script>
  // Bound to an input
  <input id="page" name="page" />
  <div id="pagination"></div>
  <script type="text/javascript">
    $('#page').simplicityInputs();
    $('#pagination').simplicityPagination({
      input: '#page'
    });
  </script>
Field Detail
<static> $.ui.simplicityPagination.options
Widget options.
stateElement
The location of the simplicityState widget. Defaults to 'body'.
searchElement
The location of the simplicityDiscoverySearch widget. Defaults to 'body'.
pageParam
Used when binding directly to the simplicityState and determines which field the state holds the current page number. Defaults to 'page'.
input
When set binds the current page to an input element instead of directly to the state via pageParam. Defaults to ''.
applyClass
Classes to apply to the Next, Prev and Page elements. Defaults to ui-corner-all.
scrollTopSelector
Determines the jQuery selector to apply $(window).scrollTop(0) when a page changes. Defaults to window.
scrollTopPosition
Determines the scroll top position to use for $(window).scrollTop(0). Defaults to 0.
num_display_entries
Maximum number of pagination links to display. Setting to 0 will trim the navigation down to simply, "Previous" and "Next" links. Use an odd number so the current page will be displayed in the center of the page links when there are more than num_display_entries pages. Defaults to 11.
num_edge_entries
Number of page links to show at the min and max range regardless of other constraints. If this number is set to 1, then links to the first and the last page are shown regardless of the current page and the visibility constraints set by num_display_entries. Setting to a larger number shows more links. Defaults to 0.
link_to
href template for the pagination links. The special value __id__ will be replaced by the page number. Defaults to #.
prev_text
Text for the "previous" link. Setting to an empty string will omit the link. Defaults to Prev.
next_text
Text for the "next" link. Setting to an empty string will omit the link. Defaults to Next.
ellipse_text
When there is a gap between the numbers created by num_edge_entries and the displayed number interval, this text is inserted into the gap (in a span tag). Setting to an empty string omits the additional tag. Defaults to ....
prev_show_always
When set to false, the "previous"-link is only shown if there is a previous page. Defaults to true.
next_show_always
When set to false, the "next"-link is only shown if there is a next page. Defaults to true.
debug
Enable logging of key events to console.log. Defaults to false.
Method Detail
<private> <static> $.ui.simplicityPagination._getStartEnd()
Calculates the range of pagination links that might be displayed based on num_display_entries, currentPage, and numPages.

<private> <static> $.ui.simplicityPagination._makeLink()
Helper that makes a pagination link. All element event handlers and data are set in this method, so returned link is ready to be used.

<private> <static> $.ui.simplicityPagination._makeLinks()
Helper that makes a range of pagination links, appending them to the parent.

<private> <static> $.ui.simplicityPagination._paginationCallback()
Callback for when a pagination link is clicked.

<private> <static> $.ui.simplicityPagination._searchResponseHandler()
Event handler for the simplicitySearchResponse event. Recreates the pagination widget to reflect the current search response.

<private> <static> $.ui.simplicityPagination._setPage()
Changes the underlying search to reflect the requested page if page is different from the current page. Page is zero based.

<private> <static> $.ui.simplicityPagination._stateResetHandler()
Event handler for the simplicityStateReset event. Resets the current page if the pageParam option is set.

<static> $.ui.simplicityPagination.getPage()
Get the current page - 1 based.

<static> $.ui.simplicityPagination.nextPage()
Move to the next page in the results. Causes a new search if the last search indicated that there will be a next page.

<static> $.ui.simplicityPagination.prevPage()
Move to the previous page in the results. Causes a new search if the current page is not the first page.

<static> $.ui.simplicityPagination.setPage()
Move to a specific page in the results. Causes a new search.

Documentation generated by JsDoc Toolkit 2.4.0