From: Coleman Watts Date: Mon, 16 Mar 2015 03:00:02 +0000 (-0400) Subject: CRM-16115 - Fix campaign datatable headers X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=85e10782c33da8215e8ebba75594088bdb32a96b;p=civicrm-core.git CRM-16115 - Fix campaign datatable headers --- 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');