diff --git a/js/crm.designerapp.js b/js/crm.designerapp.js index 12559cde77ecec718fd910b16e35cced86c0e5a0..2b049a0c0f92ffb6df264ea4305bdc6506a1b206 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 > .crm-form-block').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._); diff --git a/js/crm.livePage.js b/js/crm.livePage.js index 48a327c479b85c1cdfd36cab5f2834b864de637d..819b58f804b9e3329ca1adf57913d856ffeaf957 100644 --- a/js/crm.livePage.js +++ b/js/crm.livePage.js @@ -1,6 +1,6 @@ // http://civicrm.org/licensing // Adds ajaxy behavior to a simple CiviCRM page -cj(function($) { +CRM.$(function($) { var active = 'a.button, a.action-item, a.crm-popup'; $('#crm-main-content-wrapper') // Widgetize the content area diff --git a/js/model/crm.profile-selector.js b/js/model/crm.profile-selector.js index f51aa4dc2b645f304105c90af860945dd02a0ee1..8a7d078bb3deb2a6895db925a661aff90b0fd4f6 100644 --- a/js/model/crm.profile-selector.js +++ b/js/model/crm.profile-selector.js @@ -1,5 +1,4 @@ -(function($) { - var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {}); +(function($, _) { if (!CRM.ProfileSelector) CRM.ProfileSelector = {}; CRM.ProfileSelector.DummyModel = CRM.Backbone.Model.extend({ @@ -7,4 +6,4 @@ profile_id: null } }); -})(cj); +})(CRM.$, CRM._); diff --git a/js/model/crm.schema.js b/js/model/crm.schema.js index 1f855845ace42687560b7800d67ef1472032edb4..ed880ca7f8f6b5ed4da064a2df66989532f3e767 100644 --- a/js/model/crm.schema.js +++ b/js/model/crm.schema.js @@ -1,5 +1,4 @@ -(function($) { - var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {}); +(function($, _) { if (!CRM.Schema) CRM.Schema = {}; /** @@ -49,4 +48,4 @@ initialize: function() { } }); -})(cj); \ No newline at end of file +})(CRM.$, CRM._);