Description

Menu panel helper methods

Details

Members


<static> unpinnedItemIcon

Description

Generate SVG icon for unpinned link.

Returns

icon element as HTML

Details

<static> pinnedItemIcon

Description

Generate SVG icon for pinned link.

Returns

icon element as HTML

Details

Methods


<static> generateIcon( icon, className )

Description

Given some icon name, this function returns SVG element

Parameters
Name Type Attributes Description
icon Object

one of <constants.SVGIcons>

className String <nullable>

element class

Returns

icon element as HTML

Details

<static> localizedSort( linkList )

Description

Sort a list of links by localized label.

Parameters
Name Type Description
linkList Array.<String>

list of links

Returns

sorted list of "tuples" (String arrays of length 2) where first element is localized label, second element is the original link.

Details

<static> translateLabel( name )

Description

Get the translated dictionary value for some link.

Parameters
Name Type Description
name String

link name (dictionary key)

Returns

translated label

Details

<static> appendDivider( panel )

Description

Create a horizontal menu divider element and append it to the end of the provided panel element (in place). This method returns nothing. After calling this method panel will have a divider as its last DOM child.

Parameters
Name Type Description
panel Element

DOM element where to append the divider

Details