Intelligently adjust menubar for D7 toolbar toggle
authorColeman Watts <coleman@civicrm.org>
Mon, 15 Oct 2018 21:22:59 +0000 (17:22 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 15 Oct 2018 21:22:59 +0000 (17:22 -0400)
js/crm.drupal7.js

index 4be65e41065e27201a0c8fb9245bb3dec818b5a2..facd7f1a095bd2ba857e139dfa7ce0dcf115fe81 100644 (file)
@@ -11,5 +11,7 @@ CRM.$(function($) {
         $('#toolbar').css('z-index', '');
       }
     });
-    $('#civicrm-menu').css({'width': '97%'});
+  if ($('#toolbar a.toggle').length) {
+    $('#civicrm-menu').css({width: 'calc(100% - 40px)'});
+  }
 });