From 18afc30cef13dd06cec8e1b1591a3b147913225b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 2 Jan 2015 21:14:42 -0500 Subject: [PATCH] CRM-15759 - Apply crmEditable behavior based on events instead of a template --- js/jquery/jquery.crmeditable.js | 4 ++++ templates/CRM/ACL/Page/ACL.tpl | 1 - templates/CRM/Admin/Page/ContactType.tpl | 1 - templates/CRM/Admin/Page/Extensions.tpl | 1 - templates/CRM/Admin/Page/Job.tpl | 1 - templates/CRM/Admin/Page/JobLog.tpl | 1 - templates/CRM/Admin/Page/LocationType.tpl | 1 - templates/CRM/Admin/Page/MessageTemplates.tpl | 1 - templates/CRM/Admin/Page/Options.tpl | 1 - templates/CRM/Admin/Page/ParticipantStatusType.tpl | 1 - templates/CRM/Admin/Page/PaymentProcessor.tpl | 1 - templates/CRM/Admin/Page/PaymentProcessorType.tpl | 1 - templates/CRM/Admin/Page/RelationshipType.tpl | 1 - templates/CRM/Admin/Page/Reminders.tpl | 1 - templates/CRM/Admin/Page/Tag.tpl | 1 - templates/CRM/Badge/Page/Layout.tpl | 1 - templates/CRM/Campaign/Form/Search/Campaign.tpl | 2 +- templates/CRM/Campaign/Form/Search/Petition.tpl | 2 +- templates/CRM/Campaign/Form/Search/Survey.tpl | 2 +- templates/CRM/Campaign/Page/Campaign.tpl | 1 - templates/CRM/Campaign/Page/Petition.tpl | 1 - templates/CRM/Campaign/Page/Survey.tpl | 1 - templates/CRM/Campaign/Page/SurveyType.tpl | 1 - templates/CRM/Contribute/Page/ContributionPage.tpl | 1 - templates/CRM/Contribute/Page/ContributionRecur.tpl | 1 - templates/CRM/Contribute/Page/ContributionType.tpl | 1 - templates/CRM/Contribute/Page/ManagePremiums.tpl | 1 - templates/CRM/Custom/Page/Field.tpl | 1 - templates/CRM/Custom/Page/Group.tpl | 1 - templates/CRM/Custom/Page/Option.tpl | 1 - templates/CRM/Event/Page/ManageEvent.tpl | 1 - templates/CRM/Financial/Form/Search.tpl | 1 + templates/CRM/Financial/Page/FinancialAccount.tpl | 1 - templates/CRM/Financial/Page/FinancialType.tpl | 1 - templates/CRM/Financial/Page/FinancialTypeAccount.tpl | 1 - templates/CRM/Group/Form/Search.tpl | 3 +-- templates/CRM/Mailing/Page/Component.tpl | 1 - templates/CRM/Member/Page/MembershipStatus.tpl | 1 - templates/CRM/Member/Page/MembershipType.tpl | 1 - templates/CRM/Price/Page/Field.tpl | 1 - templates/CRM/Price/Page/Option.tpl | 1 - templates/CRM/Price/Page/Set.tpl | 1 - templates/CRM/Report/Form.tpl | 1 - templates/CRM/Report/Page/Options.tpl | 1 - templates/CRM/SMS/Page/Provider.tpl | 1 - templates/CRM/UF/Page/Field.tpl | 1 - templates/CRM/UF/Page/Group.tpl | 1 - templates/CRM/common/crmeditable.tpl | 4 +++- 48 files changed, 12 insertions(+), 47 deletions(-) diff --git a/js/jquery/jquery.crmeditable.js b/js/jquery/jquery.crmeditable.js index 79f8d74515..ac87b2a999 100644 --- a/js/jquery/jquery.crmeditable.js +++ b/js/jquery/jquery.crmeditable.js @@ -226,4 +226,8 @@ }); }; + $(document).on('crmLoad', function(e) { + $('.crm-editable', e.target).crmEditable(); + }) + })(jQuery); diff --git a/templates/CRM/ACL/Page/ACL.tpl b/templates/CRM/ACL/Page/ACL.tpl index bb3f4f11a4..9f8b650a31 100644 --- a/templates/CRM/ACL/Page/ACL.tpl +++ b/templates/CRM/ACL/Page/ACL.tpl @@ -78,7 +78,6 @@ {/if} - {include file="CRM/common/crmeditable.tpl"} {else}
{ts}status{/ts} diff --git a/templates/CRM/Admin/Page/ContactType.tpl b/templates/CRM/Admin/Page/ContactType.tpl index 4011d337fb..8ee95e215e 100644 --- a/templates/CRM/Admin/Page/ContactType.tpl +++ b/templates/CRM/Admin/Page/ContactType.tpl @@ -35,7 +35,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} diff --git a/templates/CRM/Admin/Page/Extensions.tpl b/templates/CRM/Admin/Page/Extensions.tpl index 8589fb3db8..b986472756 100644 --- a/templates/CRM/Admin/Page/Extensions.tpl +++ b/templates/CRM/Admin/Page/Extensions.tpl @@ -40,7 +40,6 @@ {include file="CRM/Admin/Page/Extensions/About.tpl"} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
diff --git a/templates/CRM/Admin/Page/Job.tpl b/templates/CRM/Admin/Page/Job.tpl index a1f2f6a8f7..2cdad726b3 100644 --- a/templates/CRM/Admin/Page/Job.tpl +++ b/templates/CRM/Admin/Page/Job.tpl @@ -45,7 +45,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"}
diff --git a/templates/CRM/Admin/Page/JobLog.tpl b/templates/CRM/Admin/Page/JobLog.tpl index 568ee41712..76cdd9f3a0 100644 --- a/templates/CRM/Admin/Page/JobLog.tpl +++ b/templates/CRM/Admin/Page/JobLog.tpl @@ -40,7 +40,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"}
{ts}Name (Frequency)/Description{/ts}
diff --git a/templates/CRM/Admin/Page/LocationType.tpl b/templates/CRM/Admin/Page/LocationType.tpl index ea4f4c316c..311fb54039 100644 --- a/templates/CRM/Admin/Page/LocationType.tpl +++ b/templates/CRM/Admin/Page/LocationType.tpl @@ -35,7 +35,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{ts}Date{/ts}
diff --git a/templates/CRM/Admin/Page/MessageTemplates.tpl b/templates/CRM/Admin/Page/MessageTemplates.tpl index de06af1952..1f3032518a 100644 --- a/templates/CRM/Admin/Page/MessageTemplates.tpl +++ b/templates/CRM/Admin/Page/MessageTemplates.tpl @@ -98,7 +98,6 @@ {* create two selector tabs, first being the ‘user’ one, the second being the ‘workflow’ one *} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} {foreach from=$rows item=template_row key=type}
diff --git a/templates/CRM/Admin/Page/Options.tpl b/templates/CRM/Admin/Page/Options.tpl index 38ed85193b..715945d1b6 100644 --- a/templates/CRM/Admin/Page/Options.tpl +++ b/templates/CRM/Admin/Page/Options.tpl @@ -149,7 +149,6 @@ {/foreach}
- {include file="CRM/common/crmeditable.tpl"} {/strip}
diff --git a/templates/CRM/Admin/Page/ParticipantStatusType.tpl b/templates/CRM/Admin/Page/ParticipantStatusType.tpl index 9334e25bab..dcca544598 100644 --- a/templates/CRM/Admin/Page/ParticipantStatusType.tpl +++ b/templates/CRM/Admin/Page/ParticipantStatusType.tpl @@ -32,7 +32,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} diff --git a/templates/CRM/Admin/Page/PaymentProcessor.tpl b/templates/CRM/Admin/Page/PaymentProcessor.tpl index 14fec223b2..ae7d63b47f 100644 --- a/templates/CRM/Admin/Page/PaymentProcessor.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessor.tpl @@ -36,7 +36,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"}
{ts}Label{/ts}
diff --git a/templates/CRM/Admin/Page/PaymentProcessorType.tpl b/templates/CRM/Admin/Page/PaymentProcessorType.tpl index ec3e915fd2..4697f1280c 100644 --- a/templates/CRM/Admin/Page/PaymentProcessorType.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessorType.tpl @@ -37,7 +37,6 @@
{strip} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"}
{ts}Name{/ts}
diff --git a/templates/CRM/Admin/Page/RelationshipType.tpl b/templates/CRM/Admin/Page/RelationshipType.tpl index a1ba56c7bd..c7134402bd 100644 --- a/templates/CRM/Admin/Page/RelationshipType.tpl +++ b/templates/CRM/Admin/Page/RelationshipType.tpl @@ -45,7 +45,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
{ts}Name{/ts}
diff --git a/templates/CRM/Admin/Page/Reminders.tpl b/templates/CRM/Admin/Page/Reminders.tpl index 46317fef03..a3e42a9245 100755 --- a/templates/CRM/Admin/Page/Reminders.tpl +++ b/templates/CRM/Admin/Page/Reminders.tpl @@ -28,7 +28,6 @@ {strip} {if $rows and is_array($rows)} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"} {/if}
diff --git a/templates/CRM/Admin/Page/Tag.tpl b/templates/CRM/Admin/Page/Tag.tpl index 270b54f7ad..ebc155aca2 100644 --- a/templates/CRM/Admin/Page/Tag.tpl +++ b/templates/CRM/Admin/Page/Tag.tpl @@ -168,4 +168,3 @@ CRM.$(function($) { {/literal} {/if} -{include file="CRM/common/crmeditable.tpl"} diff --git a/templates/CRM/Badge/Page/Layout.tpl b/templates/CRM/Badge/Page/Layout.tpl index 30d1cdbe98..7a1592fa91 100644 --- a/templates/CRM/Badge/Page/Layout.tpl +++ b/templates/CRM/Badge/Page/Layout.tpl @@ -36,7 +36,6 @@ {strip} {* handle enable/disable actions*} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {include file="CRM/common/jsortable.tpl"}
diff --git a/templates/CRM/Campaign/Form/Search/Campaign.tpl b/templates/CRM/Campaign/Form/Search/Campaign.tpl index bec02ff2bd..7bb20d4e5a 100755 --- a/templates/CRM/Campaign/Form/Search/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Search/Campaign.tpl @@ -39,7 +39,6 @@ {* load campaign selector *} {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/crmeditable.tpl"} {literal} {/literal} -- 2.25.1