Skip to content
Snippets Groups Projects
Commit 6a7def45 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1908624 by jessebeach, tkoleary: Update edit modules implementation of...

Issue #1908624 by jessebeach, tkoleary: Update edit modules implementation of hook_toolbar(); refresh the design to match current mockups.
parent aa3ff6a3
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -81,8 +81,8 @@
.active .icon-edit:before {
background-image: url("../images/icon-edit-active.png");
}
.toolbar .tray.edit.active {
z-index: 340;
.js .toolbar .bar .edit-toolbar-tab.tab {
float: right;
}
.toolbar .icon-edit.edit-nothing-editable-hidden {
display: none;
......
......@@ -60,6 +60,9 @@ function edit_toolbar() {
),
),
),
'#wrapper_attributes' => array(
'class' => array('edit-toolbar-tab'),
),
'#attached' => array(
'library' => array(
array('edit', 'edit'),
......
......@@ -20,17 +20,9 @@ Drupal.edit.views.MenuView = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'stateChange');
this.model.on('change:isViewing', this.stateChange);
// @todo
// Re-implement hook_toolbar and the corresponding JavaScript behaviors
// once https://drupal.org/node/1847198 is resolved. The toolbar tray is
// necessary when the page request is processed because its render element
// has an #attached property with the Edit module library code assigned to
// it. Currently a toolbar tab is not passed as a renderable array, so
// #attached properties are not processed. The toolbar tray DOM element is
// unnecessary right now, so it is removed.
this.$el.find('#toolbar-tray-edit').remove();
// Respond to clicks on other toolbar tabs. This temporary pending
// improvements to the toolbar module.
// Respond to clicks on other toolbar tabs.
// @todo This temporary pending improvements to the toolbar module.
// @see https://drupal.org/node/1860434
$('#toolbar-administration').on('click.edit', '.bar a:not(#toolbar-tab-edit)', _.bind(function (event) {
this.model.set('isViewing', true);
}, this));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment