From b99924ad8cff36b40a0688b5f8df1b11e1c4bf33 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 15 Aug 2014 16:09:20 +0100 Subject: [PATCH] Contact summary group tab - Smart group layout and code cleanup --- templates/CRM/Contact/Page/View/GroupContact.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Contact/Page/View/GroupContact.tpl b/templates/CRM/Contact/Page/View/GroupContact.tpl index e4659dde32..1f2b1b8e2f 100644 --- a/templates/CRM/Contact/Page/View/GroupContact.tpl +++ b/templates/CRM/Contact/Page/View/GroupContact.tpl @@ -76,6 +76,7 @@ {/if} {if $contactSmartGroupSettings neq 3} +
@@ -83,7 +84,7 @@
-
+
@@ -172,11 +173,10 @@ CRM.$(function($) { // load panes function calls for snippet based on id of crm-accordion-header function loadPanes() { - var id = $(this).attr('id'); + var $el = $(this).parent().find('div.crm-contact_smartgroup'); var contactId = $(this).attr('contact_id'); - if (!$('div.' + id).html()) { - var loading = '{/literal}{ts escape='js'}loading{/ts}{literal} {/literal}{ts escape='js'}Loading{/ts}{literal}...'; - $('div.' + id).html(loading).load(CRM.url('civicrm/contact/view/smartgroup', {snippet: 4, cid: contactId})); + if (!$el.html()) { + CRM.loadPage(CRM.url('civicrm/contact/view/smartgroup', {cid: contactId}), {target: $el}); } } // bind first click of accordion header to load crm-accordion-body with snippet -- 2.25.1