summaryrefslogtreecommitdiff
path: root/modules/toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/toolbar')
-rw-r--r--modules/toolbar/toolbar.js5
-rw-r--r--modules/toolbar/toolbar.module10
2 files changed, 12 insertions, 3 deletions
diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js
index 85129f824..4336218b6 100644
--- a/modules/toolbar/toolbar.js
+++ b/modules/toolbar/toolbar.js
@@ -15,9 +15,8 @@ Drupal.behaviors.toolbar = {
// Toggling toolbar drawer.
$('#toolbar a.toggle', context).once('toolbar-toggle').click(function(e) {
Drupal.toolbar.toggle();
- // As the toolbar is an overlay displaced region, overlay should be
- // notified of it's height change to adapt its position.
- $(window).triggerHandler('resize.overlay-event');
+ // Allow resize event handlers to recalculate sizes/positions.
+ $(window).triggerHandler('resize');
return false;
});
}
diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module
index 396c50f93..fa0782a7e 100644
--- a/modules/toolbar/toolbar.module
+++ b/modules/toolbar/toolbar.module
@@ -151,6 +151,16 @@ function toolbar_preprocess_html(&$vars) {
}
/**
+ * Implements hook_preprocess_toolbar().
+ *
+ * Adding the 'overlay-displace-top' class to the toolbar pushes the overlay
+ * down, so it appears below the toolbar.
+ */
+function toolbar_preprocess_toolbar(&$variables) {
+ $variables['classes_array'][] = "overlay-displace-top";
+}
+
+/**
* Implements hook_system_info_alter().
*
* Indicate that the 'page_top' region (in which the toolbar will be displayed)