$(this).button('option', 'icons', {primary: 'fa-expand'});
} else {
var menuHeight = $('#civicrm-menu').outerHeight();
+ if ($('body').hasClass('crm-menubar-below-cms-menu')) {
+ menuHeight += $('#civicrm-menu').offset().top;
+ }
$el.data('origSize', {
position: {my: 'center', at: 'center center+' + (menuHeight / 2), of: window},
width: $el.dialog('option', 'width'),
var currentHeight = $wrapper.outerHeight(),
padding = currentHeight - $dialog.height(),
newHeight = $dialog.prop('scrollHeight') + padding,
- menuHeight = $('#civicrm-menu').outerHeight(),
- maxHeight = $(window).height() - menuHeight;
+ menuHeight = $('#civicrm-menu').outerHeight();
+ if ($('body').hasClass('crm-menubar-below-cms-menu')) {
+ menuHeight += $('#civicrm-menu').offset().top;
+ }
+ var maxHeight = $(window).height() - menuHeight;
newHeight = newHeight > maxHeight ? maxHeight : newHeight;
if (newHeight > (currentHeight + 15)) {
$dialog.dialog('option', {