</div>
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
- <table id="contact-activity-selector-{$context}">
+ <table class="contact-activity-selector-{$context}">
<thead>
<tr>
<th class='crm-contact-activity-activity_type'>{ts}Type{/ts}</th>
ZeroRecordText += '.';
}
- {/literal}{$context}{literal}oTable = cj('#contact-activity-selector-' + context ).dataTable({
+ {/literal}{$context}{literal}oTable = cj('.contact-activity-selector-' + context ).dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"aaSorting" : [],
}
function setSelectorClass{/literal}{$context}{literal}( context ) {
- cj('#contact-activity-selector-' + context + ' td:last-child').each( function( ) {
+ cj('.contact-activity-selector-' + context + ' td:last-child').each( function( ) {
cj(this).parent().addClass(cj(this).text() );
});
}
<div class="crm-submit-buttons">
<a accesskey="N" href="{crmURL p='civicrm/batch/add' q='reset=1&action=add'}" id="newBatch" class="button"><span><div class="icon add-icon"></div>{ts}New Data Entry Batch{/ts}</span></a><br/>
</div>
-<table id="crm-batch-selector">
+<table class="crm-batch-selector">
<thead>
<tr>
<th class="crm-batch-name">{ts}Batch Name{/ts}</th>
var columns = '';
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/batchlist" h=0 q="snippet=4"}'{literal};
- crmBatchSelector = cj('#crm-batch-selector').dataTable({
+ crmBatchSelector = cj('.crm-batch-selector').dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"aaSorting" : [],
</script>
{/literal}
- <table id="gotvVoterRecords">
+ <table class="gotvVoterRecords">
<thead>
<tr class="columnheader">
<th></th>
var searchVoterFor = {/literal}'{$searchVoterFor}'{literal};
- cj( '#gotvVoterRecords' ).dataTable({
+ cj( '.gotvVoterRecords' ).dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"bProcessing": true,
});
</script>
{/literal}
- <table id="campaigns">
+ <table class="campaigns">
<thead>
<tr class="columnheader">
<th class="hiddenElement">{ts}Campaign ID{/ts}</th>
}
noRecordFoundMsg += searchQill.join('<span class="font-italic"> ...AND... </span></div><div class="qill">');
- cj('#campaigns').dataTable({
+ cj('.campaigns').dataTable({
"bFilter": false,
"bAutoWidth": false,
"bProcessing": false,
</script>
{/literal}
- <table id="petitions">
+ <table class="petitions">
<thead>
<tr class="columnheader">
<th class="hiddenElement">{ts}Petition ID{/ts}</th>
}
noRecordFoundMsg += searchQill.join( '<span class="font-italic"> ...AND... </span></div><div class="qill">' );
- cj( '#petitions' ).dataTable({
+ cj( '.petitions' ).dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"bProcessing": false,
</script>
{/literal}
- <table id="surveys">
+ <table class="surveys">
<thead>
<tr class="columnheader">
<th class="hiddenElement">{ts}Survey ID{/ts}</th>
}
noRecordFoundMsg += searchQill.join( '<span class="font-italic"> ...AND... </span></div><div class="qill">' );
- cj( '#surveys' ).dataTable({
+ cj( '.surveys' ).dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"bProcessing": false,
</script>
</div>
- <table id="voterRecords" class="display crm-copy-fields">
+ <table id="voterRecords-{$instanceId}" class="display crm-copy-fields">
<thead>
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
CRM.$(function($) {
var count = 0; var columns='';
- cj('#voterRecords th').each( function( ) {
+ cj('#voterRecords-{/literal}{$instanceId}{literal} th').each( function( ) {
if ( cj(this).attr('class') == 'contact_details' ) {
columns += '{"sClass": "contact_details"},';
}
eval('columns =[' + columns + ']');
//load jQuery data table.
- cj('#voterRecords').dataTable( {
+ cj('#voterRecords-{/literal}{$instanceId}{literal}').dataTable( {
"sPaginationType": "full_numbers",
"bJQueryUI" : true,
"aoColumns" : columns
{if $searchtype eq 'ts_sel'}
<div id="popupContainer">
- <table id="selectedRecords" class="display crm-copy-fields">
+ <table id="selectedRecords-{$group.id}" class="display crm-copy-fields">
<thead>
<tr class="columnheader">
<th class="contact_details">{ts}Name{/ts}</th>
});
var count = 0; var columns = ''; var sortColumn = '';
- $('#selectedRecords th').each(function() {
+ $('#selectedRecords-{/literal}{$group.id}{literal} th').each(function() {
if ($(this).attr('class') == 'contact_details') {
sortColumn += '[' + count + ', "asc" ],';
columns += '{"sClass": "contact_details"},';
eval('columns =[' + columns + ']');
//load jQuery data table.
- $('#selectedRecords').dataTable( {
+ $('#selectedRecords-{/literal}{$group.id}{literal}').dataTable( {
"sPaginationType": "full_numbers",
"bJQueryUI" : true,
"aaSorting" : sortColumn,
{* relationship selector *}
<div class="crm-contact-relationship-{$context}">
- <table id="crm-contact-relationship-selector-{$context}">
+ <table class="crm-contact-relationship-selector-{$context}">
<thead>
<tr>
<th class='crm-contact-relationship-type'>{ts}Relationship{/ts}</th>
var ZeroRecordText = {/literal}'{ts escape="js"}There are no relationships entered for this contact.{/ts}'{literal};
}
- {/literal}{$context}{literal}oTable = cj('#crm-contact-relationship-selector-' + context).dataTable({
+ {/literal}{$context}{literal}oTable = cj('.crm-contact-relationship-selector-' + context).dataTable({
"bFilter": false,
"bAutoWidth": false,
"aaSorting": [],
<p></p>
<div class="form-item">
{strip}
- <table id="crm-transaction-selector-assign" cellpadding="0" cellspacing="0" border="0">
+ <table id="crm-transaction-selector-assign-{$entityID}" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th class="crm-transaction-checkbox">{if $statusID eq 1}{$form.toggleSelect.html}{/if}</th>
cj("#trans_assign").prop('disabled',true);
cj("#trans_remove").prop('disabled',true);
- cj('#crm-transaction-selector-assign #toggleSelect').click( function() {
+ cj('#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect').click( function() {
enableActions('x');
});
- cj('#crm-transaction-selector-remove #toggleSelects').click( function() {
+ cj('#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects').click( function() {
enableActions('y');
});
cj('#Go').click( function() {
- return selectAction("trans_assign","toggleSelect", "crm-transaction-selector-assign input[id^='mark_x_']");
+ return selectAction("trans_assign","toggleSelect", "crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']");
});
cj('#GoRemove').click( function() {
- return selectAction("trans_remove","toggleSelects", "crm-transaction-selector-remove input[id^='mark_y_']");
+ return selectAction("trans_remove","toggleSelects", "crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']");
});
cj('#Go').click( function() {
if (cj("#trans_assign" ).val() != "" && cj("input[id^='mark_x_']").is(':checked')) {
}
return false;
});
- cj("#crm-transaction-selector-assign input[id^='mark_x_']").click( function() {
+ cj("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").click( function() {
enableActions('x');
});
- cj("#crm-transaction-selector-remove input[id^='mark_y_']").click( function() {
+ cj("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").click( function() {
enableActions('y');
});
- cj("#crm-transaction-selector-assign #toggleSelect").click( function() {
- if (cj("#crm-transaction-selector-assign #toggleSelect").is(':checked')) {
- cj("#crm-transaction-selector-assign input[id^='mark_x_']").prop('checked',true);
+ cj("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect").click( function() {
+ if (cj("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect").is(':checked')) {
+ cj("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").prop('checked',true);
}
else {
- cj("#crm-transaction-selector-assign input[id^='mark_x_']").prop('checked',false);
+ cj("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").prop('checked',false);
}
});
- cj("#crm-transaction-selector-remove #toggleSelects").click( function() {
- if (cj("#crm-transaction-selector-remove #toggleSelects").is(':checked')) {
- cj("#crm-transaction-selector-remove input[id^='mark_y_']").prop('checked',true);
+ cj("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects").click( function() {
+ if (cj("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects").is(':checked')) {
+ cj("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").prop('checked',true);
}
else {
- cj("#crm-transaction-selector-remove input[id^='mark_y_']").prop('checked',false);
+ cj("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").prop('checked',false);
}
});
}
var ZeroRecordText = '<div class="status messages">{/literal}{ts escape="js"}No Contributions found for your search criteria.{/ts}{literal}</li></ul></div>';
}
- crmBatchSelector1 = cj('#crm-transaction-selector-assign').dataTable({
+ crmBatchSelector1 = cj('#crm-transaction-selector-assign-{/literal}{$entityID}{literal}').dataTable({
"bDestroy" : true,
"bFilter" : false,
"bAutoWidth" : false,
var columns = '';
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Financial_Page_AJAX&fnName=getFinancialTransactionsList&snippet=4&context=financialBatch&entityID=$entityID&statusID=$statusID"}'{literal};
- crmBatchSelector = cj('#crm-transaction-selector-remove').dataTable({
+ crmBatchSelector = cj('#crm-transaction-selector-remove-{/literal}{$entityID}{literal}').dataTable({
"bDestroy" : true,
"bFilter" : false,
"bAutoWidth" : false,
</div>
</div>
<div class="form-layout-compressed">{$form.batch_update.html} {$form.submit.html}</div><br/>
-<table id="crm-batch-selector" class="row-highlight">
+<table id="crm-batch-selector-{$batchStatus}" class="row-highlight">
<thead>
<tr>
<th class="crm-batch-checkbox">{$form.toggleSelect.html}</th>
var ZeroRecordText = {/literal}'<div class="status messages">{ts escape="js"}No Accounting Batches match your search criteria.{/ts}</div>'{literal};
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/batchlist" h=0 q="snippet=4&context=financialBatch"}'{literal};
- batchSelector = $('#crm-batch-selector').dataTable({
+ batchSelector = $('#crm-batch-selector-{/literal}{$batchStatus}{literal}').dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"aaSorting" : [],
}
});
checkedRows = [];
- $("#crm-batch-selector input.select-row:checked").each(function() {
+ $("#crm-batch-selector-{/literal}{$batchStatus}{literal} input.select-row:checked").each(function() {
checkedRows.push('#' + $(this).attr('id'));
});
},
return nRow;
},
"fnDrawCallback": function(oSettings) {
- $('.crm-editable', '#crm-batch-selector').crmEditable();
+ $('.crm-editable', '#crm-batch-selector-{/literal}{$batchStatus}{literal}').crmEditable();
$("#toggleSelect").prop('checked', false);
if (checkedRows.length) {
$(checkedRows.join(',')).prop('checked', true).change();
<p></p>
<div class="form-item">
{strip}
- <table id="crm-transaction-selector-remove" cellpadding="0" cellspacing="0" border="0">
+ <table id="crm-transaction-selector-remove-{$entityID}" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th class="crm-transaction-checkbox">{if $statusID eq 1}{$form.toggleSelects.html}{/if}</th>
</table>
</div>
<br/>
-<table id="crm-group-selector">
+<table class="crm-group-selector">
<thead>
<tr>
<th class='crm-group-name'>{ts}Name{/ts}</th>
.on('click', 'a.button, a.action-item[href*="action=update"], a.action-item[href*="action=delete"]', CRM.popup)
.on('crmPopupFormSuccess', 'a.button, a.action-item[href*="action=update"], a.action-item[href*="action=delete"]', function() {
// Refresh datatable when form completes
- $('#crm-group-selector').dataTable().fnDraw();
+ $('.crm-group-selector').dataTable().fnDraw();
});
});
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/grouplist" h=0 q="snippet=4"}'{literal};
var showOrgInfo = {/literal}"{$showOrgInfo}"{literal};
- crmGroupSelector = cj('#crm-group-selector').dataTable({
+ crmGroupSelector = cj('.crm-group-selector').dataTable({
"bFilter" : false,
"bAutoWidth" : false,
"aaSorting" : [],
}
function setSelectorClass( parentsOnly, showOrgInfo ) {
- cj('#crm-group-selector tr').each( function( ) {
+ cj('.crm-group-selector tr').each( function( ) {
var className = cj(this).find('td:last-child').text();
cj(this).addClass( className );
var rowID = cj(this).find('td:nth-child(2)').text();
}
// show hide children
-cj('#crm-group-selector').on( 'click', 'span.show-children', function(){
+cj('.crm-group-selector').on( 'click', 'span.show-children', function(){
var showOrgInfo = {/literal}"{$showOrgInfo}"{literal};
var rowID = cj(this).parents('tr').prop('id');
var parentRow = rowID.split('_');
*}
<div class="crm-mailing-selector">
- <table id="contact-mailing-selector">
+ <table class="contact-mailing-selector">
<thead>
<tr>
<th class='crm-mailing-contact-subject'>{ts}Subject{/ts}</th>
var ZeroRecordText = {/literal}'{ts escape="js"}No mailings found{/ts}.'{literal};
- oTable = $('#contact-mailing-selector').dataTable({
+ oTable = $('.contact-mailing-selector').dataTable({
"bFilter": false,
"bAutoWidth": false,
"aaSorting": [],