Class: CatalogSearchView

CatalogSearchView()

The data catalog search view for the repository. This view displays a Cesium map, search results, and search filters.

Screenshot

Constructor

new CatalogSearchView()

Since:
  • 2.22.0
Source:

Extends

  • Backbone.View

Members

bodyClass :string

The CSS class to add to the body element when this view is rendered.
Type:
  • string
Since:
  • 2.22.0
Default Value:
  • "catalog-search-body",
Source:

className :string

The HTML classes to use for this view's element
Type:
  • string
Since:
  • 2.22.0
Source:

errorTemplate :string

The template to use in case there is a major error in rendering the view.
Type:
  • string
Since:
  • 2.25.0
Source:

filterGroupsContainer :string

The jQuery selector for the FilterGroupsView container
Type:
  • string
Since:
  • 2.22.0
Source:

filterGroupsView :FilterGroupsView

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:
  • 2.22.0
Source:

filtersVisible :boolean

Whether the filters are displayed or hidden.
Type:
  • boolean
Since:
  • 2.25.0
Default Value:
  • true
Source:

hideFiltersClass :string

The CSS class (not selector) to add to the body element when the filters are hidden.
Type:
  • string
Since:
  • 2.25.0
Source:

hideMapClass :string

The CSS class (not selector) to add to the body element when the map is hidden.
Type:
  • string
Since:
  • 2.25.0
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:
  • boolean
Since:
  • 2.25.0
Default Value:
  • false
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:
  • boolean
Since:
  • 2.26.0
Default Value:
  • true
Source:

mapContainer :string

The query selector for the CesiumWidgetView container
Type:
  • string
Since:
  • 2.22.0
Source:

mapFilterToggle :string

The query selector for the button that is used to turn on or off spatial filtering by map extent.
Type:
  • string
Since:
  • 2.25.0
Source:

mapVisible :boolean

Whether the map is displayed or hidden.
Type:
  • boolean
Since:
  • 2.25.0
Default Value:
  • true
Source:

pagerContainer :string

The query selector for the PagerView container
Type:
  • string
Since:
  • 2.22.0
Source:

pagerView :PagerView

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:
  • PagerView
Since:
  • 2.22.0
Source:

searchResultsContainer :string

The query selector for the SearchResultsView container
Type:
  • string
Since:
  • 2.22.0
Source:

searchResultsView :SearchResultsView

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:
  • 2.22.0
Source:

sorterContainer :string

The query selector for the SorterView container
Type:
  • string
Since:
  • 2.22.0
Source:

sorterView :SorterView

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:
  • 2.22.0
Source:

tagName :string

The HTML tag to use for this view's element
Type:
  • string
Since:
  • 2.22.0
Source:

template :underscore.template

The template to use for this view's element
Type:
  • underscore.template
Since:
  • 2.22.0
Source:

titleContainer :string

The query selector for the title container
Type:
  • string
Since:
  • 2.22.0
Source:

toggleFiltersButton :string

The query selector for the button that is used to either show or hide the filters.
Type:
  • string
Since:
  • 2.25.0
Source:

toggleFiltersLabel :string

The query selector for the label that is used to describe the CatalogSearchView#toggleFiltersButton.
Type:
  • string
Since:
  • 2.25.0
Default Value:
  • "#toggle-map-label"
Source:

toggleMapButton :string

The query selector for button that is used to either show or hide the map.
Type:
  • string
Since:
  • 2.22.0
Source:

toggleMapLabel :string

The query selector for the label that is used to describe the CatalogSearchView#toggleMapButton.
Type:
  • string
Since:
  • 2.25.0
Default Value:
  • "#toggle-map-label"
Source:

type :string

The type of View this is
Type:
  • string
Since:
  • 2.22.0
Source:

Methods

addLinkedData()

Linked Data Object for appending the jsonld into the browser DOM
Since:
  • 2.22.0
Source:

createMap()

Create the models and views associated with the map and map search
Since:
  • 2.22.0
Source:

createSearchResults()

Creates the SearchResultsView and saves a reference to the SolrResults collection
Since:
  • 2.22.0
Source:

events()

The events this view will listen to and the associated function to call.
Since:
  • 2.22.0
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:
  • 2.25.0
Source:

onClose()

Tasks to perform when the view is closed
Since:
  • 2.22.0
Source:

render()

Renders the view
Since:
  • 2.22.0
Source:

renderComponents()

Calls other methods that insert the sub-views into the DOM and render them.
Since:
  • 2.22.0
Source:

renderError()

Indicates that there was a problem rendering this view.
Since:
  • 2.25.0
Source:

renderFilters()

Renders the search filters
Since:
  • 2.22.0
Source:

renderMap()

Renders the Cesium map with a geohash layer
Since:
  • 2.22.0
Source:

renderPager()

Creates a PagerView and adds it to the page.
Since:
  • 2.22.0
Source:

renderSearchResults()

Renders the search result list
Since:
  • 2.22.0
Source:

renderSorter()

Creates a SorterView and adds it to the page.
Since:
  • 2.22.0
Source:

renderTitle()

Updates the view title using the CatalogSearchView#searchResults data.
Since:
  • 2.22.0
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:
  • 2.26.0
Source:

setMapVisibility()

Sets the search mode (map or list)
Since:
  • 2.22.0
Source:

setupView()

Sets up the basic components of this view
Since:
  • 2.22.0
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:
  • 2.22.0
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:
  • 2.25.0
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:
  • 2.25.0
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:
  • 2.25.0
Source:

updateToggleFiltersLabel()

Change the content of the filters toggle label to indicate whether clicking the button will show or hide the filters.
Since:
  • 2.25.0
Source:

updateToggleMapLabel()

Change the content of the map toggle label to indicate whether clicking the button will show or hide the map.
Since:
  • 2.25.0
Source: