jLinux

Untitled

Dec 11th, 2015
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Get the total rows in the table, append it to the SSP result object
  2. function totalRows( test ) {
  3.     var { dtParams, dtResult } = test;
  4.     /*
  5.     var dtParams = test.dtParams,
  6.         dtResult = test.dtResult;
  7.         */
  8.  
  9.     return new Promise( ( resolve, reject ) => {
  10.         SSP.totalRows().then(( result ) => {
  11.             dtResult.recordsTotal = result.dataValues.total_rows;
  12.  
  13.             resolve({ dtParams: dtParams ,dtResult: dtResult} );
  14.         });
  15.     })
  16. }
Advertisement
Add Comment
Please, Sign In to add comment