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
|
Extends
- Backbone.View
Methods
adjustPlacement()
Sets the tops of the trays so that they align with the bottom of the bar.
events() → {object}
Event map for the ToolbarVisualView
.
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.
onOrientationToggleClick(event)
Toggles the orientation of a toolbar tray.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The event triggered. |
onTabClick(event)
Responds to a toolbar tab click.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The event triggered. |
render() → {Drupal.toolbar.ToolbarVisualView}
{@inheritdoc}
Returns:
The ToolbarVisualView
instance.
updateBarAttributes()
Update the attributes of the toolbar bar element.
updateTabs()
Updates the display of the tabs: toggles a tab and the associated tray.
updateTrayOrientation()
Updates the orientation of the active tray if necessary.