summaryrefslogtreecommitdiff
path: root/modules/toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/toolbar')
-rw-r--r--modules/toolbar/toolbar.css44
-rw-r--r--modules/toolbar/toolbar.info4
-rw-r--r--modules/toolbar/toolbar.js12
-rw-r--r--modules/toolbar/toolbar.module15
-rw-r--r--modules/toolbar/toolbar.pngbin733 -> 1075 bytes
-rw-r--r--modules/toolbar/toolbar.tpl.php10
6 files changed, 20 insertions, 65 deletions
diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css
index e64d353cc..a5c7e84a5 100644
--- a/modules/toolbar/toolbar.css
+++ b/modules/toolbar/toolbar.css
@@ -4,7 +4,7 @@ body.toolbar {
padding-top: 30px;
}
-body.toolbar-shortcuts {
+body.toolbar-drawer {
padding-top: 80px;
}
@@ -118,49 +118,13 @@ div#toolbar div.toolbar-menu ul li a.active {
}
/**
- * Administration shortcuts.
+ * Collapsed drawer of additional toolbar content.
*/
-div#toolbar div.toolbar-shortcuts {
+div#toolbar div.toolbar-drawer {
position: relative;
padding: 0 10px;
}
-div#toolbar div.toolbar-shortcuts ul {
- padding: 5px 0;
- height: 40px;
- line-height: 30px;
- overflow: hidden;
- float: left;
-}
-
-div#toolbar div.toolbar-shortcuts ul li a {
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- padding: 5px 10px 5px 5px;
- margin-right: 5px;
-}
-
-div#toolbar div.toolbar-shortcuts ul li a:focus,
-div#toolbar div.toolbar-shortcuts ul li a:hover,
-div#toolbar div.toolbar-shortcuts ul li a.active:focus {
- background: #555;
-}
-
-div#toolbar div.toolbar-shortcuts ul li a.active:hover,
-div#toolbar div.toolbar-shortcuts ul li a.active {
- background: url(toolbar.png) 0 -20px repeat-x;
-}
-
-div#toolbar div.toolbar-shortcuts span.icon {
- float: left;
- background: #444;
- width: 30px;
- height: 30px;
- margin-right: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
/**
* IE 6 Fixes.
*
@@ -168,7 +132,7 @@ div#toolbar div.toolbar-shortcuts span.icon {
* the behavior of the admin toolbar entirely to static positioning.
*/
* html body.toolbar,
-* html body.toolbar-shortcuts {
+* html body.toolbar-drawer {
padding-top: 0;
}
diff --git a/modules/toolbar/toolbar.info b/modules/toolbar/toolbar.info
index c38ea2e5c..23b6b477d 100644
--- a/modules/toolbar/toolbar.info
+++ b/modules/toolbar/toolbar.info
@@ -1,9 +1,7 @@
; $Id$
name = Toolbar
-description = Toolbar exposing the top level administration menu items
+description = Toolbar exposing the top level administration menu items.
core = 7.x
package = Core
version = VERSION
-files[] = toolbar.install
files[] = toolbar.module
-dependencies[] = menu
diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js
index 50a60a796..48e8d7ab1 100644
--- a/modules/toolbar/toolbar.js
+++ b/modules/toolbar/toolbar.js
@@ -10,7 +10,7 @@ Drupal.behaviors.admin = {
// Set the intial state of the toolbar.
$('#toolbar', context).once('toolbar', Drupal.admin.toolbar.init);
- // Toggling of admin shortcuts visibility.
+ // Toggling toolbar drawer.
$('#toolbar span.toggle', context).once('toolbar-toggle').click(function() {
Drupal.admin.toolbar.toggle();
return false;
@@ -44,9 +44,9 @@ Drupal.admin.toolbar.init = function() {
* Collapse the admin toolbar.
*/
Drupal.admin.toolbar.collapse = function() {
- $('#toolbar div.toolbar-shortcuts').addClass('collapsed');
+ $('#toolbar div.toolbar-drawer').addClass('collapsed');
$('#toolbar span.toggle').removeClass('toggle-active');
- $('body').removeClass('toolbar-shortcuts');
+ $('body').removeClass('toolbar-drawer');
$.cookie(
'Drupal.admin.toolbar.collapsed',
1,
@@ -58,9 +58,9 @@ Drupal.admin.toolbar.collapse = function() {
* Expand the admin toolbar.
*/
Drupal.admin.toolbar.expand = function() {
- $('#toolbar div.toolbar-shortcuts').removeClass('collapsed');
+ $('#toolbar div.toolbar-drawer').removeClass('collapsed');
$('#toolbar span.toggle').addClass('toggle-active');
- $('body').addClass('toolbar-shortcuts');
+ $('body').addClass('toolbar-drawer');
$.cookie(
'Drupal.admin.toolbar.collapsed',
0,
@@ -72,7 +72,7 @@ Drupal.admin.toolbar.expand = function() {
* Toggle the admin toolbar.
*/
Drupal.admin.toolbar.toggle = function() {
- if ($('#toolbar div.toolbar-shortcuts').is('.collapsed')) {
+ if ($('#toolbar .toolbar-drawer').is('.collapsed')) {
Drupal.admin.toolbar.expand();
}
else {
diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module
index f883588f0..5d83914c4 100644
--- a/modules/toolbar/toolbar.module
+++ b/modules/toolbar/toolbar.module
@@ -38,17 +38,18 @@ function toolbar_theme($existing, $type, $theme, $path) {
function toolbar_page_build(&$page) {
if (user_access('access toolbar')) {
$page['page_top']['toolbar'] = toolbar_build();
+ $page['page_top']['toolbar']['toolbar_drawer'] = isset($page['toolbar_drawer']) ? $page['toolbar_drawer'] : array();
}
}
/**
- * Implement hook_preprocess_page().
+ * Implement hook_preprocess_html().
*
* Add some page classes, so global page theming can adjust to the toolbar.
*/
function toolbar_preprocess_html(&$vars) {
if (user_access('access toolbar')) {
- $vars['classes_array'][] = 'toolbar toolbar-shortcuts';
+ $vars['classes_array'][] = 'toolbar toolbar-drawer';
}
}
@@ -100,16 +101,6 @@ function toolbar_build() {
),
'#attributes' => array('id' => 'toolbar-user'),
);
-
- // Add convenience shortcut links.
- $shortcuts = menu_tree_all_data('admin_shortcuts');
- $shortcuts = toolbar_menu_navigation_links($shortcuts);
- $build['toolbar_shortcuts'] = array(
- '#theme' => 'links',
- '#links' => $shortcuts,
- '#attributes' => array('id' => 'toolbar-shortcuts'),
- );
-
return $build;
}
diff --git a/modules/toolbar/toolbar.png b/modules/toolbar/toolbar.png
index ffe41ff0f..391d2e750 100644
--- a/modules/toolbar/toolbar.png
+++ b/modules/toolbar/toolbar.png
Binary files differ
diff --git a/modules/toolbar/toolbar.tpl.php b/modules/toolbar/toolbar.tpl.php
index 8a68998af..64576ceaf 100644
--- a/modules/toolbar/toolbar.tpl.php
+++ b/modules/toolbar/toolbar.tpl.php
@@ -8,7 +8,7 @@
* Available variables:
* - $toolbar['toolbar_user']: User account / logout links.
* - $toolbar['toolbar_menu']: Top level management menu links.
- * - $toolbar['toolbar_shortcuts']: Convenience shortcuts.
+ * - $toolbar['toolbar_drawer']: A place for extended toolbar content.
*
* @see template_preprocess()
* @see template_preprocess_admin_toolbar()
@@ -16,13 +16,15 @@
?>
<div id="toolbar" class="clearfix">
<div class="toolbar-menu clearfix">
- <span class="toggle toggle-active"><?php print t('Show shortcuts'); ?></span>
+ <?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>
- <div class="toolbar-shortcuts clearfix">
- <?php print render($toolbar['toolbar_shortcuts']); ?>
+ <div class="toolbar-drawer clearfix">
+ <?php print render($toolbar['toolbar_drawer']); ?>
</div>
<div class="shadow"></div>