[open-ils-commits] r15396 - 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:22:15 EST 2010


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

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
when getDisplayString() is called without ever having built a true widget, the code needs to be prepared to deal with raw values.  in this case, 't' and 'f' are valid values for bool fields

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-01-28 15:13:28 UTC (rev 15395)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-01-28 15:22:13 UTC (rev 15396)
@@ -113,8 +113,12 @@
             switch(this.idlField.datatype) {
                 case 'bool':
                     switch(value) {
-                        case 'true': return openils.widget.AutoFieldWidget.localeStrings.TRUE; 
-                        case 'false' : return openils.widget.AutoFieldWidget.localeStrings.FALSE;
+                        case 't': 
+                        case 'true': 
+                            return openils.widget.AutoFieldWidget.localeStrings.TRUE; 
+                        case 'f' : 
+                        case 'false' : 
+                            return openils.widget.AutoFieldWidget.localeStrings.FALSE;
                         case 'unset' : return openils.widget.AutoFieldWidget.localeStrings.UNSET;
                         case true : return openils.widget.AutoFieldWidget.localeStrings.TRUE; 
                         default: return openils.widget.AutoFieldWidget.localeStrings.FALSE;



More information about the open-ils-commits mailing list