Contact summary tabs - simplify styling
authorColeman Watts <coleman@civicrm.org>
Sat, 28 Dec 2013 05:39:34 +0000 (21:39 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 6 Jan 2014 19:11:39 +0000 (11:11 -0800)
css/civicrm.css
templates/CRM/Contact/Page/View/Summary.tpl
templates/CRM/Tag/Form/Tag.tpl
templates/CRM/common/TabHeader.tpl

index 3e112c955988886f08769ae1e73d9307c52d9cdf..d5ae236bf966d95fe4c01b7a3d458b2fabfad76f 100644 (file)
@@ -3592,7 +3592,8 @@ tbody.scrollContent tr.alternateRow {
 #mainTabContainer li.disabled {
   text-decoration: none;
 }
-#mainTabContainer li.disabled a:link {
+#mainTabContainer li.disabled a.ui-tabs-anchor,
+#mainTabContainer li.crm-count-0 a.ui-tabs-anchor {
   color: #999999 !important;
 }
 #crm-container tr.crm-job {
index 48cc955d0799950746bfdcdae6da07c49f2863df..0225cb63728ed7a4369792611eb3af17e9d3e5ab 100644 (file)
 {* CRM-10560 *}
 {literal}
 <script type="text/javascript">
-cj(document).ready(function($) {
+cj(function($) {
   $('.crm-inline-edit-container').crmFormContactLock({
     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>
 {/literal}
index 9905ae8946a11beb5ea5e17e3488c462673ca810..4a8e70fef0d7d228fb7e019cf196603af41fd31d 100644 (file)
@@ -73,7 +73,9 @@
       });
       // showing count of tags in summary tab
       $('a em', $tab).html('' + tags.length);
-      tags.length ? $tab.removeClass('disabled') : $tab.addClass('disabled');
+      $tab
+        .removeClass($tab.attr('class').match(/(crm-count-\d+)/)[0])
+        .addClass('crm-count-' + tags.length);
       // update summary tab
       $("#tags").html(tags.join(', '));
     };
index 353748da812de63ced6e0ef1a45ac240ffe828a4..93d9f898ec6f35c84c8eaa2a59dc44fa0948b181 100644 (file)
  +--------------------------------------------------------------------+
 *}
 
-{* enclosed all tabs and its content in a block *}
 {* include wysiwyg related files*}
 {include file="CRM/common/wysiwyg.tpl" includeWysiwygEditor=true}
 
+{* enclose all tabs and its content in a block *}
 <div class="crm-block crm-content-block">
   {if $tabHeader and count($tabHeader) gt 1}
     <div id="mainTabContainer">