worked on CRM-12096, fixed the missing navigation menu on joomla 3.x
authorkurund <kurund@civicrm.org>
Sat, 13 Apr 2013 22:51:49 +0000 (04:21 +0530)
committerkurund <kurund@civicrm.org>
Sat, 13 Apr 2013 22:51:49 +0000 (04:21 +0530)
----------------------------------------
* CRM-12096:
  http://issues.civicrm.org/jira/browse/CRM-12096

css/joomla.css
templates/CRM/common/Navigation.tpl

index e0c8c3b1f19eefed6c1665af9bc88b016f6a8c21..9e2de449251a7526398d8cad178309650350a37d 100644 (file)
@@ -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 */
 }
 
index 5d1f6788285c6e8cb8ed07b226510b5f8caf0ab9..824c70ba2f606586c01bdbff6b7fad0685e35b7c 100644 (file)
@@ -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'} );
 </script>
 {/literal}