Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-02-25-17-38-49
[civicrm-core.git] / js / jquery / jquery.crmProfileSelector.js
index e150277535074de3f3130e9a849d4c9ed1dce306..3c09e7f4608ed1382b8fd5122e7fad3f0eba4ea4 100644 (file)
     });
   };
 
-  // FIXME: this needs a better place to live
-  CRM.scanProfileSelectors = function() {
-    $('.crm-profile-selector').each(function(){
+  $('#crm-container').on('crmLoad', function() {
+    $('.crm-profile-selector:not(.rendered)', this).addClass('rendered').each(function() {
       $(this).crmProfileSelector({
         groupTypeFilter: $(this).attr('data-group-type'),
         entities: $(this).data('entities')
       });
     });
-  };
+  });
 
 })(cj);