CRM-19485, removed async method since its depricated and called function for toggling...
authorPradeep Nayak <pradpnayak@gmail.com>
Thu, 20 Oct 2016 13:10:58 +0000 (18:40 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Thu, 20 Oct 2016 13:10:58 +0000 (18:40 +0530)
----------------------------------------
* CRM-19485: Selector issue on Batch trxn assignment page
  https://issues.civicrm.org/jira/browse/CRM-19485

templates/CRM/Financial/Form/BatchTransaction.tpl

index 487d16138c24e535c4448da46b3bd5264a524c0e..be8b3f0bda283967bdf1248e6a3e80683c597a2a 100644 (file)
@@ -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 ) {