Roo/bootstrap/Column.js
authorAlan Knowles <alan@roojs.com>
Tue, 3 Mar 2015 05:22:11 +0000 (13:22 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 3 Mar 2015 05:22:11 +0000 (13:22 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/Column.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 86dd786..a6893c9 100644 (file)
@@ -50,9 +50,11 @@ Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component,  {
         
         var settings=this;
         ['xs','sm','md','lg'].map(function(size){
+            Roo.log( size + ':' + settings[size]);
             if (settings[size] === false) {
                 return;
             }
+            Roo.log(settings[size]);
             if (!settings[size]) { // 0 = hidden
                 cfg.cls += ' hidden-' + size;
                 return;
index 5eafe2e..0cde7de 100644 (file)
@@ -811,13 +811,17 @@ Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component,  {
         
         var settings=this;
         ['xs','sm','md','lg'].map(function(size){
-            if (settings[size] !== false) {
-                if (!settings[size]) { // 0 = hidden
-                    cfg.cls += ' hidden-' + size;
-                    return;
-                }
-                cfg.cls += ' col-' + size + '-' + settings[size];
+            Roo.log( size + ':' + settings[size]);
+            if (settings[size] === false) {
+                return;
             }
+            Roo.log(settings[size]);
+            if (!settings[size]) { // 0 = hidden
+                cfg.cls += ' hidden-' + size;
+                return;
+            }
+            cfg.cls += ' col-' + size + '-' + settings[size];
+            
         });
         
         if (this.alert && ["success","info","warning", "danger"].indexOf(this.alert) > -1) {
index 36ca0c0..3824055 100644 (file)
@@ -20,8 +20,9 @@ this.el.enableDisplayMode();},onClick:function(e){if(this.disabled){return;}
 Roo.log('button on click ');if(this.preventDefault){e.preventDefault();}if(this.pressed===true||this.pressed===false){this.pressed=!this.pressed;this.el[this.pressed?'addClass':'removeClass']('active');this.fireEvent('toggle',this,e,this.pressed);}
 this.fireEvent('click',this,e);},enable:function(){this.disabled=false;this.el.removeClass('disabled');},disable:function(){this.disabled=true;this.el.addClass('disabled');},setActive:function(v){this.el[v?'addClass':'removeClass']('active');},toggleActive:function(){var A=this.el.hasClass('active');this.setActive(!A);},setText:function(A){this.el.select('.roo-button-text',true).first().dom.innerHTML=A;},getText:function(){return this.el.select('.roo-button-text',true).first().dom.innerHTML;},hide:function(){this.el.hide();},show:function(){this.el.show();}});
 //Roo/bootstrap/Column.js
-Roo.bootstrap.Column=function(A){Roo.bootstrap.Column.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Column,Roo.bootstrap.Component,{xs:false,sm:false,md:false,lg:false,html:'',offset:0,alert:false,fa:false,icon:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Column.superclass.getAutoCreate.call(this));A={tag:'div',cls:'column'};var B=this;['xs','sm','md','lg'].map(function(C){if(B[C]!==false){if(!B[C]){A.cls+=' hidden-'+C;return;}
-A.cls+=' col-'+C+'-'+B[C];}});if(this.alert&&["success","info","warning","danger"].indexOf(this.alert)>-1){A.cls+=' alert alert-'+this.alert;}if(this.html.length){A.html=this.html;}if(this.fa){A.html='<i class="fa fa-'+this.fa+'"></i>'+(A.html||'');}if(this.icon){A.html='<i class="glyphicon glyphicon-'+this.icon+'"></i>'++(A.html||'')}return A;}});
+Roo.bootstrap.Column=function(A){Roo.bootstrap.Column.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Column,Roo.bootstrap.Component,{xs:false,sm:false,md:false,lg:false,html:'',offset:0,alert:false,fa:false,icon:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Column.superclass.getAutoCreate.call(this));A={tag:'div',cls:'column'};var B=this;['xs','sm','md','lg'].map(function(C){Roo.log(C+':'+B[C]);if(B[C]===false){return;}
+Roo.log(B[C]);if(!B[C]){A.cls+=' hidden-'+C;return;}
+A.cls+=' col-'+C+'-'+B[C];});if(this.alert&&["success","info","warning","danger"].indexOf(this.alert)>-1){A.cls+=' alert alert-'+this.alert;}if(this.html.length){A.html=this.html;}if(this.fa){A.html='<i class="fa fa-'+this.fa+'"></i>'+(A.html||'');}if(this.icon){A.html='<i class="glyphicon glyphicon-'+this.icon+'"></i>'++(A.html||'')}return A;}});
 //Roo/bootstrap/Container.js
 Roo.bootstrap.Container=function(A){Roo.bootstrap.Container.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Container,Roo.bootstrap.Component,{jumbotron:false,well:'',panel:'',header:'',footer:'',sticky:'',tag:false,alert:false,fa:false,icon:false,getChildContainer:function(){if(!this.el){return false;}if(this.panel.length){return this.el.select('.panel-body',true).first();}return this.el;},getAutoCreate:function(){var A={tag:this.tag||'div',html:'',cls:''};if(this.jumbotron){A.cls='jumbotron';}if(this.sticky.length){var bd=Roo.get(document.body);if(!bd.hasClass('bootstrap-sticky')){bd.addClass('bootstrap-sticky');Roo.select('html',true).setStyle('height','100%');}
 A.cls+='bootstrap-sticky-'+this.sticky;}if(this.well.length){switch(this.well){case 'lg':case 'sm':A.cls+=' well well-'+this.well;break;default:A.cls+=' well';break;}}if(this.alert&&["success","info","warning","danger"].indexOf(this.alert)>-1){A.cls+=' alert alert-'+this.alert;}var B=A;if(this.panel.length){A.cls+=' panel panel-'+this.panel;A.cn=[];if(this.header.length){A.cn.push({cls:'panel-heading',cn:[{tag:'h3',cls:'panel-title',html:this.header}]});}