From: Dave Greenberg Date: Fri, 16 Aug 2013 22:37:21 +0000 (-0700) Subject: Set class to disabled for contact summary tabs which have 0 items in them. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6027131bf261fd63b7abb54ee8dc6162a85d2264;p=civicrm-core.git Set class to disabled for contact summary tabs which have 0 items in them. --- diff --git a/templates/CRM/Contact/Page/View/Summary.tpl b/templates/CRM/Contact/Page/View/Summary.tpl index 6e416f3b12..9acbbb36d2 100644 --- a/templates/CRM/Contact/Page/View/Summary.tpl +++ b/templates/CRM/Contact/Page/View/Summary.tpl @@ -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"); + } }); });