From 62aafc6d69c7f48e034345241591fed40df2da4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"J.=20Rene=CC=81e=20Beach"?= <splendidnoise@gmail.com>
Date: Tue, 5 Feb 2013 11:47:18 -0500
Subject: [PATCH] Issue #1908624 by jessebeach: Update edit modules
 implementation of hook_toolbar; refresh the design to match
 current mockups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: J. Renée Beach <splendidnoise@gmail.com>
---
 core/modules/edit/css/edit.css          |    4 ++--
 core/modules/edit/edit.module           |    3 +++
 core/modules/edit/js/views/menu-view.js |   14 +++-----------
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/core/modules/edit/css/edit.css b/core/modules/edit/css/edit.css
index 37e10eb..c255d34 100644
--- a/core/modules/edit/css/edit.css
+++ b/core/modules/edit/css/edit.css
@@ -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;
diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module
index 584cace..dc1eec7 100644
--- a/core/modules/edit/edit.module
+++ b/core/modules/edit/edit.module
@@ -60,6 +60,9 @@ function edit_toolbar() {
         ),
       ),
     ),
+    '#wrapper_attributes' => array(
+      'class' => array('edit-toolbar-tab'),
+    ),
     '#attached' => array(
       'library' => array(
         array('edit', 'edit'),
diff --git a/core/modules/edit/js/views/menu-view.js b/core/modules/edit/js/views/menu-view.js
index ac7c4e4..35cac3b 100644
--- a/core/modules/edit/js/views/menu-view.js
+++ b/core/modules/edit/js/views/menu-view.js
@@ -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));
-- 
1.7.10.4

