core_contentbank/search

Search methods for finding contents in the content bank.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(inner) filterContents(body, searchTerm) → {Array}

Source:

Return the list of contents which have a name that matches the given search term.

Parameters:
Name Type Description
body HTMLElement

The root element for the contentbank.

searchTerm String

The search term to match.

Returns:
Type
Array

(inner) highlight(text, highlightText) → {String}

Source:

Highlight a given string in a text.

Parameters:
Name Type Description
text String

The whole text.

highlightText String

The piece of text to highlight.

Returns:
Type
String

(inner) init()

Source:

Set up the search.

(inner) registerListenerEvents(root)

Source:

Register contentbank search related event listeners.

Parameters:
Name Type Description
root Object

The root element for the contentbank.

(inner) toggleSearchResultsView(body, searchQuery)

Source:

Toggle (display/hide) the search results depending on the value of the search query.

Parameters:
Name Type Description
body HTMLElement

The root element for the contentbank.

searchQuery String

The search query.