From b9599ed03f3bba636447757f23071c17707b8536 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 8 Jan 2014 15:27:06 -0800 Subject: [PATCH] CRM-12872 - Add livePage js to search forms --- CRM/Activity/Form/Search.php | 1 + CRM/Campaign/Form/Search.php | 1 + CRM/Case/Form/Search.php | 2 +- CRM/Contact/Form/Search.php | 7 ++++--- CRM/Event/Form/Search.php | 1 + CRM/Grant/Form/Search.php | 1 + CRM/Member/Form/Search.php | 1 + CRM/Pledge/Form/Search.php | 2 +- 8 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CRM/Activity/Form/Search.php b/CRM/Activity/Form/Search.php index 2c3cd9946d..fbc77f0ece 100644 --- a/CRM/Activity/Form/Search.php +++ b/CRM/Activity/Form/Search.php @@ -243,6 +243,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form { $rows = $this->get('rows'); if (is_array($rows)) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onclick' => "toggleTaskAction( true ); return toggleCheckboxVals('mark_x_',this);") diff --git a/CRM/Campaign/Form/Search.php b/CRM/Campaign/Form/Search.php index ff7089ff47..9ffa03d362 100755 --- a/CRM/Campaign/Form/Search.php +++ b/CRM/Campaign/Form/Search.php @@ -268,6 +268,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form { $rows = $this->get('rows'); if (is_array($rows)) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onclick' => "toggleTaskAction( true ); return toggleCheckboxVals('mark_x_',this);")); foreach ($rows as $row) { diff --git a/CRM/Case/Form/Search.php b/CRM/Case/Form/Search.php index 7e786fa4d9..5d96464c41 100644 --- a/CRM/Case/Form/Search.php +++ b/CRM/Case/Form/Search.php @@ -253,7 +253,7 @@ class CRM_Case_Form_Search extends CRM_Core_Form { */ $rows = $this->get('rows'); if (is_array($rows)) { - + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index adb3c512ef..43d2de41a4 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -379,6 +379,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form { * @return void */ function buildQuickForm() { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $permission = CRM_Core_Permission::getPermission(); // some tasks.. what do we want to do with the selected contacts ? $tasks = array('' => ts('- actions -')); @@ -524,9 +525,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form { $this->assign('ts_all_id', $allRowsRadio->_attributes['id']); /* - * add form checkboxes for each row. This is needed out here to conform to QF protocol - * of all elements being declared in builQuickForm - */ + * add form checkboxes for each row. This is needed out here to conform to QF protocol + * of all elements being declared in builQuickForm + */ $rows = $this->get('rows'); diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index c3bb589971..75c41f9dbb 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -243,6 +243,7 @@ class CRM_Event_Form_Search extends CRM_Core_Form { */ $rows = $this->get('rows'); if (is_array($rows)) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $lineItems = $eventIds = array(); if (!$this->_single) { $this->addElement('checkbox', diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 95f0cd8dea..6e207fea2b 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -237,6 +237,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form { $rows = $this->get('rows'); if (is_array($rows)) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onchange' => "toggleTaskAction( true ); return toggleCheckboxVals('mark_x_',this);")); foreach ($rows as $row) { diff --git a/CRM/Member/Form/Search.php b/CRM/Member/Form/Search.php index 747ad25d0a..e0bfebc3f5 100644 --- a/CRM/Member/Form/Search.php +++ b/CRM/Member/Form/Search.php @@ -233,6 +233,7 @@ class CRM_Member_Form_Search extends CRM_Core_Form { $rows = $this->get('rows'); if (is_array($rows)) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onclick' => "toggleTaskAction( true ); return toggleCheckboxVals('mark_x_',this);")); foreach ($rows as $row) { diff --git a/CRM/Pledge/Form/Search.php b/CRM/Pledge/Form/Search.php index d07a3a5f94..d81bf2f98c 100644 --- a/CRM/Pledge/Form/Search.php +++ b/CRM/Pledge/Form/Search.php @@ -231,7 +231,7 @@ class CRM_Pledge_Form_Search extends CRM_Core_Form { */ $rows = $this->get('rows'); if (is_array($rows)) { - + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); if (!$this->_single) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('onclick' => "toggleTaskAction( true ); return toggleCheckboxVals('mark_x_',this);")); -- 2.25.1