From: deb.monish Date: Wed, 18 Jul 2018 12:51:18 +0000 (+0530) Subject: additional fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c934649446f8ec7ca2cc7729371729789779984c;p=civicrm-core.git additional fixes --- diff --git a/css/civicrmNavigation.css b/css/civicrmNavigation.css index e005bb004b..5cf48d3f3c 100644 --- a/css/civicrmNavigation.css +++ b/css/civicrmNavigation.css @@ -63,7 +63,7 @@ html>body .innerbox } #civicrm-menu { - position:absolute; + position:fixed; top:0; left:0; background:#1B1B1B repeat-x; diff --git a/js/crm.drupal7.js b/js/crm.drupal7.js index 72a6d461d7..4be65e4106 100644 --- a/js/crm.drupal7.js +++ b/js/crm.drupal7.js @@ -10,8 +10,6 @@ CRM.$(function($) { // D7 hack, restore toolbar position (CRM-15341) $('#toolbar').css('z-index', ''); } - }) - .ready(function() { - $('#civicrm-menu').css({position: "fixed", top: "0px", 'width': '97%'}); - }); + }); + $('#civicrm-menu').css({'width': '97%'}); }); diff --git a/js/crm.drupal8.js b/js/crm.drupal8.js index b35656b415..32c06a6bb4 100644 --- a/js/crm.drupal8.js +++ b/js/crm.drupal8.js @@ -1,14 +1,17 @@ // http://civicrm.org/licensing CRM.$(function($) { // d8 Hack to hide title when it should be (CRM-19960) - $(document).ready(function() { - var pageTitle = $('.page-title'); - if ('' == pageTitle.text()) { - pageTitle.hide(); - } + var pageTitle = $('.page-title'); + if ('' == pageTitle.text()) { + pageTitle.hide(); + } - $('#civicrm-menu').css({position: "fixed", top: "0px", height: "29px"}); + $('#toolbar-bar').hide(); - $('#toolbar-bar').hide(); + $('.crm-hidemenu').click(function(e) { + $('#toolbar-bar').slideDown(); + }); + $('#crm-notification-container').on('click', '#crm-restore-menu', function() { + $('#toolbar-bar').slideUp(); }); }); diff --git a/js/crm.wordpress.js b/js/crm.wordpress.js index e9667e6d12..774b24a35f 100644 --- a/js/crm.wordpress.js +++ b/js/crm.wordpress.js @@ -17,8 +17,5 @@ CRM.$(function($) { $('#wpadminbar').toggle(e.data === 2); }); } - }) - .ready(function() { - $('#civicrm-menu').css({position: "fixed", top: "0px"}); - }); + }); }); diff --git a/templates/CRM/common/navigation.js.tpl b/templates/CRM/common/navigation.js.tpl index 2b26596a74..5902068185 100644 --- a/templates/CRM/common/navigation.js.tpl +++ b/templates/CRM/common/navigation.js.tpl @@ -150,9 +150,6 @@ $('#civicrm-menu').ready(function() { }); $('.crm-hidemenu').click(function(e) { $('#civicrm-menu').slideUp(); - if ($('#toolbar-bar').length) { - $('#toolbar-bar').slideDown(); - } if ($('#crm-notification-container').length) { var alert = CRM.alert({/literal}'{ts escape='js'}Restore CiviCRM Menu{/ts}'{literal}, '', 'none', {expires: 10000}); $('#crm-restore-menu') @@ -161,9 +158,6 @@ $('#civicrm-menu').ready(function() { e.preventDefault(); alert.close(); $('#civicrm-menu').slideDown(); - if ($('#toolbar-bar').length) { - $('#toolbar-bar').slideUp(); - } }) .parent().css('text-align', 'center').find('.ui-button-text').css({'padding-top': '4px', 'padding-bottom': '4px'}) ;