From 3c7172b9f159108e1a98b5fc91c1a6f1a8929497 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 1 Aug 2014 12:47:51 +0100 Subject: [PATCH] Improve 'restore menu' button --- templates/CRM/common/navigation.js.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/CRM/common/navigation.js.tpl b/templates/CRM/common/navigation.js.tpl index 1c32d33fc0..d5c0a31ced 100644 --- a/templates/CRM/common/navigation.js.tpl +++ b/templates/CRM/common/navigation.js.tpl @@ -126,14 +126,14 @@ $('#civicrm-menu').ready(function() { $('.crm-hidemenu').click(function() { $.Menu.closeAll(); $('#civicrm-menu').slideUp(); - var alert = CRM.alert({/literal}'{ts escape='js'}Restore Menu{/ts}', "{ts escape='js'}CiviCRM Menu Hidden{/ts}"{literal}); - $('#crm-notification-container') - .off('.hideMenu') - .on('click.hideMenu', '#crm-restore-menu', function() { + if ($('#crm-notification-container').length) { + var alert = CRM.alert({/literal}'{ts escape='js'}Restore Menu{/ts}', "{ts escape='js'}CiviCRM Menu Hidden{/ts}"{literal}); + $('#crm-restore-menu').button({icons: {primary: 'ui-icon-arrowreturnthick-1-w'}}).click(function(e) { + e.preventDefault(); alert.close(); $('#civicrm-menu').slideDown(); - return false; }); + } return false; }); $('.crm-quickSearchField').click(function() { -- 2.25.1