Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-02-03-14-48-25
[civicrm-core.git] / CRM / Campaign / Page / SurveyType.php
index 522713278925322dc1b6b0d03ce31382b4acc9ff..37174e2c67758a7203ea721b4eaa23a74fe45dac 100644 (file)
@@ -117,14 +117,12 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
         ),
         CRM_Core_Action::DISABLE => array(
           'name' => ts('Disable'),
-          'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'enable-disable' . '\' );"',
-          'ref' => 'disable-action',
+          'ref' => 'crm-enable-disable',
           'title' => ts('Disable %1', array(1 => $this->_gName)),
         ),
         CRM_Core_Action::ENABLE => array(
           'name' => ts('Enable'),
-          'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'disable-enable' . '\' );"',
-          'ref' => 'enable-action',
+          'ref' => 'crm-enable-disable',
           'title' => ts('Enable %1', array(1 => $this->_gName)),
         ),
         CRM_Core_Action::DELETE => array(
@@ -157,6 +155,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
    * @static
    */
   function browse() {
+    CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
 
     $campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
     $groupParams    = array('name' => $this->_gName);