From 10455c5f6262c70bddcd64311029e865010c88b2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 11 Apr 2014 17:52:27 -0400 Subject: [PATCH] HR-316 - Add crmRegion support to snippets and remove old div --- js/crm.designerapp.js | 2 +- templates/CRM/common/snippet.tpl | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/crm.designerapp.js b/js/crm.designerapp.js index d0a0c1aa33..840d98a8e9 100644 --- a/js/crm.designerapp.js +++ b/js/crm.designerapp.js @@ -16,7 +16,7 @@ * @see CRM-12188 */ CRM.designerApp.clearPreviewArea = function () { - $('.crm-profile-selector-preview-pane > .crm-container-snippet').each(function () { + $('.crm-profile-selector-preview-pane > *').each(function () { var parent = $(this).parent(); CRM.designerApp.DetachedProfiles.push({ parent: parent, diff --git a/templates/CRM/common/snippet.tpl b/templates/CRM/common/snippet.tpl index 90ac29a133..98e3686c74 100644 --- a/templates/CRM/common/snippet.tpl +++ b/templates/CRM/common/snippet.tpl @@ -37,10 +37,12 @@ {if $smarty.get.snippet eq 2} {include file="CRM/common/print.tpl"} {else} -
+ {crmRegion name='page-body'} - {* Display Status messages unless we are outputting json. *} + {* Add status messages and container-snippet div unless we are outputting json. *} {if $smarty.get.snippet neq 'json'} + {* this div is deprecated but included for older-style snippets for legacy support *} +
{include file="CRM/common/status.tpl"} {/if} @@ -51,7 +53,11 @@ {include file=$tplFile} {/if} -
{* end crm-container-snippet div *} + {if $smarty.get.snippet neq 'json'} +
+ {/if} + + {/crmRegion} {/if} {/if} {/strip} -- 2.25.1