Roo/bootstrap/CheckBox.js
authorEdward <edward@roojs.com>
Mon, 28 Apr 2014 04:22:24 +0000 (12:22 +0800)
committerEdward <edward@roojs.com>
Mon, 28 Apr 2014 04:22:24 +0000 (12:22 +0800)
Roo/bootstrap/CheckBox.js

index 6d9aae6..43bb1b5 100644 (file)
@@ -45,6 +45,15 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         this.inputEl().on('click', this.onClick,  this);
     },
     
+//    getGroupValue : function()
+//    {
+//        if(typeof(this.inputEl().up('form').child('input[name='+this.inputEl().dom.name+']:checked', true)) == 'undefined'){
+//            return '';
+//        }
+//        
+//        return this.inputEl().up('form').child('input[name='+this.inputEl().dom.name+']:checked', true).value;
+//    },
+    
     onClick : function()
     {
         if(this.inputType != 'checkbox' && this.inputType != 'radio'){
@@ -66,6 +75,15 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         this.inputEl().dom.value = state ? this.value : this.valueOff;
         
     }
+    
+    /**
+     * Returns the normalized data value (undefined or emptyText will be returned as '').  To return the raw value see {@link #getRawValue}.
+     * @return {Mixed} value The field value
+     */
+//    getValue : function(){
+//        return this.getGroupValue();
+//    },
+    
 });