Module: alfresco/search/FacetFilter

alfresco/search/FacetFilter

Author:
  • Dave Draper
License:
Source:

Members

_filteringBlocked :boolean

Indicates that the filter cannot be applied because the a search request is in progress. This is updated by the blockFilterRequests and unblockFilterRequests functions. It should not be configured.
Type:
  • boolean
Since:
  • 1.0.51
Default Value:
  • false
Source:

applied :boolean

Indicate whether or not the filter is currently applied
Type:
  • boolean
Default Value:
  • false
Source:

appliedFilterAltText :string

The alt-text to use for the image that indicates that a filter has been applied
Type:
  • string
Default Value:
  • "facet.filter.applied.alt-text"
Source:

appliedFilterImageSrc :string

The path to use as the source for the image that indicates that a filter has been applied
Type:
  • string
Default Value:
  • "12x12-selected-icon.png"
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/FacetFilter.css"}]
Source:

facet :string

The facet qname
Type:
  • string
Default Value:
  • null
Source:

filter :string

The filter (or more accurately the filterId) for this filter
Type:
  • string
Default Value:
  • null
Source:

filterData :string

Additional data for the filter (appended after the filter with a bar, e.g. tag|sometag)
Type:
  • string
Source:

fullWidthClick :boolean

Indicates whether or not the full width of the filter (including the count and the white space) can be clicked to toggle the filter.
Type:
  • boolean
Since:
  • 1.0.47
Default Value:
  • false
Source:

hide :boolean

Indicates that the filter should be hidden. This will be set to "true" if any required data is missing
Type:
  • boolean
Default Value:
  • false
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/FacetFilter.properties"}]
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

useHash :boolean

When this is set to true the current URL hash fragment will be used to initialise the facet selection and when the facet is selected the hash fragment will be updated with the facet selection.
Type:
  • boolean
Default Value:
  • false
Source:

Methods

_updateHash()

Performs updates to the url hash as facets are selected and de-selected
Source:

blockFilterRequests()

This function is called from onSearchRequestStart and sets the _filteringBlocked to be true to prevent further filtering from being performed whilst search requests are in progress.
Since:
  • 1.0.51
Source:

onApplyFilter()

Applies the current filter by publishing the details of the filter along with the facet to which it belongs and then displays the "applied" image.
Source:

onClearFilter()

Removes the current filter by publishing the details of the filter along with the facet to which it belongs and then hides the "applied" image
Source:

onSearchRequestEnd(payload)

This function is called when a search request is made. It calls unblockFilterRequests to allow filtering to occur as no search request is in progress.
Parameters:
Name Type Description
payload object The request start payload
Since:
  • 1.0.51
Source:

onSearchRequestStart(payload)

This function is called when a search request is made. It calls blockFilterRequests to ensure that no further filtering can be performed whilst a search request is in progress.
Parameters:
Name Type Description
payload object The request start payload
Since:
  • 1.0.51
Source:

onToggleFilter()

If the filter has previously been applied then it is removed, if the filter is not applied then it is applied. Note that it is not possible for filters to be applied when _filteringBlocked has been set to true.
Source:

postCreate()

Source:

postMixInProperties()

Sets up the attributes required for the HTML template.
Source:

unblockFilterRequests()

This function is called from onSearchRequestEnd and sets the _filteringBlocked to be false to indicate that the filter can be applied as there is no search request currently in progress.
Since:
  • 1.0.51
Source: