? .DS_Store
? misc/jquery.hoverintent.js
? modules/.DS_Store
? modules/book/.DS_Store
? modules/shortcut/.DS_Store
? modules/shortcut/shortcut-dock.png
? modules/shortcut/shortcut.png
? modules/toolbar/.DS_Store
? sites/all/modules/.DS_Store
? sites/all/modules/devel
? sites/default/.DS_Store
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/shortcut/shortcut.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.css,v
retrieving revision 1.2
diff -u -p -r1.2 shortcut.css
--- modules/shortcut/shortcut.css	11 Nov 2009 06:56:52 -0000	1.2
+++ modules/shortcut/shortcut.css	14 Nov 2009 16:18:29 -0000
@@ -40,6 +40,25 @@ div#toolbar div.toolbar-shortcuts span.i
   -webkit-border-radius: 5px;
 }
 
+#toolbar-toggle-dock {
+  left:0;
+  position:absolute;
+  top:0;
+  width:24px;
+  height:50px;
+  text-indent: -9999px;
+  overflow: hidden;
+  background: #999 url(shortcut-dock.png) 4px center no-repeat;
+}
+
+body.toolbar-undocked #toolbar-toggle-dock {
+  background-color: transparent;
+}
+
+#toolbar-toggle-dock:hover {
+  background-color: #aaa;
+}
+
 div.add-or-remove-shortcuts {
   padding-top: 5px;
 }
Index: modules/shortcut/shortcut.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.module,v
retrieving revision 1.5
diff -u -p -r1.5 shortcut.module
--- modules/shortcut/shortcut.module	11 Nov 2009 06:56:52 -0000	1.5
+++ modules/shortcut/shortcut.module	14 Nov 2009 16:18:29 -0000
@@ -558,7 +558,6 @@ function shortcut_page_build(&$page) {
   $links = shortcut_renderable_links();
   $links['#attached'] = array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css'));
   $links['#prefix'] = '<div class="toolbar-shortcuts">';
-  $links['#suffix'] = '</div>';
   $shortcut_set = shortcut_current_displayed_set();
   $configure_link = NULL;
   if (shortcut_set_edit_access($shortcut_set)) {
@@ -567,8 +566,12 @@ function shortcut_page_build(&$page) {
       '#title' => t('edit shortcuts'),
       '#href' => 'admin/config/system/shortcut/' . $shortcut_set->set_name,
       '#options' => array('attributes' => array('id' => 'toolbar-customize')),
+      '#suffix' => '</div>',
     );
   }
+  else {
+    $links['#suffix'] = '</div>';
+  }
 
   $drawer = array(
     'shortcuts' => $links,
Index: modules/toolbar/toolbar.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.css,v
retrieving revision 1.8
diff -u -p -r1.8 toolbar.css
--- modules/toolbar/toolbar.css	11 Nov 2009 06:56:52 -0000	1.8
+++ modules/toolbar/toolbar.css	14 Nov 2009 16:18:29 -0000
@@ -1,11 +1,11 @@
 /* $Id: toolbar.css,v 1.8 2009/11/11 06:56:52 webchick Exp $ */
 
 body.toolbar {
-  padding-top: 30px;
+  padding-top: 80px;
 }
 
-body.toolbar-drawer {
-  padding-top: 80px;
+body.toolbar-undocked {
+  padding-top: 30px;
 }
 
 /**
@@ -76,7 +76,7 @@ div#toolbar div.toolbar-menu {
 
 div#toolbar div.toolbar-menu #toolbar-user {
   position: absolute;
-  right: 50px;
+  right: 10px;
 }
 
 div#toolbar div.toolbar-menu #toolbar-menu {
@@ -84,21 +84,6 @@ div#toolbar div.toolbar-menu #toolbar-me
   left: 10px;
 }
 
-div#toolbar div.toolbar-menu span.toggle {
-  position: absolute;
-  right: 10px;
-  cursor: pointer;
-  background: url(toolbar.png) 0 -20px no-repeat;
-  text-indent: -9999px;
-  overflow: hidden;
-  width: 25px;
-  height: 25px;
-}
-
-div#toolbar div.toolbar-menu span.toggle-active {
-  background-position:  -25px -20px;
-}
-
 div#toolbar div.toolbar-menu ul li a {
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
@@ -125,6 +110,10 @@ div#toolbar div.toolbar-drawer {
   padding: 0 10px;
 }
 
+div#toolbar.toolbar-processed div.toolbar-drawer {
+  padding: 0 10px 0 35px;
+}
+
 /**
  * IE 6 Fixes.
  *
Index: modules/toolbar/toolbar.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.js,v
retrieving revision 1.7
diff -u -p -r1.7 toolbar.js
--- modules/toolbar/toolbar.js	17 Oct 2009 00:51:53 -0000	1.7
+++ modules/toolbar/toolbar.js	14 Nov 2009 16:18:29 -0000
@@ -10,11 +10,23 @@ Drupal.behaviors.admin = {
     // Set the intial state of the toolbar.
     $('#toolbar', context).once('toolbar', Drupal.admin.toolbar.init);
 
-    // Toggling toolbar drawer.
-    $('#toolbar span.toggle', context).once('toolbar-toggle').click(function() {
-      Drupal.admin.toolbar.toggle();
+    // Create an event to dock/undock the toolbar shortcuts.
+    $('#toolbar-toggle-dock', context).once('toggle-dock').click(function(e) {
+      Drupal.admin.toolbar.toggle_dock();
       return false;
     });
+
+    // Create an event to show/hide the toolbar shortcuts.
+    $('#toolbar', context).once('toolbar-toggle').hoverIntent(function(e) {
+        Drupal.admin.toolbar.expand();
+    },
+    function(e) {
+      // Retrieve the docked status from a stored cookie.
+      var docked = $.cookie('Drupal.admin.toolbar.docked') || 1;
+      if(docked != 1) {
+        Drupal.admin.toolbar.collapse();
+      }
+    });
   }
 };
 
@@ -27,56 +39,84 @@ Drupal.admin.toolbar = Drupal.admin.tool
 /**
  * Retrieve last saved cookie settings and set up the initial toolbar state.
  */
-Drupal.admin.toolbar.init = function() {
-  // Retrieve the collapsed status from a stored cookie.
-  var collapsed = $.cookie('Drupal.admin.toolbar.collapsed');
-
-  // Expand or collapse the toolbar based on the cookie value.
-  if (collapsed == 1) {
-    Drupal.admin.toolbar.collapse();
+Drupal.admin.toolbar.init = function() { 
+  // Retrieve the docked status from a stored cookie.
+  var docked = $.cookie('Drupal.admin.toolbar.docked') || 1;
+
+  // Add a toggle element to dock the toolbar shortcuts.
+  if (docked == 1) {
+    $('div.toolbar-drawer').prepend('<a id="toolbar-toggle-dock" href="#">' + Drupal.t('Undock the toolbar') + '</a>');
   }
   else {
+    $('div.toolbar-drawer').prepend('<a id="toolbar-toggle-dock" href="#">' + Drupal.t('Dock the toolbar') + '</a>');
+  }
+ 
+  // Expand or collapse the toolbar shortcuts based on the cookie value.
+  if (docked == 1) {
     Drupal.admin.toolbar.expand();
   }
+  else {
+    // We do not hide it with the .collapse() because the animation would
+    // be annoying on initialization.
+    $('body.toolbar').addClass('toolbar-undocked');
+    $('#toolbar').addClass('collapsed');
+    $('body').removeClass('toolbar-collapsed');
+    $('div.toolbar-drawer').hide();
+  }
 }
 
 /**
  * Collapse the admin toolbar.
  */
 Drupal.admin.toolbar.collapse = function() {
-  $('#toolbar div.toolbar-drawer').addClass('collapsed');
-  $('#toolbar span.toggle').removeClass('toggle-active');
-  $('body').removeClass('toolbar-drawer');
-  $.cookie(
-    'Drupal.admin.toolbar.collapsed', 
-    1, 
-    {path: Drupal.settings.basePath}
-  );
+  $('#toolbar').addClass('collapsed');
+  $('body').removeClass('toolbar-collapsed');
+  $('div.toolbar-drawer').slideUp('normal');
 }
 
 /**
  * Expand the admin toolbar.
  */
 Drupal.admin.toolbar.expand = function() {
-  $('#toolbar div.toolbar-drawer').removeClass('collapsed');
-  $('#toolbar span.toggle').addClass('toggle-active');
-  $('body').addClass('toolbar-drawer');
-  $.cookie(
-    'Drupal.admin.toolbar.collapsed', 
-    0, 
-    {path: Drupal.settings.basePath}
-  );
+  $('#toolbar').removeClass('collapsed');
+  $('body').addClass('toolbar-collapsed');
+  $('div.toolbar-drawer').slideDown('normal');
 }
 
 /**
- * Toggle the admin toolbar.
+ * Toggle the docking state.
  */
-Drupal.admin.toolbar.toggle = function() {
-  if ($('#toolbar .toolbar-drawer').is('.collapsed')) {
-    Drupal.admin.toolbar.expand();
+Drupal.admin.toolbar.toggle_dock = function() {
+  // Retrieve the docked status from a stored cookie.
+  var docked = $.cookie('Drupal.admin.toolbar.docked') || 1;
+
+  if (docked == 1) {
+    // Undock the toolbar
+    $.cookie(
+      'Drupal.admin.toolbar.docked', 
+      0,
+      {
+        path: Drupal.settings.basePath,
+        // The cookie should "never" expire.
+        expires: 36500
+      }
+    );
+    $('body.toolbar').addClass('toolbar-undocked');
+    $('#toolbar-toggle-dock').removeClass('active').html(Drupal.t('Dock the shortcuts'));
   }
   else {
-    Drupal.admin.toolbar.collapse();
+    // Dock the toolbar
+    $.cookie(
+      'Drupal.admin.toolbar.docked', 
+      1,
+      {
+        path: Drupal.settings.basePath,
+        // The cookie should "never" expire.
+        expires: 36500
+      }
+    );
+    $('body.toolbar').removeClass('toolbar-undocked');
+    $('#toolbar-toggle-dock').addClass('active').html(Drupal.t('Undock the shortcuts'));
   }
 }
 
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.19
diff -u -p -r1.19 toolbar.module
--- modules/toolbar/toolbar.module	10 Nov 2009 17:27:54 -0000	1.19
+++ modules/toolbar/toolbar.module	14 Nov 2009 16:18:29 -0000
@@ -78,6 +78,7 @@ function toolbar_build() {
       'js' => array(
         $module_path . '/toolbar.js',
         array('data' => 'misc/jquery.cookie.js', 'weight' => JS_LIBRARY + 2),
+        array('data' => 'misc/jquery.hoverintent.js', 'weight' => JS_LIBRARY + 3),
         array(
           'data' => array('tableHeaderOffset' => 'Drupal.admin.toolbar.height'),
           'type' => 'setting'
Index: modules/toolbar/toolbar.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.tpl.php,v
retrieving revision 1.6
diff -u -p -r1.6 toolbar.tpl.php
--- modules/toolbar/toolbar.tpl.php	27 Oct 2009 04:12:39 -0000	1.6
+++ modules/toolbar/toolbar.tpl.php	14 Nov 2009 16:18:29 -0000
@@ -24,9 +24,6 @@
 ?>
 <div id="toolbar" class="<?php print $classes; ?> clearfix">
   <div class="toolbar-menu clearfix">
-    <?php if ($toolbar['toolbar_drawer']):?>
-      <span class="toggle toggle-active"><?php print t('Open'); ?></span>
-    <?php endif; ?>
     <?php print render($toolbar['toolbar_menu']); ?>
     <?php print render($toolbar['toolbar_user']); ?>
   </div>
