myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r694524 - /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
Date Thu, 11 Sep 2008 22:29:37 GMT
Author: matzew
Date: Thu Sep 11 15:29:37 2008
New Revision: 694524

URL: http://svn.apache.org/viewvc?rev=694524&view=rev
Log:
some JS rounding

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js?rev=694524&r1=694523&r2=694524&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
Thu Sep 11 15:29:37 2008
@@ -195,7 +195,14 @@
     }
     else
     {
-      return this._numberFormat.format(parseFloat(number.toFixed(this._numberFormat.getMaximumFractionDigits())));
+      if(typeof number === "string")
+      {
+        return this._numberFormat.format(parseFloat(number));
+      }
+      else
+      {
+        return this._numberFormat.format(parseFloat(number.toFixed(this._numberFormat.getMaximumFractionDigits())));
+      }
     }
   }
   else



Mime
View raw message