[open-ils-commits] r15395 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 28 10:13:30 EST 2010


Author: erickson
Date: 2010-01-28 10:13:28 -0500 (Thu, 28 Jan 2010)
New Revision: 15395

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
do not promote a number widget's value to '0' when the value is null/isNaN.  that's equivalent to assuming the value is 37.  if the value needs to be zero, make it so, otherwise assume non-numeric values should translate to null.  will backport after checking for code that functions based on this assumption

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-01-28 14:06:23 UTC (rev 15394)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-01-28 15:13:28 UTC (rev 15395)
@@ -93,7 +93,7 @@
                 case 'int':
                 case 'float':
                 case 'money':
-                    if(isNaN(value)) value = 0;
+                    if(isNaN(value)) value = null;
                 default:
                     return (value === '') ? null : value;
             }



More information about the open-ils-commits mailing list