Class: ToolbarVisualView

Drupal.toolbar. ToolbarVisualView

new Drupal.toolbar.ToolbarVisualView(options)

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

Name Type Description
options object

Options for the view object.

Name Type Description
strings object

Various strings to use in the view.

Extends

  • Backbone.View

Methods

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

Event map for the ToolbarVisualView.

Returns:
Type Description
object A map of events.

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.

onOrientationToggleClick(event)

Toggles the orientation of a toolbar tray.

Name Type Description
event jQuery.Event

The event triggered.

Responds to a toolbar tab click.

Name Type Description
event jQuery.Event

The event triggered.

Returns:
Type Description
Drupal.toolbar.ToolbarVisualView The ToolbarVisualView instance.

Update the attributes of the toolbar bar element.

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

Updates the orientation of the active tray if necessary.