From 877e5889e56a21553bb74111b5929044c802afa8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 23 Oct 2014 14:54:09 -0400 Subject: [PATCH] Make 'civicrm menu hidden' alert less obtrusive --- css/civicrm.css | 3 +++ templates/CRM/common/navigation.js.tpl | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index 9b5b42b7a0..02bd17d26f 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -4239,6 +4239,9 @@ div.m ul#civicrm-menu, .crm-status-icon.error { background-position: -72px 0px; } +.crm-container div.ui-notify-message.none div.icon { + display: none; +} span.crm-status-icon { display: inline-block; diff --git a/templates/CRM/common/navigation.js.tpl b/templates/CRM/common/navigation.js.tpl index ff627c457d..316c7e5487 100644 --- a/templates/CRM/common/navigation.js.tpl +++ b/templates/CRM/common/navigation.js.tpl @@ -126,18 +126,22 @@ $('#civicrm-menu').ready(function() { .keydown(function() { $.Menu.closeAll(); }); - $('.crm-hidemenu').click(function() { + $('.crm-hidemenu').click(function(e) { $.Menu.closeAll(); $('#civicrm-menu').slideUp(); 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(); - }); + var alert = CRM.alert({/literal}'{ts escape='js'}Restore CiviCRM Menu{/ts}'{literal}, '', 'none', {expires: 10000}); + $('#crm-restore-menu') + .button({icons: {primary: 'ui-icon-arrowreturnthick-1-w'}}) + .click(function(e) { + e.preventDefault(); + alert.close(); + $('#civicrm-menu').slideDown(); + }) + .parent().css('text-align', 'center').find('.ui-button-text').css({'padding-top': '4px', 'padding-bottom': '4px'}) + ; } - return false; + e.preventDefault(); }); $('.crm-quickSearchField').click(function() { var label = $(this).text(); -- 2.25.1