From b633f8bd8dbc40bd128cb0c8f80cf025fa840098 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 2 Jan 2015 10:26:08 -0500 Subject: [PATCH] CRM-15759 - Extend in-place editing to more places --- templates/CRM/Admin/Page/LocationType.tpl | 4 +- templates/CRM/Admin/Page/OptionGroup.tpl | 1 - .../CRM/Admin/Page/ParticipantStatusType.tpl | 16 ++--- templates/CRM/Admin/Page/PaymentProcessor.tpl | 12 ++-- .../CRM/Campaign/Form/Search/Campaign.tpl | 67 ++++++++++--------- .../CRM/Campaign/Form/Search/Petition.tpl | 27 ++++---- templates/CRM/Campaign/Form/Search/Survey.tpl | 6 +- templates/CRM/Custom/Page/Field.tpl | 10 +-- templates/CRM/Custom/Page/Group.tpl | 2 +- templates/CRM/Custom/Page/Option.tpl | 10 +-- .../CRM/Financial/Page/FinancialType.tpl | 4 +- templates/CRM/Group/Form/Search.tpl | 7 +- .../CRM/Member/Page/MembershipStatus.tpl | 20 +++--- templates/CRM/Member/Page/MembershipType.tpl | 22 +++--- templates/CRM/Price/Page/Field.tpl | 2 +- templates/CRM/Price/Page/Set.tpl | 8 +-- templates/CRM/Report/Page/Options.tpl | 2 +- templates/CRM/UF/Page/Field.tpl | 10 +-- templates/CRM/UF/Page/Group.tpl | 4 +- 19 files changed, 121 insertions(+), 113 deletions(-) diff --git a/templates/CRM/Admin/Page/LocationType.tpl b/templates/CRM/Admin/Page/LocationType.tpl index 424e9dd3a1..ea4f4c316c 100644 --- a/templates/CRM/Admin/Page/LocationType.tpl +++ b/templates/CRM/Admin/Page/LocationType.tpl @@ -53,7 +53,7 @@ {$row.name} {$row.display_name} - {$row.vcard_name} + {$row.vcard_name} {$row.description} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_default eq 1}{ts}Default{/ts}{/if}  @@ -70,7 +70,7 @@ {/if} {/if} diff --git a/templates/CRM/Admin/Page/OptionGroup.tpl b/templates/CRM/Admin/Page/OptionGroup.tpl index 18f87fc3a1..be42f110b1 100644 --- a/templates/CRM/Admin/Page/OptionGroup.tpl +++ b/templates/CRM/Admin/Page/OptionGroup.tpl @@ -39,7 +39,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/ParticipantStatusType.tpl b/templates/CRM/Admin/Page/ParticipantStatusType.tpl index 23394b2213..9334e25bab 100644 --- a/templates/CRM/Admin/Page/ParticipantStatusType.tpl +++ b/templates/CRM/Admin/Page/ParticipantStatusType.tpl @@ -47,14 +47,14 @@ {foreach from=$rows item=row} - - - - - - - - + + + + + + + + {/foreach} diff --git a/templates/CRM/Admin/Page/PaymentProcessor.tpl b/templates/CRM/Admin/Page/PaymentProcessor.tpl index 754d20c826..14fec223b2 100644 --- a/templates/CRM/Admin/Page/PaymentProcessor.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessor.tpl @@ -49,12 +49,12 @@ {foreach from=$rows item=row} - - - - - - + + + + + + {/foreach} diff --git a/templates/CRM/Campaign/Form/Search/Campaign.tpl b/templates/CRM/Campaign/Form/Search/Campaign.tpl index 94c29e95f7..bec02ff2bd 100755 --- a/templates/CRM/Campaign/Form/Search/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Search/Campaign.tpl @@ -140,20 +140,9 @@ {literal} {/literal} diff --git a/templates/CRM/Campaign/Form/Search/Petition.tpl b/templates/CRM/Campaign/Form/Search/Petition.tpl index 67a9fe7f41..329ceae333 100755 --- a/templates/CRM/Campaign/Form/Search/Petition.tpl +++ b/templates/CRM/Campaign/Form/Search/Petition.tpl @@ -178,17 +178,18 @@ function loadPetitionList( ) "bProcessing": false, "bLengthChange": false, "aaSorting": [], - "aoColumns":[{sClass:'crm-petition-id hiddenElement' }, - {sClass:'crm-petition-title' }, - {sClass:'crm-petition-campaign_id hiddenElement' }, - {sClass:'crm-petition-campaign' }, - {sClass:'crm-petition-activity_type_id hiddenElement' }, - {sClass:'crm-petition-activity_type hiddenElement' }, - {sClass:'crm-petition-is_default' }, - {sClass:'crm-petition-is_active hiddenElement' }, - {sClass:'crm-petition-isActive' }, - {sClass:'crm-petition-action', bSortable:false} - ], + "aoColumns":[ + {sClass:'crm-petition-id hiddenElement' }, + {sClass:'crmf-title crm-editable' }, + {sClass:'crm-petition-campaign_id hiddenElement' }, + {sClass:'crmf-campaign_id' }, + {sClass:'crm-petition-activity_type_id hiddenElement' }, + {sClass:'crm-petition-activity_type hiddenElement' }, + {sClass:'crm-petition-is_default' }, + {sClass:'crm-petition-is_active hiddenElement' }, + {sClass:'crm-petition-isActive' }, + {sClass:'crm-petition-action', bSortable:false} + ], "sPaginationType": "full_numbers", "sDom" : 'rt<"crm-datatable-pager-bottom"ip>', "bServerSide": true, @@ -197,7 +198,9 @@ function loadPetitionList( ) "asStripClasses" : [ "odd-row", "even-row" ], "oLanguage":{"sEmptyTable" : noRecordFoundMsg, "sZeroRecords" : noRecordFoundMsg }, - "fnDrawCallback": function() { CRM.$().crmtooltip(); }, + "fnDrawCallback": function() { + CRM.$('.crm-editable').crmEditable(); + }, "fnRowCallback": function( nRow, aData, iDisplayIndex ) { //insert the id for each row for enable/disable. var rowId = 'survey-' + aData[0]; diff --git a/templates/CRM/Campaign/Form/Search/Survey.tpl b/templates/CRM/Campaign/Form/Search/Survey.tpl index 8c9b32209d..484b400d5e 100755 --- a/templates/CRM/Campaign/Form/Search/Survey.tpl +++ b/templates/CRM/Campaign/Form/Search/Survey.tpl @@ -189,7 +189,7 @@ function loadSurveyList( ) "bLengthChange": false, "aaSorting": [], "aoColumns":[{sClass:'crm-survey-id hiddenElement' }, - {sClass:'crm-survey-title' }, + {sClass:'crmf-title crm-editable' }, {sClass:'crm-survey-campaign_id hiddenElement' }, {sClass:'crm-survey-campaign' }, {sClass:'crm-survey-activity_type_id hiddenElement' }, @@ -212,7 +212,9 @@ function loadSurveyList( ) "asStripClasses" : [ "odd-row", "even-row" ], "oLanguage":{"sEmptyTable" : noRecordFoundMsg, "sZeroRecords" : noRecordFoundMsg }, - "fnDrawCallback": function() { CRM.$().crmtooltip(); }, + "fnDrawCallback": function() { + CRM.$('.crm-editable').crmEditable(); + }, "fnRowCallback": function( nRow, aData, iDisplayIndex ) { //insert the id for each row for enable/disable. var rowId = 'survey-' + aData[0]; diff --git a/templates/CRM/Custom/Page/Field.tpl b/templates/CRM/Custom/Page/Field.tpl index 33fd40d562..42181e1029 100644 --- a/templates/CRM/Custom/Page/Field.tpl +++ b/templates/CRM/Custom/Page/Field.tpl @@ -51,14 +51,14 @@ {foreach from=$customField item=row} - - + + - - - + + + {/foreach} diff --git a/templates/CRM/Custom/Page/Group.tpl b/templates/CRM/Custom/Page/Group.tpl index 3e17c5b227..79e1537075 100644 --- a/templates/CRM/Custom/Page/Group.tpl +++ b/templates/CRM/Custom/Page/Group.tpl @@ -57,7 +57,7 @@ {foreach from=$rows item=row} - + diff --git a/templates/CRM/Custom/Page/Option.tpl b/templates/CRM/Custom/Page/Option.tpl index ac974cba43..a519726585 100644 --- a/templates/CRM/Custom/Page/Option.tpl +++ b/templates/CRM/Custom/Page/Option.tpl @@ -50,10 +50,10 @@ {foreach from=$customOption item=row key=id} - - - - + + + + @@ -63,7 +63,7 @@ {/strip} diff --git a/templates/CRM/Financial/Page/FinancialType.tpl b/templates/CRM/Financial/Page/FinancialType.tpl index 10db43e545..7e87ffd29f 100644 --- a/templates/CRM/Financial/Page/FinancialType.tpl +++ b/templates/CRM/Financial/Page/FinancialType.tpl @@ -56,8 +56,8 @@ - - + + diff --git a/templates/CRM/Group/Form/Search.tpl b/templates/CRM/Group/Form/Search.tpl index bded6047f5..4a9233fd3d 100644 --- a/templates/CRM/Group/Form/Search.tpl +++ b/templates/CRM/Group/Form/Search.tpl @@ -178,7 +178,8 @@ CRM.$(function($) { $(nRow).addClass(cl).attr({id: 'row_' + id, 'data-id': id, 'data-entity': 'group'}); $('td:eq(0)', nRow).wrapInner(''); $('td:eq(1)', nRow).addClass('right'); - $('td:eq(3)', nRow).wrapInner(''); + $('td:eq(3)', nRow).wrapInner('
'); + $('td:eq(5)', nRow).wrapInner('
'); if (parentsOnly) { if ($(nRow).hasClass('crm-group-parent')) { $(nRow).find('td:first').prepend('{/literal}{literal}'); @@ -295,9 +296,9 @@ CRM.$(function($) { } appendHTML += '
"; appendHTML += ""; - appendHTML += '"; + appendHTML += '"; appendHTML += ""; - appendHTML += ""; + appendHTML += '"; if (showOrgInfo) { appendHTML += ""; } diff --git a/templates/CRM/Member/Page/MembershipStatus.tpl b/templates/CRM/Member/Page/MembershipStatus.tpl index 408c10ff8f..f30d3b3ad3 100644 --- a/templates/CRM/Member/Page/MembershipStatus.tpl +++ b/templates/CRM/Member/Page/MembershipStatus.tpl @@ -47,19 +47,19 @@ - - + + {foreach from=$rows item=row} - - - - - - - - + + + + + + + + {/foreach} diff --git a/templates/CRM/Member/Page/MembershipType.tpl b/templates/CRM/Member/Page/MembershipType.tpl index 17cb60ad73..ebd06686f1 100644 --- a/templates/CRM/Member/Page/MembershipType.tpl +++ b/templates/CRM/Member/Page/MembershipType.tpl @@ -55,17 +55,17 @@ {foreach from=$rows item=row} - - - - - - - - - - - + + + + + + + + + + + {/foreach} diff --git a/templates/CRM/Price/Page/Field.tpl b/templates/CRM/Price/Page/Field.tpl index 6533b9f92d..03542ce814 100644 --- a/templates/CRM/Price/Page/Field.tpl +++ b/templates/CRM/Price/Page/Field.tpl @@ -77,7 +77,7 @@ - + diff --git a/templates/CRM/Price/Page/Set.tpl b/templates/CRM/Price/Page/Set.tpl index 6f278218a6..21292be06e 100644 --- a/templates/CRM/Price/Page/Set.tpl +++ b/templates/CRM/Price/Page/Set.tpl @@ -67,10 +67,10 @@ {foreach from=$rows item=row} - - - - + + + + {/foreach}
{ts}Title{/ts}
{$row.label}{$row.name} ({$row.id}){$row.class}{if $row.is_reserved}{ts}Reserved{/ts}{/if}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_counted} {ts}Counted{/ts}{/if}{$row.weight}{$row.visibility}{$row.label}{$row.name} ({$row.id}){$row.class}{if $row.is_reserved}{ts}Reserved{/ts}{/if}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_counted} {ts}Counted{/ts}{/if}{$row.weight}{$row.visibility} {$row.action|replace:'xx':$row.id}
{$row.name}{$row.payment_processor_type}{$row.description}{$row.financialAccount}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_default eq 1}{ts}Default{/ts}{/if} {$row.name}{$row.payment_processor_type}{$row.description}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_default eq 1}{ts}Default{/ts}{/if}  {$row.action|replace:'xx':$row.id}
{$row.label}
{$row.label} {$row.data_type} {$row.html_type} {$row.weight}{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id}
{$row.title}{$row.title} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if} {$row.extends_entity_column_value} 
{$row.label}{$row.value}{$row.default_value}
{$row.label}{$row.value}{$row.default_value} {$row.weight} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$id}
{$row.name} {$row.description}{$row.financial_account}{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.financial_account}{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id}' + val.count + "" + val.created_by + "' + (val.group_description || '') + "' + (val.group_description || '') + "" + val.group_type + "" + val.visibility + "' + val.visibility + "" + val.org_info + "{ts}End Event{/ts} {ts}Member{/ts} {ts}Admin{/ts}{ts}Weight{/ts}{ts}Enabled?{/ts}{ts}Order{/ts}{ts}Reserved?{/ts}
{$row.label}{$row.start_event}{$row.end_event}{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_admin eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.weight}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}
{$row.label}{$row.start_event}{$row.end_event}{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_admin eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.weight}{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id}
{$row.name}{$row.period_type}{$row.fixed_period_start_day}{$row.minimum_fee|crmMoney}{$row.duration_interval} {$row.duration_unit}{if $row.auto_renew EQ 2}{ts}Required{/ts}{elseif $row.auto_renew EQ 1}{ts}Optional{/ts}{else}{ts}No{/ts}{/if}{$row.relationshipTypeName}{$row.visibility}{$row.weight}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.name}{$row.period_type}{$row.fixed_period_start_day}{$row.minimum_fee|crmMoney}{$row.duration_interval} {$row.duration_unit}{if $row.auto_renew EQ 2}{ts}Required{/ts}{elseif $row.auto_renew EQ 1}{ts}Optional{/ts}{else}{ts}No{/ts}{/if}{$row.relationshipTypeName}{$row.visibility}{$row.weight}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id}
{$row.label} {$row.html_type_display} {$row.weight}{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.active_on}{$row.active_on|date_format:"%Y-%m-%d %T"}{/if} {if $row.expire_on}{$row.expire_on|date_format:"%Y-%m-%d %T"}{/if}
{$row.title}{$row.extends}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.action|replace:'xx':$row.id}{$row.title}{$row.extends}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.action|replace:'xx':$row.id}
diff --git a/templates/CRM/Report/Page/Options.tpl b/templates/CRM/Report/Page/Options.tpl index 4efd1cab00..8d4a5bd45e 100644 --- a/templates/CRM/Report/Page/Options.tpl +++ b/templates/CRM/Report/Page/Options.tpl @@ -65,7 +65,7 @@ {$row.default_value} {/if} {if $row.is_reserved eq 1}{ts}Yes{/ts} {else} {ts}No{/ts} {/if} - {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} + {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.component_name} {$row.action} diff --git a/templates/CRM/UF/Page/Field.tpl b/templates/CRM/UF/Page/Field.tpl index c7d4bb7837..4ae3954a82 100644 --- a/templates/CRM/UF/Page/Field.tpl +++ b/templates/CRM/UF/Page/Field.tpl @@ -65,13 +65,13 @@ {$row.label}({$row.field_type}) {if in_array("Profile",$otherModules) or in_array("Search Profile",$otherModules) } - {$row.visibility_display} - {if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} - {if $row.in_selector eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} + {$row.visibility_display} + {if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} + {if $row.in_selector eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {/if} {$row.weight} - {if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} - {if $row.is_view eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} + {if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} + {if $row.is_view eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {$row.action|replace:'xx':$row.id} diff --git a/templates/CRM/UF/Page/Group.tpl b/templates/CRM/UF/Page/Group.tpl index e00c341a61..70fa31afb5 100644 --- a/templates/CRM/UF/Page/Group.tpl +++ b/templates/CRM/UF/Page/Group.tpl @@ -85,13 +85,13 @@ {foreach from=$rows item=row} {if !$row.is_reserved } - {$row.title} + {$row.title} {if $row.created_id && $row.created_by} {ts}{$row.created_by}{/ts} {/if} - {$row.description} + {$row.description} {$row.group_type} {$row.id} {$row.module} -- 2.25.1