From 483a365906e095040b20118e6bfccc6a9416c11d Mon Sep 17 00:00:00 2001 From: Divya Jose Date: Tue, 20 May 2014 12:37:18 +0530 Subject: [PATCH] --removed the variable context --- templates/CRM/Campaign/Form/Gotv.tpl | 3 +-- templates/CRM/Campaign/Form/Search/Campaign.tpl | 3 +-- templates/CRM/Campaign/Form/Search/Petition.tpl | 11 +++++------ templates/CRM/Campaign/Form/Search/Survey.tpl | 13 ++++++------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/templates/CRM/Campaign/Form/Gotv.tpl b/templates/CRM/Campaign/Form/Gotv.tpl index 932fecf79c..45446c613d 100755 --- a/templates/CRM/Campaign/Form/Gotv.tpl +++ b/templates/CRM/Campaign/Form/Gotv.tpl @@ -120,8 +120,7 @@ function loadVoterList( ) var sourceUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='snippet=4&className=CRM_Campaign_Page_AJAX&fnName=voterList' }"{literal}; var searchVoterFor = {/literal}'{$searchVoterFor}'{literal}; - var $context = CRM.$('form#{/literal}{$form.formName}{literal}'); - CRM.$( 'table.gotvVoterRecords', $context ).dataTable({ + CRM.$( 'table.gotvVoterRecords', 'form#{/literal}{$form.formName}{literal}').dataTable({ "bFilter" : false, "bAutoWidth" : false, "bProcessing": true, diff --git a/templates/CRM/Campaign/Form/Search/Campaign.tpl b/templates/CRM/Campaign/Form/Search/Campaign.tpl index 4b649568c8..0fa3a7f083 100755 --- a/templates/CRM/Campaign/Form/Search/Campaign.tpl +++ b/templates/CRM/Campaign/Form/Search/Campaign.tpl @@ -195,8 +195,7 @@ } } noRecordFoundMsg += searchQill.join(' ...AND...
'); - var $context = CRM.$('#campaignList'); - CRM.$('table.campaigns', $context).dataTable({ + CRM.$('table.campaigns', '#campaignList').dataTable({ "bFilter": false, "bAutoWidth": false, "bProcessing": false, diff --git a/templates/CRM/Campaign/Form/Search/Petition.tpl b/templates/CRM/Campaign/Form/Search/Petition.tpl index 2dd48b7d7c..8781688ed1 100755 --- a/templates/CRM/Campaign/Form/Search/Petition.tpl +++ b/templates/CRM/Campaign/Form/Search/Petition.tpl @@ -166,14 +166,13 @@ function loadPetitionList( ) var count = 0; var searchQill = new Array( ); for ( param in searchParams ) { - if ( val = CRM.$( '#' + param ).val( ) ) { - if ( param == 'petition_campaign_id' ) val = campaigns[val]; - searchQill[count++] = searchParams[param] + ' : ' + val; - } + if ( val = CRM.$( '#' + param ).val( ) ) { + if ( param == 'petition_campaign_id' ) val = campaigns[val]; + searchQill[count++] = searchParams[param] + ' : ' + val; + } } noRecordFoundMsg += searchQill.join( ' ...AND...
' ); - var $context = CRM.$('#petitionList'); - CRM.$( 'table.petitions', $context ).dataTable({ + CRM.$( 'table.petitions', '#petitionList').dataTable({ "bFilter" : false, "bAutoWidth" : false, "bProcessing": false, diff --git a/templates/CRM/Campaign/Form/Search/Survey.tpl b/templates/CRM/Campaign/Form/Search/Survey.tpl index 95ee318ea6..33e58e1816 100755 --- a/templates/CRM/Campaign/Form/Search/Survey.tpl +++ b/templates/CRM/Campaign/Form/Search/Survey.tpl @@ -175,15 +175,14 @@ function loadSurveyList( ) var count = 0; var searchQill = new Array( ); for ( param in searchParams ) { - if ( val = CRM.$( '#' + param ).val( ) ) { - if ( param == 'activity_type_id' ) val = surveyTypes[val]; - if ( param == 'survey_campaign_id' ) val = surveyCampaigns[val]; - searchQill[count++] = searchParams[param] + ' : ' + val; - } + if ( val = CRM.$( '#' + param ).val( ) ) { + if ( param == 'activity_type_id' ) val = surveyTypes[val]; + if ( param == 'survey_campaign_id' ) val = surveyCampaigns[val]; + searchQill[count++] = searchParams[param] + ' : ' + val; + } } noRecordFoundMsg += searchQill.join( ' ...AND...
' ); - var $context = CRM.$('#surveyList'); - CRM.$( 'table.surveys', $context).dataTable({ + CRM.$( 'table.surveys', '#surveyList').dataTable({ "bFilter" : false, "bAutoWidth" : false, "bProcessing": false, -- 2.25.1