From 53ef0226402dbc055f9b79d18e5876c17d382f35 Mon Sep 17 00:00:00 2001 From: kurund Date: Sun, 14 Apr 2013 04:21:49 +0530 Subject: [PATCH] worked on CRM-12096, fixed the missing navigation menu on joomla 3.x ---------------------------------------- * CRM-12096: http://issues.civicrm.org/jira/browse/CRM-12096 --- css/joomla.css | 4 ++-- templates/CRM/common/Navigation.tpl | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/css/joomla.css b/css/joomla.css index e0c8c3b1f1..9e2de44925 100644 --- a/css/joomla.css +++ b/css/joomla.css @@ -466,8 +466,8 @@ ul#civicrm-menu { border: none; left:0px; height:0px; - padding: 2px 0px 22px 2px !important; - padding-bottom:22px !important; /*moz bottom */ + padding: 2px 0px 25px 2px !important; + padding-bottom:25px !important; /*moz bottom */ padding-bottom:2px; /*ie bottom */ } diff --git a/templates/CRM/common/Navigation.tpl b/templates/CRM/common/Navigation.tpl index 5d1f678828..824c70ba2f 100644 --- a/templates/CRM/common/Navigation.tpl +++ b/templates/CRM/common/Navigation.tpl @@ -134,14 +134,22 @@ cj(function( ) { cj('#civicrm-menu').css({ 'width': '97%' }); } {/literal}{else}{* Special menu hacks for Joomla *}{literal} - cj('div#toolbar-box div.m').html(cj("#menu-container").html()); + // below div is present in older version of joomla 2.5.x + var elementExists = cj('div#toolbar-box div.m').length; + if ( elementExists > 0 ) { + cj('div#toolbar-box div.m').html(cj("#menu-container").html()); + } + else { + cj("#menu-container").show().css({'padding-bottom': '10px'}); + } + 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} + {/literal}{/if}{literal} cj('#civicrm-menu').menu( {arrowSrc: CRM.config.resourceBase + 'packages/jquery/css/images/arrow.png'} ); {/literal} -- 2.25.1