CRM-16115 - Fix campaign datatable headers
authorColeman Watts <coleman@civicrm.org>
Mon, 16 Mar 2015 03:00:02 +0000 (23:00 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 16 Mar 2015 03:00:02 +0000 (23:00 -0400)
templates/CRM/Campaign/Form/Search/Campaign.tpl
templates/CRM/Campaign/Form/Search/Petition.tpl
templates/CRM/Campaign/Form/Search/Survey.tpl

index fdda0c564a593023c550991de5202b6cbb596216..9828a2b6f1c5b3f3336030dd676e8f2386ea06b8 100755 (executable)
       "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}
         }
 
         // 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;
       },
index cd0e32f6fcbbd42ba67931c695d01f41a46943bb..df9cb7b5fc77b02811e8348c179e929c94244e57 100755 (executable)
@@ -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');
index 7740b3c652ecdc8630c2236b138f3fd76644ba51..6c40532f5b7750d163bf9ef4d4b3715156899d21 100755 (executable)
@@ -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');