Constructor
new CatalogSearchView()
- Since:
- Source:
Extends
Members
bodyClass :string
The CSS class to add to the body element when this view is rendered.
Type:
- Since:
- Default Value:
- Source:
className :string
The HTML classes to use for this view's element
Type:
- Since:
- Source:
errorTemplate :string
The template to use in case there is a major error in rendering the
view.
Type:
- Since:
- Source:
filterGroupsContainer :string
The jQuery selector for the FilterGroupsView container
Type:
- Since:
- Source:
The view that shows the search filters. The render method will attach
the filter groups view to the
CatalogSearchView#filterGroupsContainer element and will add
the view reference to this property.
Type:
- Since:
- Source:
filtersVisible :boolean
Whether the filters are displayed or hidden.
Type:
- Since:
- Default Value:
- Source:
hideFiltersClass :string
The CSS class (not selector) to add to the body element when the
filters are hidden.
Type:
- Since:
- Source:
hideMapClass :string
The CSS class (not selector) to add to the body element when the map is
hidden.
Type:
- Since:
- Source:
limitSearchToMapArea :boolean
Whether to limit the search to the extent of the map. When true, the
search will update when the user pans or zooms the map. This property
will be updated when the user clicks the map filter toggle. Whatever is
set during the initial render will be the default.
Type:
- Since:
- Default Value:
- Source:
limitSearchToMapOnInteraction :boolean
Whether to limit the search to the extent the first time the user
interacts with the map. This only applies if limitSearchToMapArea is
initially set to false.
Type:
- Since:
- Default Value:
- Source:
mapContainer :string
The query selector for the CesiumWidgetView container
Type:
- Since:
- Source:
mapFilterToggle :string
The query selector for the button that is used to turn on or off
spatial filtering by map extent.
Type:
- Since:
- Source:
mapVisible :boolean
Whether the map is displayed or hidden.
Type:
- Since:
- Default Value:
- Source:
The query selector for the PagerView container
Type:
- Since:
- Source:
The view that shows the number of pages and allows the user to navigate
between them. The render method will attach the pager view to the
CatalogSearchView#pagerContainer element and will add the view
reference to this property.
Type:
- Since:
- Source:
searchResultsContainer :string
The query selector for the SearchResultsView container
Type:
- Since:
- Source:
The View that displays the search results. The render method will be
attach the search results view to the
CatalogSearchView#searchResultsContainer element and will add
the view reference to this property.
Type:
- Since:
- Source:
sorterContainer :string
The query selector for the SorterView container
Type:
- Since:
- Source:
The view that handles sorting the search results. The render method
will attach the sorter view to the
CatalogSearchView#sorterContainer element and will add the view
reference to this property.
Type:
- Since:
- Source:
tagName :string
The HTML tag to use for this view's element
Type:
- Since:
- Source:
template :underscore.template
The template to use for this view's element
Type:
- Since:
- Source:
titleContainer :string
The query selector for the title container
Type:
- Since:
- Source:
The query selector for the button that is used to either show or hide
the filters.
Type:
- Since:
- Source:
toggleFiltersLabel :string
Type:
- Since:
- Default Value:
- Source:
The query selector for button that is used to either show or hide the
map.
Type:
- Since:
- Source:
toggleMapLabel :string
Type:
- Since:
- Default Value:
- Source:
type :string
The type of View this is
Type:
- Since:
- Source:
Methods
addLinkedData()
Linked Data Object for appending the jsonld into the browser DOM
- Since:
- Source:
createMap()
Create the models and views associated with the map and map search
- Since:
- Source:
createSearchResults()
Creates the SearchResultsView and saves a reference to the SolrResults
collection
- Since:
- Source:
events()
The events this view will listen to and the associated function to
call.
- Since:
- Source:
initialize(options)
Initialize the view. In addition to the options described below, any
option that is available in the
MapSearchFiltersConnector#initialize method can be passed to
this view, such as Map, SolrResult, and FilterGroup models, and whether
to create a geohash layer or spatial filter if they are not present.
Parameters:
Name |
Type |
Description |
options |
Object
|
The options for this view.
Properties
Name |
Type |
Attributes |
Description |
initialQuery |
string
|
<optional>
|
The initial text query to run
when the view is rendered. |
model |
MapSearchFiltersConnector
|
<optional>
|
A
MapSearchFiltersConnector model to use for this view. If not provided,
a new one will be created. If one is provided, then other options that
would be passed to the MapSearchFiltersConnector model will be ignored
(such as map, searchResults, filterGroups, catalogSearch, etc.) |
|
- Since:
- Source:
onClose()
Tasks to perform when the view is closed
- Since:
- Source:
render()
Renders the view
- Since:
- Source:
renderComponents()
Calls other methods that insert the sub-views into the DOM and render
them.
- Since:
- Source:
renderError()
Indicates that there was a problem rendering this view.
- Since:
- Source:
renderFilters()
Renders the search filters
- Since:
- Source:
renderMap()
Renders the Cesium map with a geohash layer
- Since:
- Source:
Creates a PagerView and adds it to the page.
- Since:
- Source:
renderSearchResults()
Renders the search result list
- Since:
- Source:
renderSorter()
Creates a SorterView and adds it to the page.
- Since:
- Source:
renderTitle()
Updates the view title using the
CatalogSearchView#searchResults data.
- Since:
- Source:
setMapToggleState()
Sets the initial state of the map filter toggle. Optionally listens
for the first user interaction with the map before turning on the
spatial filter.
- Since:
- Source:
setMapVisibility()
Sets the search mode (map or list)
- Since:
- Source:
setupView()
Sets up the basic components of this view
- Since:
- Source:
titleTemplate(start, end, numFound) → {string}
Constructs an HTML string of the title of this view
Parameters:
Name |
Type |
Description |
start |
number
|
|
end |
number
|
|
numFound |
number
|
|
- Since:
- Source:
Returns:
-
Type
-
string
toggleFiltersVisibility(show)
Shows or hide the filters
Parameters:
Name |
Type |
Description |
show |
boolean
|
Optionally provide the desired choice of
whether the filters should be shown (true) or hidden (false). If not
provided, the opposite of the current mode will be used. |
- Since:
- Source:
toggleMapFilter(newSetting)
Toggles the map filter on and off
Parameters:
Name |
Type |
Description |
newSetting |
boolean
|
Optionally provide the desired new mode
to switch to. true = limit search to map area, false = do not limit
search to map area. If not provided, the opposite of the current mode
will be used. |
- Since:
- Source:
toggleMapVisibility(show)
Show or hide the map
Parameters:
Name |
Type |
Description |
show |
boolean
|
Optionally provide the desired choice of
whether the filters should be shown (true) or hidden (false). If not
provided, the opposite of the current mode will be used. (Set to true
to show map, false to hide it.) |
- Since:
- Source:
updateToggleFiltersLabel()
Change the content of the filters toggle label to indicate whether
clicking the button will show or hide the filters.
- Since:
- Source:
updateToggleMapLabel()
Change the content of the map toggle label to indicate whether
clicking the button will show or hide the map.
- Since:
- Source: