CRM-15705 - Fix menu closing
authorColeman Watts <coleman@civicrm.org>
Sun, 15 Feb 2015 02:49:17 +0000 (21:49 -0500)
committerColeman Watts <coleman@civicrm.org>
Sun, 15 Feb 2015 02:49:17 +0000 (21:49 -0500)
templates/CRM/common/navigation.js.tpl

index 845afeb0ddb0aa471e566dad225150f933c85c68..553e248b9d9d8fcb1d7a430230177f668eaa50a2 100644 (file)
@@ -127,7 +127,6 @@ $('#civicrm-menu').ready(function() {
       $.Menu.closeAll();
     });
   $('.crm-hidemenu').click(function(e) {
-    $.Menu.closeAll();
     $('#civicrm-menu').slideUp();
     if ($('#crm-notification-container').length) {
       var alert = CRM.alert({/literal}'<a href="#" id="crm-restore-menu" style="text-align: center; margin-top: -8px;">{ts escape='js'}Restore CiviCRM Menu{/ts}</a>'{literal}, '', 'none', {expires: 10000});
@@ -161,6 +160,8 @@ $('#civicrm-menu').ready(function() {
       return false;
     }
   });
+  // Close menu after selecting an item
+  $('#root-menu-div').on('click', 'a', $.Menu.closeAll);
 });
 $('#civicrm-menu').menuBar({arrowSrc: CRM.config.resourceBase + 'packages/jquery/css/images/arrow.png'});
 })(CRM.$);{/literal}