more int/float handling
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Mar 2009 16:25:40 +0000 (16:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Mar 2009 16:25:40 +0000 (16:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12423 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js

index 653ed31..62120fe 100644 (file)
@@ -79,7 +79,12 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                     return dojo.date.locale.format(date, {formatLength:'short'});
                 case 'org_unit':
                     return fieldmapper.aou.findOrgUnit(value).shortname();
+                case 'int':
+                case 'float':
+                    if(isNaN(value)) value = 0;
                 default:
+                    if(value === undefined || value === null)
+                        value = '';
                     return value+'';
             }
         },