Skip to content
Snippets Groups Projects
Commit b9599ed0 authored by colemanw's avatar colemanw
Browse files

CRM-12872 - Add livePage js to search forms

parent cf6519a7
No related branches found
No related tags found
No related merge requests found
......@@ -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);")
......
......@@ -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) {
......
......@@ -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',
......
......@@ -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');
......
......@@ -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',
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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);"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment