fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13181]


From: Nelson Guerra
Subject: [Fmsystem-commits] [13181]
Date: Mon, 11 May 2015 23:30:09 +0000

Revision: 13181
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13181
Author:   nelson224
Date:     2015-05-11 23:30:08 +0000 (Mon, 11 May 2015)
Log Message:
-----------


Added Paths:
-----------
    branches/dev-syncromind/property/js/portico/wo_hour.deviation.js

Added: branches/dev-syncromind/property/js/portico/wo_hour.deviation.js
===================================================================
--- branches/dev-syncromind/property/js/portico/wo_hour.deviation.js            
                (rev 0)
+++ branches/dev-syncromind/property/js/portico/wo_hour.deviation.js    
2015-05-11 23:30:08 UTC (rev 13181)
@@ -0,0 +1,27 @@
+
+var intVal = function ( i )
+{
+       return typeof i === 'string' ?
+               i.replace(/[\$,]/g, '')*1 :
+               typeof i === 'number' ?
+                       i : 0;
+};
+
+this.local_DrawCallback1 = function(oTable)
+{
+       var api = oTable.api();
+                       
+       for(i=0;i < columns.length;i++)
+       {
+               if (columns[i]['data'] === 'amount')
+               {
+                       data = api.column( i, { page: 'current'} ).data();
+                       pageTotal = data.length ?
+                               data.reduce(function (a, b){
+                                               return intVal(a) + intVal(b);
+                               }) : 0;
+                       
+                       $(api.column(i).footer()).html("<div 
align=\"right\">"+pageTotal+"</div>");             
+               }
+       }
+};




reply via email to

[Prev in Thread] Current Thread [Next in Thread]