Config UI scaffold.
authordsc <david.schoonover@gmail.com>
Fri, 17 Dec 2010 12:16:34 +0000 (04:16 -0800)
committerdsc <david.schoonover@gmail.com>
Fri, 17 Dec 2010 12:16:34 +0000 (04:16 -0800)
src/Y/modules/y.scaffold.cjs

index 45a9d5c..75d23d3 100644 (file)
@@ -104,11 +104,15 @@ Y.subclass('Field', {
         }
         if (this.type === 'checkbox')
             el.attr('checked', !!this.val);
+        
         return this;
     },
     
     onChange : function onChange(evt){
-        this.update( this.cast(this.elField.val()) );
+        if (this.type === 'checkbox')
+            this.update( this.elField.attr('checked') );
+        else
+            this.update( this.cast(this.elField.val()) );
     }
     
 })