From: Coleman Watts Date: Fri, 28 Mar 2014 15:08:53 +0000 (-0400) Subject: CRM-14383 - Update cj closures X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3cc60a0626ba614a1f56f36e1d33769bd456ac54;p=civicrm-core.git CRM-14383 - Update cj closures --- diff --git a/CRM/Core/Region.php b/CRM/Core/Region.php index bc125a4281..c3b25ec0e5 100644 --- a/CRM/Core/Region.php +++ b/CRM/Core/Region.php @@ -175,7 +175,7 @@ class CRM_Core_Region { } break; case 'jquery': - $snippet['script'] = sprintf("cj(function(\$){\n%s\n});", $snippet['jquery']); + $snippet['script'] = sprintf("CRM.\$(function(\$) {\n%s\n});", $snippet['jquery']); // no break - continue processing as script case 'script': if (!$allowCmsOverride || !$cms->addScript($snippet['script'], $this->_name)) { diff --git a/js/AutoComplete.js b/js/AutoComplete.js index 8304d0e047..ee38992cf7 100644 --- a/js/AutoComplete.js +++ b/js/AutoComplete.js @@ -1,4 +1,4 @@ -cj(function ($) { +CRM.$(function($) { 'use strict'; // Behind the scenes method deals with browser for setting cursor position diff --git a/templates/CRM/Activity/Form/Activity.tpl b/templates/CRM/Activity/Form/Activity.tpl index 6b6c969e65..ace2049703 100644 --- a/templates/CRM/Activity/Form/Activity.tpl +++ b/templates/CRM/Activity/Form/Activity.tpl @@ -238,7 +238,7 @@ {literal} diff --git a/templates/CRM/Admin/Form/Preferences/Display.tpl b/templates/CRM/Admin/Form/Preferences/Display.tpl index 03ec78cb46..faf3b1c383 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.tpl +++ b/templates/CRM/Admin/Form/Preferences/Display.tpl @@ -227,7 +227,7 @@ {if $form.contact_edit_options.html} {literal} @@ -84,7 +84,7 @@ {* load selector when force *} {if $force and !$buildSelector} {literal} - cj( function( ) { + CRM.$(function($) { searchVoters( {/literal}'{$qfKey}'{literal} ); }); diff --git a/templates/CRM/Campaign/Form/Petition.tpl b/templates/CRM/Campaign/Form/Petition.tpl index 6865964bb7..cca8e77cb9 100644 --- a/templates/CRM/Campaign/Form/Petition.tpl +++ b/templates/CRM/Campaign/Form/Petition.tpl @@ -127,7 +127,7 @@ {literal} @@ -141,7 +141,7 @@ {literal} @@ -123,7 +123,7 @@ {literal} @@ -131,7 +131,7 @@ {literal} -{/literal} \ No newline at end of file +{/literal} diff --git a/templates/CRM/Case/Form/ActivityToCase.tpl b/templates/CRM/Case/Form/ActivityToCase.tpl index 74051eeeb9..8a2d232286 100644 --- a/templates/CRM/Case/Form/ActivityToCase.tpl +++ b/templates/CRM/Case/Form/ActivityToCase.tpl @@ -49,7 +49,7 @@ var target_contact_id = ''; var selectedCaseId = ''; var contactId = ''; - cj(function($) { + CRM.$(function($) { $('input[name=unclosed_case_id]', '#fileOnCaseDialog').select2({ placeholder: {/literal}'{ts escape="js"}- select case -{/ts}'{literal}, minimumInputLength: 1, diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index ca2ce8b39f..97be9a3255 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -182,7 +182,7 @@ diff --git a/templates/CRM/Case/Page/CustomDataView.tpl b/templates/CRM/Case/Page/CustomDataView.tpl index 672c30140a..8811ad8bfd 100644 --- a/templates/CRM/Case/Page/CustomDataView.tpl +++ b/templates/CRM/Case/Page/CustomDataView.tpl @@ -85,7 +85,7 @@ {literal} diff --git a/templates/CRM/Contact/Form/Contact.tpl b/templates/CRM/Contact/Form/Contact.tpl index e657a514ac..5748c2c2c2 100644 --- a/templates/CRM/Contact/Form/Contact.tpl +++ b/templates/CRM/Contact/Form/Contact.tpl @@ -107,7 +107,7 @@ {literal} diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl index 343404c40c..8c9152bc0d 100644 --- a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl @@ -129,7 +129,7 @@ {literal} diff --git a/templates/CRM/Contact/Form/Inline/Email.tpl b/templates/CRM/Contact/Form/Inline/Email.tpl index f8746ebba0..73fea94c00 100644 --- a/templates/CRM/Contact/Form/Inline/Email.tpl +++ b/templates/CRM/Contact/Form/Inline/Email.tpl @@ -67,7 +67,7 @@ {literal} diff --git a/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl b/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl index 2e68782354..6b32376c00 100644 --- a/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl +++ b/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl @@ -74,7 +74,7 @@ {$form.group_type.html} {literal} diff --git a/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl b/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl index b2f145ddbc..7d368b48dd 100644 --- a/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl @@ -151,7 +151,7 @@ {/if} {literal} diff --git a/templates/CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl b/templates/CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl index 66d7968a0d..72f710ca40 100644 --- a/templates/CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/ContributionAggregate.tpl @@ -143,7 +143,7 @@ {/if} {literal} diff --git a/templates/CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl b/templates/CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl index 264098614f..bb2c561830 100644 --- a/templates/CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl @@ -109,7 +109,7 @@ {/strip} {literal} diff --git a/templates/CRM/Contact/Form/Search/Custom/Proximity.tpl b/templates/CRM/Contact/Form/Search/Custom/Proximity.tpl index 9cd5204ff0..70eb60ae7c 100644 --- a/templates/CRM/Contact/Form/Search/Custom/Proximity.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/Proximity.tpl @@ -128,7 +128,7 @@ {/if} {literal} diff --git a/templates/CRM/Contact/Form/Search/ResultTasks.tpl b/templates/CRM/Contact/Form/Search/ResultTasks.tpl index e071650e1f..c6f9811868 100644 --- a/templates/CRM/Contact/Form/Search/ResultTasks.tpl +++ b/templates/CRM/Contact/Form/Search/ResultTasks.tpl @@ -94,7 +94,7 @@ {literal} diff --git a/templates/CRM/Contact/Form/Selector.tpl b/templates/CRM/Contact/Form/Selector.tpl index 814b205d19..a628a5c9cb 100644 --- a/templates/CRM/Contact/Form/Selector.tpl +++ b/templates/CRM/Contact/Form/Selector.tpl @@ -146,7 +146,7 @@ diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index a1be20b8a4..79f05effbf 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -347,7 +347,7 @@ {literal} diff --git a/templates/CRM/Contribute/Form/Search.tpl b/templates/CRM/Contribute/Form/Search.tpl index 983f993d19..5f10bdcd68 100644 --- a/templates/CRM/Contribute/Form/Search.tpl +++ b/templates/CRM/Contribute/Form/Search.tpl @@ -92,7 +92,7 @@ {/if} {literal} diff --git a/templates/CRM/Contribute/Form/SoftCredit.tpl b/templates/CRM/Contribute/Form/SoftCredit.tpl index b46baafc56..43ba52e2ca 100644 --- a/templates/CRM/Contribute/Form/SoftCredit.tpl +++ b/templates/CRM/Contribute/Form/SoftCredit.tpl @@ -66,7 +66,7 @@ {/if} {literal} diff --git a/templates/CRM/Event/Form/EventFees.tpl b/templates/CRM/Event/Form/EventFees.tpl index ea5b05a5e8..24dc555c03 100644 --- a/templates/CRM/Event/Form/EventFees.tpl +++ b/templates/CRM/Event/Form/EventFees.tpl @@ -204,7 +204,7 @@ {if $context eq 'standalone' and $outBound_option != 2 } diff --git a/templates/CRM/Event/Form/Search/Common.tpl b/templates/CRM/Event/Form/Search/Common.tpl index 5e8aa5563c..ca93d528f5 100644 --- a/templates/CRM/Event/Form/Search/Common.tpl +++ b/templates/CRM/Event/Form/Search/Common.tpl @@ -89,7 +89,7 @@ campaignTrClass='' campaignTdClass='crm-event-form-block-participant_campaign_id {literal} diff --git a/templates/CRM/Financial/Form/Search.tpl b/templates/CRM/Financial/Form/Search.tpl index 002c6863f9..5b6ff9a0d7 100644 --- a/templates/CRM/Financial/Form/Search.tpl +++ b/templates/CRM/Financial/Form/Search.tpl @@ -67,7 +67,7 @@ {include file="CRM/Form/validate.tpl"} {literal} diff --git a/templates/CRM/Form/attachmentjs.tpl b/templates/CRM/Form/attachmentjs.tpl index 75345c5813..f626b779ce 100644 --- a/templates/CRM/Form/attachmentjs.tpl +++ b/templates/CRM/Form/attachmentjs.tpl @@ -1,6 +1,6 @@ diff --git a/templates/CRM/Grant/Form/Search.tpl b/templates/CRM/Grant/Form/Search.tpl index 511f316b10..b2436d142b 100644 --- a/templates/CRM/Grant/Form/Search.tpl +++ b/templates/CRM/Grant/Form/Search.tpl @@ -72,7 +72,7 @@ {literal} diff --git a/templates/CRM/Group/Form/Search.tpl b/templates/CRM/Group/Form/Search.tpl index 312cc231da..1fe66e4672 100644 --- a/templates/CRM/Group/Form/Search.tpl +++ b/templates/CRM/Group/Form/Search.tpl @@ -91,7 +91,7 @@ {literal} diff --git a/templates/CRM/Mailing/Form/Count.tpl b/templates/CRM/Mailing/Form/Count.tpl index d19a35fa56..4be3523f5f 100644 --- a/templates/CRM/Mailing/Form/Count.tpl +++ b/templates/CRM/Mailing/Form/Count.tpl @@ -63,7 +63,7 @@ cj("#button").click(function(){ }); }); - cj( function( ) { + CRM.$(function($) { var count = 0; var columns=''; var sortColumn = ''; cj('#selectedRecords th').each( function( ) { diff --git a/templates/CRM/Mailing/Form/Group.tpl b/templates/CRM/Mailing/Form/Group.tpl index b1b9e751fc..6b19195da3 100644 --- a/templates/CRM/Mailing/Form/Group.tpl +++ b/templates/CRM/Mailing/Form/Group.tpl @@ -79,7 +79,7 @@ {literal} diff --git a/templates/CRM/Mailing/Form/InsertTokens.tpl b/templates/CRM/Mailing/Form/InsertTokens.tpl index 7cdb1ef592..2e86012178 100644 --- a/templates/CRM/Mailing/Form/InsertTokens.tpl +++ b/templates/CRM/Mailing/Form/InsertTokens.tpl @@ -242,7 +242,7 @@ if ( isMailing ) { {/literal} {if $editor eq "ckeditor"} {literal} - cj( function() { + CRM.$(function($) { oEditor = CKEDITOR.instances['html_message']; oEditor.BaseHref = '' ; oEditor.UserFilesPath = '' ; @@ -251,7 +251,7 @@ if ( isMailing ) { {/literal} {elseif $editor eq "tinymce"} {literal} - cj( function( ) { + CRM.$(function($) { if ( isMailing ) { cj('div.html').hover( function( ) { @@ -274,7 +274,7 @@ if ( isMailing ) { {/literal} {elseif $editor eq "drupalwysiwyg"} {literal} - cj( function( ) { + CRM.$(function($) { if ( isMailing ) { cj('div.html').hover( verify, @@ -287,7 +287,7 @@ if ( isMailing ) { {literal} } -cj(function($) { +CRM.$(function($) { function insertToken() { var token = $(this).val(), diff --git a/templates/CRM/Mailing/Form/Schedule.tpl b/templates/CRM/Mailing/Form/Schedule.tpl index 3688ed67f7..194856ae23 100644 --- a/templates/CRM/Mailing/Form/Schedule.tpl +++ b/templates/CRM/Mailing/Form/Schedule.tpl @@ -77,14 +77,14 @@ diff --git a/templates/CRM/Mailing/Page/Event.tpl b/templates/CRM/Mailing/Page/Event.tpl index 9b2e9a331a..d22463560d 100644 --- a/templates/CRM/Mailing/Page/Event.tpl +++ b/templates/CRM/Mailing/Page/Event.tpl @@ -71,7 +71,7 @@ {literal} diff --git a/templates/CRM/Member/Form/Task/Label.js b/templates/CRM/Member/Form/Task/Label.js index e5f6a3a0a8..a5a3f4c398 100644 --- a/templates/CRM/Member/Form/Task/Label.js +++ b/templates/CRM/Member/Form/Task/Label.js @@ -1,4 +1,4 @@ -cj(function ($) { +CRM.$(function($) { 'use strict'; $('#per_membership').click(function() { if($(this).is(":checked")) { diff --git a/templates/CRM/Pledge/Form/Pledge.tpl b/templates/CRM/Pledge/Form/Pledge.tpl index 832901ef1b..1837f7d304 100644 --- a/templates/CRM/Pledge/Form/Pledge.tpl +++ b/templates/CRM/Pledge/Form/Pledge.tpl @@ -202,7 +202,7 @@ function loadPanes( id ) { {literal} @@ -251,7 +251,7 @@ cj(function() { {/literal} {if $context eq 'standalone' and $outBound_option != 2 } {literal} - cj( function( ) { + CRM.$(function($) { cj("#contact_1").blur( function( ) { checkEmail( ); }); diff --git a/templates/CRM/Pledge/Form/Search.tpl b/templates/CRM/Pledge/Form/Search.tpl index 1ac3edba2c..8f208fa020 100644 --- a/templates/CRM/Pledge/Form/Search.tpl +++ b/templates/CRM/Pledge/Form/Search.tpl @@ -81,7 +81,7 @@ {/if} {literal} diff --git a/templates/CRM/Profile/Form/Search.tpl b/templates/CRM/Profile/Form/Search.tpl index cbf923e3b7..8735b8994d 100644 --- a/templates/CRM/Profile/Form/Search.tpl +++ b/templates/CRM/Profile/Form/Search.tpl @@ -143,7 +143,7 @@ {literal} @@ -164,7 +164,7 @@ {/if} {literal} diff --git a/templates/CRM/Report/Form/Fields.tpl b/templates/CRM/Report/Form/Fields.tpl index 7e5e0b7917..b21a32e83a 100644 --- a/templates/CRM/Report/Form/Fields.tpl +++ b/templates/CRM/Report/Form/Fields.tpl @@ -72,7 +72,7 @@ {literal} diff --git a/templates/CRM/Report/Form/Instance.tpl b/templates/CRM/Report/Form/Instance.tpl index 6b9d82e3c0..e4b638cf6d 100644 --- a/templates/CRM/Report/Form/Instance.tpl +++ b/templates/CRM/Report/Form/Instance.tpl @@ -122,7 +122,7 @@ cj(document).ready(function() { cj('#title').data('initial_value', cj('#title').val()); }); - cj( function(){ + CRM.$(function($) { var formName = {/literal}"{$form.formName}"{literal}; cj('#_qf_' + formName + '_submit_save').click ( function(){ diff --git a/templates/CRM/Report/Form/Layout/Graph.tpl b/templates/CRM/Report/Form/Layout/Graph.tpl index 45c0e948ef..c23920f0f2 100644 --- a/templates/CRM/Report/Form/Layout/Graph.tpl +++ b/templates/CRM/Report/Form/Layout/Graph.tpl @@ -47,7 +47,7 @@ {literal} diff --git a/templates/CRM/Report/Page/TemplateList.tpl b/templates/CRM/Report/Page/TemplateList.tpl index 176bd05af9..0b38e6de62 100644 --- a/templates/CRM/Report/Page/TemplateList.tpl +++ b/templates/CRM/Report/Page/TemplateList.tpl @@ -67,7 +67,7 @@ {literal} diff --git a/templates/CRM/SMS/Form/Group.tpl b/templates/CRM/SMS/Form/Group.tpl index 2c9dc96f33..8d7b69c10d 100644 --- a/templates/CRM/SMS/Form/Group.tpl +++ b/templates/CRM/SMS/Form/Group.tpl @@ -69,7 +69,7 @@ {literal} diff --git a/templates/CRM/SMS/Form/Schedule.tpl b/templates/CRM/SMS/Form/Schedule.tpl index 265bd58f12..f494d34cc5 100644 --- a/templates/CRM/SMS/Form/Schedule.tpl +++ b/templates/CRM/SMS/Form/Schedule.tpl @@ -74,14 +74,14 @@
diff --git a/templates/CRM/UF/Form/AdvanceSetting.tpl b/templates/CRM/UF/Form/AdvanceSetting.tpl index fb6b1312d9..f8a72de026 100644 --- a/templates/CRM/UF/Form/AdvanceSetting.tpl +++ b/templates/CRM/UF/Form/AdvanceSetting.tpl @@ -25,7 +25,7 @@ *} {literal} diff --git a/templates/CRM/UF/Form/Block.tpl b/templates/CRM/UF/Form/Block.tpl index 3c7a8b11b7..a7763289b6 100644 --- a/templates/CRM/UF/Form/Block.tpl +++ b/templates/CRM/UF/Form/Block.tpl @@ -173,7 +173,7 @@ {literal} diff --git a/templates/CRM/common/dashboard.tpl b/templates/CRM/common/dashboard.tpl index fdc8115098..b679183776 100644 --- a/templates/CRM/common/dashboard.tpl +++ b/templates/CRM/common/dashboard.tpl @@ -26,7 +26,7 @@ {literal} diff --git a/templates/CRM/common/highLightImport.tpl b/templates/CRM/common/highLightImport.tpl index 3aefdcd56d..5aebfb5e1c 100644 --- a/templates/CRM/common/highLightImport.tpl +++ b/templates/CRM/common/highLightImport.tpl @@ -25,7 +25,7 @@ *} {* Highlight the required field during import (included within a \n" . "\n" - . "\n" + . "\n" . "\n" . "\n" ; diff --git a/tools/extensions/org.civicrm.search.activity/templates/ActivitySearch.tpl b/tools/extensions/org.civicrm.search.activity/templates/ActivitySearch.tpl index 4c3391c55a..473ca8b47a 100644 --- a/tools/extensions/org.civicrm.search.activity/templates/ActivitySearch.tpl +++ b/tools/extensions/org.civicrm.search.activity/templates/ActivitySearch.tpl @@ -142,7 +142,7 @@ {/if} {literal}