From 85e10782c33da8215e8ebba75594088bdb32a96b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 15 Mar 2015 23:00:02 -0400 Subject: [PATCH] CRM-16115 - Fix campaign datatable headers --- templates/CRM/Campaign/Form/Search/Campaign.tpl | 15 ++++++++------- templates/CRM/Campaign/Form/Search/Petition.tpl | 6 +++++- templates/CRM/Campaign/Form/Search/Survey.tpl | 4 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/templates/CRM/Campaign/Form/Search/Campaign.tpl b/templates/CRM/Campaign/Form/Search/Campaign.tpl index fdda0c564a..9828a2b6f1 100755 --- a/templates/CRM/Campaign/Form/Search/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Search/Campaign.tpl @@ -192,14 +192,14 @@ "aoColumns": [ {sClass: 'crm-campaign-id hiddenElement' }, {sClass: 'crm-campaign-name hiddenElement' }, - {sClass: 'crmf-title crm-editable' }, - {sClass: 'crmf-description crm-editable' }, + {sClass: 'crmf-title' }, + {sClass: 'crmf-description' }, {sClass: 'crm-campaign-start_date' }, {sClass: 'crm-campaign-end_date' }, {sClass: 'crm-campaign-campaign-type_id hiddenElement' }, - {sClass: 'crmf-campaign_type_id crm-editable' }, + {sClass: 'crmf-campaign_type_id' }, {sClass: 'crm-campaign-campaign-status_id hiddenElement' }, - {sClass: 'crmf-status_id crm-editable' }, + {sClass: 'crmf-status_id' }, {sClass: 'crm-campaign-campaign-is_active hiddenElement' }, {sClass: 'crm-campaign-campaign-isAactive' }, {sClass: 'crm-campaign-action', bSortable: false} @@ -227,9 +227,10 @@ } // Crm-editable - $(nRow).children().eq(3).data('type', 'textarea'); - $(nRow).children().eq(7).data('type', 'select'); - $(nRow).children().eq(9).data('type', 'select'); + $(nRow).children().eq(2).addClass('crm-editable'); + $(nRow).children().eq(3).data('type', 'textarea').addClass('crm-editable'); + $(nRow).children().eq(7).data('type', 'select').addClass('crm-editable'); + $(nRow).children().eq(9).data({type: 'select', emptyOption: ''}).addClass('crm-editable'); return nRow; }, diff --git a/templates/CRM/Campaign/Form/Search/Petition.tpl b/templates/CRM/Campaign/Form/Search/Petition.tpl index cd0e32f6fc..df9cb7b5fc 100755 --- a/templates/CRM/Campaign/Form/Search/Petition.tpl +++ b/templates/CRM/Campaign/Form/Search/Petition.tpl @@ -179,7 +179,7 @@ function loadPetitionList( ) "aaSorting": [], "aoColumns":[ {sClass:'crm-petition-id hiddenElement' }, - {sClass:'crmf-title crm-editable' }, + {sClass:'crmf-title' }, {sClass:'crm-petition-campaign_id hiddenElement' }, {sClass:'crmf-campaign_id' }, {sClass:'crm-petition-activity_type_id hiddenElement' }, @@ -202,6 +202,10 @@ function loadPetitionList( ) CRM.$('.crm-editable').crmEditable(); }, "fnRowCallback": function( nRow, aData, iDisplayIndex ) { + + // Crm-editable + CRM.$(nRow).children().eq(1).addClass('crm-editable'); + //insert the id for each row for enable/disable. var rowId = 'survey-' + aData[0]; CRM.$(nRow).attr( 'id', rowId).addClass('crm-entity'); diff --git a/templates/CRM/Campaign/Form/Search/Survey.tpl b/templates/CRM/Campaign/Form/Search/Survey.tpl index 7740b3c652..6c40532f5b 100755 --- a/templates/CRM/Campaign/Form/Search/Survey.tpl +++ b/templates/CRM/Campaign/Form/Search/Survey.tpl @@ -188,7 +188,7 @@ function loadSurveyList( ) "bLengthChange": false, "aaSorting": [], "aoColumns":[{sClass:'crm-survey-id hiddenElement' }, - {sClass:'crmf-title crm-editable' }, + {sClass:'crmf-title' }, {sClass:'crm-survey-campaign_id hiddenElement' }, {sClass:'crm-survey-campaign' }, {sClass:'crm-survey-activity_type_id hiddenElement' }, @@ -216,6 +216,8 @@ function loadSurveyList( ) CRM.$('.crm-editable').crmEditable(); }, "fnRowCallback": function( nRow, aData, iDisplayIndex ) { + // Crm-editable + CRM.$(nRow).children().eq(1).addClass('crm-editable'); //insert the id for each row for enable/disable. var rowId = 'survey-' + aData[0]; CRM.$(nRow).attr( 'id', rowId).addClass('crm-entity'); -- 2.25.1