}
#civicrm-menu {
- position:absolute;
+ position:fixed;
top:0;
left:0;
background:#1B1B1B repeat-x;
// 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%'});
});
// 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 ('<span id="crm-remove-title" style="display:none">CiviCRM</span>' == pageTitle.text()) {
- pageTitle.hide();
- }
+ var pageTitle = $('.page-title');
+ if ('<span id="crm-remove-title" style="display:none">CiviCRM</span>' == 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();
});
});
$('#wpadminbar').toggle(e.data === 2);
});
}
- })
- .ready(function() {
- $('#civicrm-menu').css({position: "fixed", top: "0px"});
- });
+ });
});
});
$('.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}'<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});
$('#crm-restore-menu')
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'})
;