jsdoc

$.ui.simplicityHistory

Namespace $.ui.simplicityHistory

Ajax history widget for simplicityState This widget binds the simplicityState to the hash fragment of the URL making it possible to use the browser's forward/backward buttons or create a bookmark to a specific search page. The simplicityHistory widget also enables users to search for results, then use the back button to restore/refine the criteria used to perform the search.

This widget should be instantiated no more than one time per page.
Defined in: ui.simplicityHistory.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
$.ui.simplicityHistory.options
Widget options.
Method Summary
Method Attributes Method Name and Description
<private> <static>  
$.ui.simplicityHistory._handleBang(fragment)
Follows widget options regarding bangs (!).
<private> <static>  
$.ui.simplicityHistory._hashChangeHandler()
Event handler for the hashchange event.
<private> <static>  
$.ui.simplicityHistory._stateChangeHandler()
Event handler for the simplicityStateChange event.
Namespace Detail
$.ui.simplicityHistory
  $('body').simplicityState();
  // Create all simplicityInputs widgets
  $('body')
    .simplicityState('mergeQueryParams')
    .simplicityHistory()
    .simplicityState('triggerChangeEvent')
    .simplicityPageSnapBack()
    .simplicityDiscoverySearch({
      url: '/my_search_controller.php'
    })
    .simplicityDiscoverySearch('search');
See:
Depends on the jQuery BBQ plugin.
Field Detail
<static> $.ui.simplicityHistory.options
Widget options.
stateElement
The location of the simplicityState widget. Defaults to 'body'.
noEscape
Optional list of characters that should not be escaped. Defaults to ''. This is just a convenience that calls $.param.fragment.noEscape when not the empty string.
acceptMissingBang
Determines if URLs without a bang (!) should be accepted. Defaults to true.
debug
Enable logging of key events to console.log. Defaults to false.
Method Detail
<private> <static> $.ui.simplicityHistory._handleBang(fragment)
Follows widget options regarding bangs (!). Normally bangs are expected and will be removed. For backward compatibility, a fragment without a bang can still be used.
Parameters:
{string} fragment
The fragment containing query string values

<private> <static> $.ui.simplicityHistory._hashChangeHandler()
Event handler for the hashchange event. Applies the new hash state to the simplicityState.

<private> <static> $.ui.simplicityHistory._stateChangeHandler()
Event handler for the simplicityStateChange event. Applies the state to the browser history (hash fragment).

Documentation generated by JsDoc Toolkit 2.4.0