I have written some jquery (inside an extra template file) that does some simple show/hiding of custom fields in an activity based on user selections. We use it as a helpful tool for users to select the right options (i.e. Do you own a pet? If they indicate "yes" then the Pet Name field is shown.)
This is currently working in 4.6.8 (Drupal 7) but in my test upgrade to 5.5.3 the jQuery targets aren't affecting the custom data sets. For instance, I can try targeting something generic like '.crm-container .crm-accordion-header'
and for testing purposes turn it blue. This affects the headers for the core sections (attachments, send a copy, send a follow up) but the headers for my custom data remain unaffected.
Is there a fundamental change in how/when the custom fields are loaded that the jQuery isn't able to affect it?
EDIT: I have also tried adding the javascript straight into a template file (no "extra") in the overrides folder, still custom fields are unaffected. I also placed javascript directly in the main template file, not in the overrides folder - still custom fields are not affected.
{literal}
<script type="text/javascript">
CRM.$(function($) {
$(document).ready(function () {
// First, get the Activity ID.
var acttype = {/literal}{$atype}{literal}
if(acttype === 75){
$('.crm-container .crm-accordion-header').css('background-color', 'blue');
}
});
});
</script>
{/literal}