Set class to disabled for contact summary tabs which have 0 items in them.
authorDave Greenberg <dave@civicrm.org>
Fri, 16 Aug 2013 22:37:21 +0000 (15:37 -0700)
committerDave Greenberg <dave@civicrm.org>
Fri, 16 Aug 2013 22:37:21 +0000 (15:37 -0700)
templates/CRM/Contact/Page/View/Summary.tpl

index 6e416f3b12b6613fa0a6ddee6ec12e7d5164929b..9acbbb36d2b5f0c669ae5fd900c907205dd78c58 100644 (file)
@@ -346,6 +346,12 @@ cj(document).ready(function($) {
     ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
     saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
     reloadLabel: "{/literal}{ts escape='js'}Reload Page{/ts}{literal}"
+  });
+       //Enhance styling of "View Contact" tabs to indicate empty/non-empty tags
+  $('div#mainTabContainer ul').find('li').each(function(n){
+    if($(this).find('em').html()==0){
+      $(this).addClass("disabled");
+    }
   });
 });
 </script>