From 160fc6646ae45f50f85e6219bcd4d63502ea795c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 20 Oct 2016 18:40:58 +0530 Subject: [PATCH] CRM-19485, removed async method since its depricated and called function for toggling in success ---------------------------------------- * CRM-19485: Selector issue on Batch trxn assignment page https://issues.civicrm.org/jira/browse/CRM-19485 --- .../CRM/Financial/Form/BatchTransaction.tpl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/templates/CRM/Financial/Form/BatchTransaction.tpl b/templates/CRM/Financial/Form/BatchTransaction.tpl index 487d16138c..be8b3f0bda 100644 --- a/templates/CRM/Financial/Form/BatchTransaction.tpl +++ b/templates/CRM/Financial/Form/BatchTransaction.tpl @@ -164,7 +164,7 @@ function enableActions( type ) { } function toggleFinancialSelections(toggleID, toggleClass) { - mark = 'x'; + var mark = 'x'; if (toggleClass == 'remove') { mark = 'y'; } @@ -242,14 +242,16 @@ function buildTransactionSelectorAssign(filterSearch) { CRM.$.ajax({ "dataType": 'json', "type": "POST", - 'async': false, "url": sSource, "data": aoData, - "success": fnCallback + "success": function(b) { + fnCallback(b); + toggleFinancialSelections('#toggleSelect', 'assign'); + } }); } }); -toggleFinancialSelections('#toggleSelect', 'assign'); + } function buildTransactionSelectorRemove( ) { @@ -301,12 +303,13 @@ function buildTransactionSelectorRemove( ) { "type": "POST", "url": sSource, "data": aoData, - 'async': false, - "success": fnCallback + "success": function(b) { + fnCallback(b); + toggleFinancialSelections('#toggleSelects', 'remove'); + } }); } }); -toggleFinancialSelections('#toggleSelects', 'remove'); } function selectAction( id, toggleSelectId, checkId ) { -- 2.25.1