Constructor
new PortalListView()
- Source:
Extends
Members
additionalPortalsToDisplay :Array.<SolrResult>
An array of additional SolrResult models for portals that will be displayed
in this view in addition to the SolrResults found as a result of the search.
These could be portals that wouldn't otherwise be found by a search but should be displayed anyway.
Type:
- Source:
createBtnContainer :string
A jQuery selector for the element that the Create Portal should be inserted into
Type:
- Source:
filters :Array.<Filter>
An array of Filter models or Filter model JSON to use in the query.
If not provided, a default query will be used.
Type:
- Source:
listContainer :string
A jQuery selector for the element that the list should be inserted into
Type:
- Source:
noResultsMessage :string
The message to display when there are no portals in this list
Type:
- Source:
numPortals :number
The number of portals to retrieve and render in this view
Type:
- Default Value:
- Source:
numPortalsPerPage :number
The number of portals to dispaly per page
Type:
- Default Value:
- Source:
searchFields :string
A comma-separated list of Solr index fields to retrieve when searching for portals
Type:
- Default Value:
- "id,seriesId,title,formatId,label,logo"
- Source:
A SolrResults collection that contains the results of the search for the portals
Type:
- Source:
searchTerm :string
The general search term applied to the portal's indexed metadata.
Type:
- Source:
template
References to templates for this view. HTML files are converted to Underscore.js templates
- Source:
Methods
createListItem(searchResultopt) → {jQuery|string}
Creates a list entry for the given portal SolrResult model.
Parameters:
| Name |
Type |
Attributes |
Description |
searchResult |
SolrResult
|
<optional>
|
The portal to display. |
- Source:
Returns:
The list entry, or an empty string on error.
-
Type
-
jQuery
|
string
getSearchResults()
Queries for the portal objects using the SearchResults collection
- Source:
hideLoading()
Remove loading indicators from the portal list
- Source:
initialize() → {void}
Creates the result collection and tracks its active request.
- Source:
Returns:
-
Type
-
void
Cancels the request and removes the pager and list.
- Since:
- Source:
Returns:
This view
-
Type
-
PortalListView
render()
Renders the list of portals
- Source:
Renders a "Create" button for the user to create a new portal
- Source:
renderList()
Renders each search result from the SolrResults collection
- Source:
showError()
Displays an error message when rendering this view has failed.
- Source: