diff options
Diffstat (limited to 'modules/toolbar')
-rw-r--r-- | modules/toolbar/toolbar.css | 3 | ||||
-rw-r--r-- | modules/toolbar/toolbar.js | 10 | ||||
-rw-r--r-- | modules/toolbar/toolbar.module | 13 |
3 files changed, 24 insertions, 2 deletions
diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css index 2e1894f70..9f9838dcb 100644 --- a/modules/toolbar/toolbar.css +++ b/modules/toolbar/toolbar.css @@ -36,7 +36,7 @@ div#toolbar { left: 0; right: 0; top: 0; - z-index: 100; + z-index: 600; } div#toolbar .collapsed { @@ -71,7 +71,6 @@ div#toolbar div.toolbar-menu { height: 25px; line-height: 20px; padding: 5px 10px 0; - overflow: hidden; position: relative; } diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js index 9c07f78bd..18b366102 100644 --- a/modules/toolbar/toolbar.js +++ b/modules/toolbar/toolbar.js @@ -15,6 +15,16 @@ Drupal.behaviors.admin = { Drupal.admin.toolbar.toggle(); return false; }); + + // Set the most recently clicked item as active. + $('#toolbar a').once().click(function() { + $('#toolbar a').each(function() { + $(this).removeClass('active'); + }); + if ($(this).parents('div.toolbar-shortcuts').length) { + $(this).addClass('active'); + } + }); } }; diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module index ddb1a452d..f668cb135 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -134,6 +134,19 @@ function toolbar_preprocess_html(&$vars) { } /** + * Implements hook_system_info_alter(). + * + * If the overlay module is enabled, indicate that the 'page_top' region (in + * which the toolbar will be displayed) is one of the overlay supplemental + * regions that should be refreshed whenever its content is updated. + */ +function toolbar_system_info_alter(&$info, $file, $type) { + if (module_exists('overlay') && $type == 'theme') { + $info['overlay_supplemental_regions'][] = 'page_top'; + } +} + +/** * Build the admin menu as a structured array ready for drupal_render(). */ function toolbar_build() { |