jsdoc

$.ui.simplicityPageSnapBack

Namespace $.ui.simplicityPageSnapBack

Widget that causes the current page to reset to the first when the search state changes. Without simplicityPageSnapBack, the current search page will not change when executing a new search.

This widget listens for the simplicityStateChanging event and uses it to determine if anything other than the page changed in the state. If it did then the page parameter is removed effectively snapping the page back to the first page of the results.
Defined in: ui.simplicityPageSnapBack.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
$.ui.simplicityPageSnapBack.options
Widget options.
Method Summary
Method Attributes Method Name and Description
<private> <static>  
$.ui.simplicityPageSnapBack._stateChangingHandler()
Event handler for the simplicityStateChanging event.
Namespace Detail
$.ui.simplicityPageSnapBack
  $('body').simplicityState();
  // Create all simplicityInputs widgets
  $('body')
    .simplicityState('mergeQueryParams')
    .simplicityHistory()
    .simplicityState('triggerChangeEvent')
    .simplicityPageSnapBack()
    .simplicityDiscoverySearch({
      url: '/my_search_controller.php'
    })
    .simplicityDiscoverySearch('search');
Field Detail
<static> $.ui.simplicityPageSnapBack.options
Widget options.
stateElement
The simplicityState widget that this widget binds it's events to. Defaults to 'body'.
pageParam
The parameter in the state where the current page is stored. Defaults to 'page'.
debug
Enable logging of key events to console.log. Defaults to false.
Method Detail
<private> <static> $.ui.simplicityPageSnapBack._stateChangingHandler()
Event handler for the simplicityStateChanging event. Removes the page parameter, resetting the state to the first page if the new state changes anything other than the page parameter.

Documentation generated by JsDoc Toolkit 2.4.0