SectionContent

SectionContent

Renders result content into sections.

Constructor

new SectionContent()

Methods

bindEvents()

Binds events

clear()

Clears the result content.

closeOpenContextMenus()

Closes the opened context menus

destroy()

Destroys the instance and releases its resources.

getCurrentCount()

Returns the count of rendered hits.

isOpen()

Returns true if the result content is visible

render(sectionUI, result)

Renders the result content into sections

Parameters:
Name Type Description
sectionUI object

sectionUI info

result object

result data

renderHits(hitTemplate, result, resultCount)

Renders hits

Parameters:
Name Type Description
hitTemplate function

hit template

result object

result data

resultCount number

result count

renderShowMore(hitTemplate)

Renders show more link.

Parameters:
Name Type Description
hitTemplate function

setContentVisible(visible)

Hides or displays the result content

Parameters:
Name Type Description
visible boolean

visible

setShowMoreVisible(visible)

Enables show more link if number of results rendered in section UI are less than the actual result count

Parameters:
Name Type Description
visible boolean

visible

showMoreHits(event)

Callback function when executed shows more hits if available

Parameters:
Name Type Description
event Object

event data