X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fcrm.designerapp.js;h=840d98a8e9b753d6119a00bc5cfbb994045ab8e9;hb=88c6259e813c523210e799e874ece50131ebe6d7;hp=12559cde77ecec718fd910b16e35cced86c0e5a0;hpb=52df19870805bf5a2bae2388a1f6c5a0309c2d92;p=civicrm-core.git diff --git a/js/crm.designerapp.js b/js/crm.designerapp.js index 12559cde77..840d98a8e9 100644 --- a/js/crm.designerapp.js +++ b/js/crm.designerapp.js @@ -1,31 +1,33 @@ -cj(function($) { - /** - * FIXME we depend on this being a global singleton, mainly to facilitate vents - * - * vents: - * - resize: the size/position of widgets should be adjusted - * - ufUnsaved: any part of a UFGroup was changed; args: (is_changed:bool) - * - formOpened: a toggleable form (such as a UFFieldView or a UFGroupView) has been opened - */ - CRM.designerApp = new Backbone.Marionette.Application(); +(function ($, _) { + $(function () { + /** + * FIXME we depend on this being a global singleton, mainly to facilitate vents + * + * vents: + * - resize: the size/position of widgets should be adjusted + * - ufUnsaved: any part of a UFGroup was changed; args: (is_changed:bool) + * - formOpened: a toggleable form (such as a UFFieldView or a UFGroupView) has been opened + */ + CRM.designerApp = new Backbone.Marionette.Application(); - /** - * FIXME: Workaround for problem that having more than one instance - * of a profile on the page will result in duplicate DOM ids. - * @see CRM-12188 - */ - CRM.designerApp.clearPreviewArea = function() { - $('.crm-profile-selector-preview-pane > .crm-form-block').each(function() { - var parent = $(this).parent(); - CRM.designerApp.DetachedProfiles.push({ - parent: parent, - item: $(this).detach() + /** + * FIXME: Workaround for problem that having more than one instance + * of a profile on the page will result in duplicate DOM ids. + * @see CRM-12188 + */ + CRM.designerApp.clearPreviewArea = function () { + $('.crm-profile-selector-preview-pane > *').each(function () { + var parent = $(this).parent(); + CRM.designerApp.DetachedProfiles.push({ + parent: parent, + item: $(this).detach() + }); }); - }); - }; - CRM.designerApp.restorePreviewArea = function() { - $.each(CRM.designerApp.DetachedProfiles, function() { - $(this.parent).append(this.item); - }); - }; -}); + }; + CRM.designerApp.restorePreviewArea = function () { + $.each(CRM.designerApp.DetachedProfiles, function () { + $(this.parent).append(this.item); + }); + }; + }); +})(CRM.$, CRM._);