Skip to content
Snippets Groups Projects
Commit a07afa53 authored by colemanw's avatar colemanw
Browse files

Contact summary tabs - simplify styling

parent cc7ca4a7
No related branches found
No related tags found
No related merge requests found
...@@ -3592,7 +3592,8 @@ tbody.scrollContent tr.alternateRow { ...@@ -3592,7 +3592,8 @@ tbody.scrollContent tr.alternateRow {
#mainTabContainer li.disabled { #mainTabContainer li.disabled {
text-decoration: none; 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; color: #999999 !important;
} }
#crm-container tr.crm-job { #crm-container tr.crm-job {
......
...@@ -356,18 +356,12 @@ ...@@ -356,18 +356,12 @@
{* CRM-10560 *} {* CRM-10560 *}
{literal} {literal}
<script type="text/javascript"> <script type="text/javascript">
cj(document).ready(function($) { cj(function($) {
$('.crm-inline-edit-container').crmFormContactLock({ $('.crm-inline-edit-container').crmFormContactLock({
ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}", ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}", saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
reloadLabel: "{/literal}{ts escape='js'}Reload Page{/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> </script>
{/literal} {/literal}
......
...@@ -73,7 +73,9 @@ ...@@ -73,7 +73,9 @@
}); });
// showing count of tags in summary tab // showing count of tags in summary tab
$('a em', $tab).html('' + tags.length); $('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 // update summary tab
$("#tags").html(tags.join(', ')); $("#tags").html(tags.join(', '));
}; };
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
+--------------------------------------------------------------------+ +--------------------------------------------------------------------+
*} *}
{* enclosed all tabs and its content in a block *}
{* include wysiwyg related files*} {* include wysiwyg related files*}
{include file="CRM/common/wysiwyg.tpl" includeWysiwygEditor=true} {include file="CRM/common/wysiwyg.tpl" includeWysiwygEditor=true}
{* enclose all tabs and its content in a block *}
<div class="crm-block crm-content-block"> <div class="crm-block crm-content-block">
{if $tabHeader and count($tabHeader) gt 1} {if $tabHeader and count($tabHeader) gt 1}
<div id="mainTabContainer"> <div id="mainTabContainer">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment