From: Coleman Watts Date: Sat, 9 Mar 2013 00:54:44 +0000 (-0800) Subject: Hack to fix joomla menu CRM-12067 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=735c0c34335dacbe9ddc864814949f6a1b174cb3;p=civicrm-core.git Hack to fix joomla menu CRM-12067 --- diff --git a/templates/CRM/common/Navigation.tpl b/templates/CRM/common/Navigation.tpl index 6ac97dba06..f576a15006 100644 --- a/templates/CRM/common/Navigation.tpl +++ b/templates/CRM/common/Navigation.tpl @@ -137,8 +137,7 @@ function getSearchURLValue( ) document.getElementById('id_search_block').action = url; } } - -if (CRM.config.userFramework != 'Joomla') { +{/literal}{if $config->userFramework neq 'Joomla'}{literal} cj('body').prepend( cj("#menu-container").html() ); //Track Scrolling @@ -151,15 +150,15 @@ if (CRM.config.userFramework != 'Joomla') { if ( cj('#edit-shortcuts').length > 0 ) { cj('#civicrm-menu').css({ 'width': '97%' }); } -} -else { - cj('div#toolbar-box div.m').html(cj("#menu-container").html()); - cj('#civicrm-menu').ready( function(){ - cj('.outerbox').css({ 'margin-top': '20px'}); - cj('#root-menu-div .menu-ul li').css({ 'padding-bottom' : '2px', 'margin-top' : '2px' }); - cj('img.menu-item-arrow').css({ 'top' : '4px' }); - }); -} +{/literal}{else}{* Special menu hacks for Joomla *}{literal} + cj('div#toolbar-box div.m').html(cj("#menu-container").html()); + cj('#civicrm-menu').ready(function() { + cj('#root-menu-div .outerbox').css({ 'margin-top': '6px'}); + cj('#root-menu-div .outerbox').first().css({ 'margin-top': '20px'}); + cj('#root-menu-div .menu-ul li').css({ 'padding-bottom' : '2px', 'margin-top' : '2px' }); + cj('img.menu-item-arrow').css({ 'top' : '4px' }); + }); +{/literal}{/if}{literal} cj('#civicrm-menu').menu( {arrowSrc: CRM.config.resourceBase + 'packages/jquery/css/images/arrow.png'} ); {/literal}