Class: ToolbarVisualView

Drupal.toolbar.ToolbarVisualView(options)

new ToolbarVisualView(options)

Backbone view for the toolbar element. Listens to mouse & touch.

Parameters:
Name Type Description
options object

Options for the view object.

Properties
Name Type Description
strings object

Various strings to use in the view.

Source:

Extends

  • Backbone.View

Methods

adjustPlacement()

Sets the tops of the trays so that they align with the bottom of the bar.

Source:

events() → {object}

Event map for the ToolbarVisualView.

Source:
Returns:

A map of events.

Type
object

loadSubtrees()

Calls the endpoint URI that builds an AJAX command with the rendered subtrees.

The rendered admin menu subtrees HTML is cached on the client in localStorage until the cache of the admin menu subtrees on the server- side is invalidated. The subtreesHash is stored in localStorage as well and compared to the subtreesHash in drupalSettings to determine when the admin menu subtrees cache has been invalidated.

Source:

onOrientationToggleClick(event)

Toggles the orientation of a toolbar tray.

Parameters:
Name Type Description
event jQuery.Event

The event triggered.

Source:

onTabClick(event)

Responds to a toolbar tab click.

Parameters:
Name Type Description
event jQuery.Event

The event triggered.

Source:

render() → {Drupal.toolbar.ToolbarVisualView}

{@inheritdoc}

Source:
Returns:

The ToolbarVisualView instance.

Type
Drupal.toolbar.ToolbarVisualView

updateBarAttributes()

Update the attributes of the toolbar bar element.

Source:

updateTabs()

Updates the display of the tabs: toggles a tab and the associated tray.

Source:

updateTrayOrientation()

Updates the orientation of the active tray if necessary.

Source:

Drupal.toolbar.ToolbarVisualView()

new ToolbarVisualView()

Update the toolbar element height.

Source:

Extends

  • Backbone.View

Methods

adjustPlacement()

Sets the tops of the trays so that they align with the bottom of the bar.

Source:

events() → {object}

Event map for the ToolbarVisualView.

Source:
Returns:

A map of events.

Type
object

loadSubtrees()

Calls the endpoint URI that builds an AJAX command with the rendered subtrees.

The rendered admin menu subtrees HTML is cached on the client in localStorage until the cache of the admin menu subtrees on the server- side is invalidated. The subtreesHash is stored in localStorage as well and compared to the subtreesHash in drupalSettings to determine when the admin menu subtrees cache has been invalidated.

Source:

onOrientationToggleClick(event)

Toggles the orientation of a toolbar tray.

Parameters:
Name Type Description
event jQuery.Event

The event triggered.

Source:

onTabClick(event)

Responds to a toolbar tab click.

Parameters:
Name Type Description
event jQuery.Event

The event triggered.

Source:

render() → {Drupal.toolbar.ToolbarVisualView}

{@inheritdoc}

Source:
Returns:

The ToolbarVisualView instance.

Type
Drupal.toolbar.ToolbarVisualView

updateBarAttributes()

Update the attributes of the toolbar bar element.

Source:

updateTabs()

Updates the display of the tabs: toggles a tab and the associated tray.

Source:

updateTrayOrientation()

Updates the orientation of the active tray if necessary.

Source: