summaryrefslogtreecommitdiff
path: root/modules/toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/toolbar')
-rw-r--r--modules/toolbar/toolbar.js15
-rw-r--r--modules/toolbar/toolbar.module2
2 files changed, 11 insertions, 6 deletions
diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js
index 5b61634bb..d50f20566 100644
--- a/modules/toolbar/toolbar.js
+++ b/modules/toolbar/toolbar.js
@@ -94,11 +94,16 @@ Drupal.toolbar.toggle = function() {
};
Drupal.toolbar.height = function() {
- var height = $('#toolbar').outerHeight();
- // In IE, Shadow filter adds some extra height, so we need to remove it from
- // the returned height.
- if ($('#toolbar').css('filter').match(/DXImageTransform\.Microsoft\.Shadow/)) {
- height -= $('#toolbar').get(0).filters.item("DXImageTransform.Microsoft.Shadow").strength;
+ var $toolbar = $('#toolbar');
+ var height = $toolbar.outerHeight();
+ // In modern browsers (including IE9), when box-shadow is defined, use the
+ // normal height.
+ var cssBoxShadowValue = $toolbar.css('box-shadow');
+ var boxShadow = (typeof cssBoxShadowValue !== 'undefined' && cssBoxShadowValue !== 'none');
+ // In IE8 and below, we use the shadow filter to apply box-shadow styles to
+ // the toolbar. It adds some extra height that we need to remove.
+ if (!boxShadow && /DXImageTransform\.Microsoft\.Shadow/.test($toolbar.css('filter'))) {
+ height -= $toolbar[0].filters.item("DXImageTransform.Microsoft.Shadow").strength;
}
return height;
};
diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module
index de2d2619b..6d1b581d9 100644
--- a/modules/toolbar/toolbar.module
+++ b/modules/toolbar/toolbar.module
@@ -12,7 +12,7 @@ function toolbar_help($path, $arg) {
switch ($path) {
case 'admin/help#toolbar':
$output = '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The Toolbar module displays links to top-level administration menu items and links from other modules at the top of the screen. For more information, see the online handbook entry for <a href="@toolbar">Toolbar module</a>.', array('@toolbar' => 'http://drupal.org/handbook/modules/toolbar/')) . '</p>';
+ $output .= '<p>' . t('The Toolbar module displays links to top-level administration menu items and links from other modules at the top of the screen. For more information, see the online handbook entry for <a href="@toolbar">Toolbar module</a>.', array('@toolbar' => 'http://drupal.org/documentation/modules/toolbar/')) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Displaying administrative links') . '</dt>';