{else}
<td> </td>
{/if}
+ </tr>
{include file="CRM/Contribute/Form/Search/Common.tpl"}
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
});
CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect").click( function() {
- if (CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect").is(':checked')) {
- CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").prop('checked',true);
- }
- else {
- CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").prop('checked',false);
- }
+ toggleFinancialSelections('#toggleSelect', 'assign');
});
CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects").click( function() {
- if (CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects").is(':checked')) {
- CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").prop('checked',true);
- }
- else {
- CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").prop('checked',false);
- }
+ toggleFinancialSelections('#toggleSelects', 'remove');
});
{/literal}{else}{literal}
buildTransactionSelectorRemove();
}
}
+function toggleFinancialSelections(toggleID, toggleClass) {
+ mark = 'x';
+ if (toggleClass == 'remove') {
+ mark = 'y';
+ }
+ if (CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} " + toggleID).is(':checked')) {
+ CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} input[id^='mark_" + mark + "_']").prop('checked',true);
+ }
+ else {
+ CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} input[id^='mark_" + mark + "_']").prop('checked',false);
+ }
+}
+
function buildTransactionSelectorAssign(filterSearch) {
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¬Present=1&statusID=$statusID"}'{literal};
CRM.$.ajax({
"dataType": 'json',
"type": "POST",
+ 'async': false,
"url": sSource,
"data": aoData,
"success": fnCallback
});
}
});
+toggleFinancialSelections('#toggleSelect', 'assign');
}
function buildTransactionSelectorRemove( ) {
"type": "POST",
"url": sSource,
"data": aoData,
+ 'async': false,
"success": fnCallback
});
}
});
+toggleFinancialSelections('#toggleSelects', 'remove');
}
function selectAction( id, toggleSelectId, checkId ) {