Roo/bootstrap/CheckBox.js
authorAlan Knowles <alan@roojs.com>
Mon, 31 Aug 2015 07:58:11 +0000 (15:58 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 31 Aug 2015 07:58:11 +0000 (15:58 +0800)
Roo/bootstrap/CheckBox.js

index eaf7950..7d9aada 100644 (file)
 Roo.bootstrap.CheckBox = function(config){
     Roo.bootstrap.CheckBox.superclass.constructor.call(this, config);
    
-        this.addEvents({
-            /**
-            * @event check
-            * Fires when the element is checked or unchecked.
-            * @param {Roo.bootstrap.CheckBox} this This input
-            * @param {Boolean} checked The new checked value
-            */
-           check : true
-        });
+    this.addEvents({
+        /**
+        * @event check
+        * Fires when the element is checked or unchecked.
+        * @param {Roo.bootstrap.CheckBox} this This input
+        * @param {Boolean} checked The new checked value
+        */
+       check : true
+    });
 };
 
 Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
@@ -91,6 +91,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         }
         
         var settings=this;
+        
         ['xs','sm','md','lg'].map(function(size){
             if (settings[size]) {
                 cfg.cls += ' col-' + size + '-' + settings[size];
@@ -110,6 +111,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
                 cls : 'input-group',
                 cn :  [] 
             };
+            
             if (this.before) {
                 inputblock.cn.push({
                     tag :'span',
@@ -117,7 +119,9 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
                     html : this.before
                 });
             }
+            
             inputblock.cn.push(input);
+            
             if (this.after) {
                 inputblock.cn.push({
                     tag :'span',
@@ -171,7 +175,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
                 
                 
         }
-         if(this.boxLabel){
+        if(this.boxLabel){
              var boxLabelCfg = {
                 tag: 'label',
                 //'for': id, // box label is handled by onclick - so no for...