1 (function ($, _
, Backbone
) {
4 * FIXME we depend on this being a global singleton, mainly to facilitate vents
7 * - resize: the size/position of widgets should be adjusted
8 * - ufUnsaved: any part of a UFGroup was changed; args: (is_changed:bool)
9 * - formOpened: a toggleable form (such as a UFFieldView or a UFGroupView) has been opened
11 CRM
.designerApp
= new Backbone
.Marionette
.Application();
14 * FIXME: Workaround for problem that having more than one instance
15 * of a profile on the page will result in duplicate DOM ids.
18 CRM
.designerApp
.clearPreviewArea = function () {
19 $('.crm-profile-selector-preview-pane > *').each(function () {
20 var parent
= $(this).parent();
21 CRM
.designerApp
.DetachedProfiles
.push({
23 item
: $(this).detach()
27 CRM
.designerApp
.restorePreviewArea = function () {
28 $.each(CRM
.designerApp
.DetachedProfiles
, function () {
29 $(this.parent
).append(this.item
);
33 })(CRM
.$, CRM
._
, CRM
.BB
);