sisense.com

Header API

The Header API provides access to the Header UI component.

Sisense Header UI component

Version Availability

This API is available in Sisense for Windows 8.1 and Sisense for Linux L8.2.1 or newer

Module

Unlike older JavaScript APIs available globally via prism, the Header API is provided as a stand-alone module and needs to be loaded explicitly. See Using API Modules for more information.

Module name: api.v1.header

Example:

var headerApi = prism.getApi('api.v1.header');

Methods

isVisible()

Is the header currently displayed

Arguments

N/A

Returns

boolean

hide()

Hide the header entirely

Arguments

N/A

Returns

N/A

show()

Show the header

Arguments

N/A

Returns

N/A

on(eventName, eventHandler)

Subscribe a handler to an application event

Arguments

ParamTypeDescription
eventNamestringName of event to subscribe to
eventHandlerfunctionEvent handler function

Returns

N/A

off(eventName, eventHandler)

Un-subscribe a handler from an application event

Arguments

ParamTypeDescription
eventNamestringName of event to unsubscribe from
eventHandlerfunctionEvent handler function to remove

Returns

N/A

getTabs()

Get an array of current header tabs

Arguments

N/A

Returns

Array.<HeaderTab>

getTab(id)

Get a specific tab

Arguments

ParamTypeDescription
idstringtab ID

Returns

HeaderTab

addTab(tab, [index])

Add one tab

Arguments

ParamTypeDescription
tabHeaderTabTab
[index]numberIndex to insert into

Returns

N/A

addTabs(tabs, [index])

Add multiple tabs

Arguments

ParamTypeDescription
tabsArray.<HeaderTab>Tabs
[index]numberIndex to insert into

Returns

N/A

updateTab(tab)

Update one tab - based on tab's ID

Arguments

ParamTypeDescription
tabHeaderTabTab

Returns

N/A

removeTab(id)

Remove a specific tab

Arguments

ParamTypeDescription
idstringTab ID

Returns

N/A

getActiveTab()

Get the current active tab

Arguments

N/A

Returns

HeaderTab

setActiveTab(id)

Set the current active tab

Arguments

ParamTypeDescription
idstringtab ID

Returns

N/A

getIcon()

Get an array of current header icons

Arguments

N/A

Returns

Array.<HeaderIcon>

getIcon(id)

Get a specific icon

Arguments

ParamTypeDescription
idstringIcon ID

Returns

HeaderIcon

addIcon(icon, [index])

Add one icon

Arguments

ParamTypeDescription
iconHeaderIconIcon
[index]numberIndex to insert into

Returns

N/A

addIcons(icons, [index])

Add multiple icons

Arguments

ParamTypeDescription
iconsArray.<HeaderIcon>Icons
[index]numberIndex to insert into

Returns

N/A

updateIcon(icon)

Update one icon - based on icon's ID

Arguments

ParamTypeDescription
iconHeaderIconIcon

Returns

N/A

removeIcon(id)

Remove a specific icon

Arguments

ParamTypeDescription
idstringIcon ID

Returns

N/A

Get current logo settings

Arguments

N/A

Returns

HeaderLogo

updateLogo(logoSettings)

Update the header logo

Arguments

ParamTypeDescription
logoSettingsHeaderLogonew logo configuration

Returns

N/A

Hide the header logo

Arguments

N/A

Returns

N/A

Show the header logo

Arguments

N/A

Returns

N/A

getHeaderElement()

Get the entire header's DOM element

Arguments

N/A

Returns

DOMElement

Types

HeaderTab

A header tab item

Properties

NameTypeDescription
idstringunique ID
titlestringTab's text
[url]stringURL the tab should navigate to

HeaderIcon

A header icon item

Properties

NameTypeDescription
idstringunique ID
iconstringURL of icon (SVG or PNG)
[counter]numbernotification counter - if set to null or 0 will not be shown

The header logo

Properties

NameTypeDescription
urlstringURL to which the logo links
imagestringURL of logo image

Events

"created"

Fires when the header is created

Properties

NameTypeDefaultDescription
eventNamestring'created'event name

"destroyed"

Fires when the header is destroyed

Properties

NameTypeDefaultDescription
eventNamestring'destroyed'event name

"hidden"

Fires when the header is hidden

Properties

NameTypeDefaultDescription
eventNamestring'hidden'event name

"shown"

Fires when the header is shown

Properties

NameTypeDefaultDescription
eventNamestring'shown'event name

"logoaction"

Fires when the header logo element is clicked

Properties

NameTypeDefaultDescription
eventNamestring'logoaction'event name

"tabaction"

Fires when a header navigation tab element is clicked

Properties

NameTypeDefaultDescription
eventNamestring'tabaction'event name
tabHeaderTabthe tab that was clicked

"iconaction"

Fires when a header icon item element is clicked

Properties

NameTypeDefaultDescription
eventNamestring'iconaction'event name
iconHeaderIconthe icon that was clicked
Last Updated: