Class: Toolbar

Granite.author.edit. Toolbar

Represents a Toolbar that pops up when an Editable is selected via its Overlay, and allows to perform ToolbarActions on this Editable.


new Toolbar()

Source:
edit/edit.Toolbar.js
See:

Extends

Methods


close()

Closes the Toolbar

Inherited From:
Source:
ui/ui.Toolbar.js

destroy()

Destroys the Toolbar, unbind all events and associated UI elements

Inherited From:
Source:
ui/ui.Toolbar.js

disable()

Disables the Toolbar (blocks possible user interaction with it)

Inherited From:
Source:
ui/ui.Toolbar.js

enable()

Enables the Toolbar (allow user interaction with it)

Inherited From:
Source:
ui/ui.Toolbar.js

open(editable)

Opens the Toolbar on the passed Editable; this will call first Granite.author.ui.Toolbar#render and then Granite.author.ui.Toolbar#position

Parameters:
Name Type Description
editable Granite.author.Editable

the source Editable

Inherited From:
Source:
ui/ui.Toolbar.js

position(editable)

Position the Toolbar on the passed Editable

Parameters:
Name Type Description
editable Granite.author.Editable

the source Editable

Inherited From:
Source:
ui/ui.Toolbar.js
Returns:
  • the current Toolbar
Type
Granite.author.ui.Toolbar

registerAction(name, action)

Adds a new global action (available for all Editables)

Parameters:
Name Type Description
name String

unique name for the action

action Granite.author.ui.ToolbarAction

describes the action to be added on the Toolbar

Inherited From:
Overrides:
Source:
ui/ui.Toolbar.js

render(editable)

Renders the Toolbar and appends the buttons associated with the actions contained in the current configuration

Parameters:
Name Type Description
editable Granite.author.Editable

the source Editable

Inherited From:
Overrides:
Source:
ui/ui.Toolbar.js
Returns:
  • the current Toolbar
Type
Granite.author.ui.Toolbar

reposition()

Repositions the Toolbar on its current underlying Editable (if existing)

Inherited From:
Source:
ui/ui.Toolbar.js