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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Feb 23 11:14:46 EST 2009


Author: erickson
Date: 2009-02-23 11:14:44 -0500 (Mon, 23 Feb 2009)
New Revision: 12274

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
treat '' as null only when otherwise not dealt with.. '' == false in checkboxes

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-02-23 06:12:41 UTC (rev 12273)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-02-23 16:14:44 UTC (rev 12274)
@@ -45,17 +45,13 @@
          */
         getFormattedValue : function() {
             var value = this.baseWidgetValue();
-
-            /* text widgets default to "" when no data is entered */
-            if(value == '') return null; 
-
             switch(this.idlField.datatype) {
                 case 'bool':
                     return (value) ? 't' : 'f'
                 case 'timestamp':
                     return dojo.date.stamp.toISOString(value);
                 default:
-                    return value;
+                    return (value == '') ? null : value;
             }
         },
 



More information about the open-ils-commits mailing list