diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-02-10 10:54:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-02-10 10:54:12 +0000 |
commit | 63f40df61080e7dd770e404b73b1a9a894bbd108 (patch) | |
tree | e3a58191832308539c116baa2a231203270fca96 /modules/toolbar/toolbar.js | |
parent | c863d0a7ab9326f2c6ce3a49b55e00e2d672aabc (diff) | |
download | brdo-63f40df61080e7dd770e404b73b1a9a894bbd108.tar.gz brdo-63f40df61080e7dd770e404b73b1a9a894bbd108.tar.bz2 |
- Patch #535066 by jide, jbrown, marvil07, yoroy, mcjim, TheRec, mr.baileys: use CSS3 / IE filter to render toolbar shadow.
Diffstat (limited to 'modules/toolbar/toolbar.js')
-rw-r--r-- | modules/toolbar/toolbar.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js index a71d22daa..673507fbe 100644 --- a/modules/toolbar/toolbar.js +++ b/modules/toolbar/toolbar.js @@ -49,7 +49,7 @@ Drupal.toolbar.collapse = function() { .removeClass('toggle-active') .attr('title', toggle_text) .html(toggle_text); - $('body').removeClass('toolbar-drawer').css('paddingTop', $('#toolbar').outerHeight()); + $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height()); $.cookie( 'Drupal.toolbar.collapsed', 1, @@ -71,7 +71,7 @@ Drupal.toolbar.expand = function() { .addClass('toggle-active') .attr('title', toggle_text) .html(toggle_text); - $('body').addClass('toolbar-drawer').css('paddingTop', $('#toolbar').outerHeight()); + $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height()); $.cookie( 'Drupal.toolbar.collapsed', 0, @@ -96,7 +96,13 @@ Drupal.toolbar.toggle = function() { }; Drupal.toolbar.height = function() { - return $("#toolbar").height(); + 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; + } + return height; }; })(jQuery); |