Merge pull request #2613 from colemanw/employer
[civicrm-core.git] / templates / CRM / common / customData.tpl
index e203162dd8093906cb50d32255814542835fb37f..1764975b1a6fe40101600c6e4be6230fc2d58729 100644 (file)
@@ -29,9 +29,7 @@
 {/if}
 {literal}
 <script type="text/javascript">
-var CRM = CRM || {};
-CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMultiple )
-{
+CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMultiple ) {
   var dataUrl = {/literal}"{crmURL p=$urlPath h=0 q='snippet=4&type='}"{literal} + type;
 
   if ( subType ) {
@@ -113,7 +111,7 @@ CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMult
           storage[id] = cj(this).detach();
         }
       });
-      target.html(response);
+      target.html(response).trigger('crmLoad');
       target.children().each(function() {
         var id = cj(this).attr('id');
         if (id && storage[id]) {