Class: module:argos/Toolbar

module:argos/Toolbar()

Toolbar is a base toolbar class that provides basic rendering of the bar, adding toolbar items and binding their invokacations.

Constructor

new module:argos/Toolbar()

Extends:
Mixes In:
Source:

Extends

Members

enabled

Properties:
Name Type Description
State Boolean

of toolbar

Source:

widgetTemplate

Properties:
Name Type Description
HTML Simplate

markup of the toolbar

Source:

Methods

buildRendering()

Processes this.widgetTemplate or this.contentTemplate

Inherited From:
Source:

clear()

Empties the toolbar item collection and sets enabled to true

Source:

clearToolBusy(id)

Sets busy to false of the toolbar item that matches the passed id

Parameters:
Name Type Description
id String

The id of the tool to set as not busy

Source:

disable()

Adds a disabled style class and sets enabled to false

Source:

disableTool(id)

Sets enabled to false of the toolbar item that matches the passed id

Parameters:
Name Type Description
id String

The id of the tool to disable

Source:

enable()

Removes the disabled style and sets enabled to true

Source:

enableTool(id)

Sets enabled to true of the toolbar item that matches the passed id

Parameters:
Name Type Description
id String

The id of the tool to enable

Source:

expandExpression(expression) → {String}

Expands the passed expression if it is a function.

Parameters:
Name Type Description
expression String/Function

Returns string directly, if function it is called and the result returned.

Source:
Returns:

String expression.

Type
String

hide()

Sets the toolbar style to none (hidden)

Source:

indicateToolBusy(id)

Sets busy to true of the toolbar item that matches the passed id

Parameters:
Name Type Description
id String

The id of the tool to indicate busy

Source:

init()

Called upon application startup.

Source:

invokeTool(parameters, evt, node)

When a tool is clicked on this function handles matching the node to toolbar item instance and performs the actual action

Parameters:
Name Type Description
parameters Object

An object of all the data- attributes of the node.

evt Event

The event object

node HTMLElement

The html element that was clicked.

Source:

isToolEnabled(id) → {Boolean}

Checks the enabled property of the toolbar item that matches the passed id

Parameters:
Name Type Description
id String

The id of the tool

Source:
Returns:

True if the toolbar item is enabled

Type
Boolean

show()

Sets the toolbar style to block (visibile)

Source:

showTools(tools)

Replaces the existing toolbar item collection with the passed array of toolbar items and also checks toolbar security

Parameters:
Name Type Description
tools Array.<Object>

Toolbar item array to store.

Source: