Roo/bootstrap/Column.js
authorAlan Knowles <alan@roojs.com>
Thu, 12 Feb 2015 04:07:00 +0000 (12:07 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 12 Feb 2015 04:07:00 +0000 (12:07 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 77abe85..300d9ae 100644 (file)
@@ -9,10 +9,10 @@
  * @class Roo.bootstrap.Column
  * @extends Roo.bootstrap.Component
  * Bootstrap Column class
- * @cfg {Number} xs colspan out of 12 for mobile-sized screens or hide
- * @cfg {Number} sm colspan out of 12 for tablet-sized screens or hide
- * @cfg {Number} md colspan out of 12 for computer-sized screens or hide
- * @cfg {Number} lg colspan out of 12 for large computer-sized screens or hide
+ * @cfg {Number} xs colspan out of 12 for mobile-sized screens or 0 for hidden
+ * @cfg {Number} sm colspan out of 12 for tablet-sized screens or 0 for hidden
+ * @cfg {Number} md colspan out of 12 for computer-sized screens or 0 for hidden
+ * @cfg {Number} lg colspan out of 12 for large computer-sized screens or 0 for hidden
  * @cfg {String} html content of column.
  * 
  * @constructor
@@ -44,7 +44,7 @@ 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]) {
+                if (!settings[size]) { // 0 = hidden
                     cfg.cls += 'hidden-' + size;
                     return;
                 }
index 0074cd2..8f758f4 100644 (file)
@@ -770,10 +770,10 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
  * @class Roo.bootstrap.Column
  * @extends Roo.bootstrap.Component
  * Bootstrap Column class
- * @cfg {Number} xs colspan out of 12 for mobile-sized screens or hide
- * @cfg {Number} sm colspan out of 12 for tablet-sized screens or hide
- * @cfg {Number} md colspan out of 12 for computer-sized screens or hide
- * @cfg {Number} lg colspan out of 12 for large computer-sized screens or hide
+ * @cfg {Number} xs colspan out of 12 for mobile-sized screens or 0 for hidden
+ * @cfg {Number} sm colspan out of 12 for tablet-sized screens or 0 for hidden
+ * @cfg {Number} md colspan out of 12 for computer-sized screens or 0 for hidden
+ * @cfg {Number} lg colspan out of 12 for large computer-sized screens or 0 for hidden
  * @cfg {String} html content of column.
  * 
  * @constructor
@@ -787,10 +787,10 @@ Roo.bootstrap.Column = function(config){
 
 Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component,  {
     
-    xs: null,
-    sm: null,
-    md: null,
-    lg: null,
+    xs: false,
+    sm: false,
+    md: false,
+    lg: false,
     html: '',
     offset: 0,
     
@@ -804,8 +804,8 @@ Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component,  {
         
         var settings=this;
         ['xs','sm','md','lg'].map(function(size){
-            if (settings[size]) {
-                if (settings[size] == 'hide') {
+            if (settings[size] !== false) {
+                if (!settings[size]) { // 0 = hidden
                     cfg.cls += 'hidden-' + size;
                     return;
                 }
index a7596cf..9a0ade4 100644 (file)
@@ -20,7 +20,7 @@ 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:null,sm:null,md:null,lg:null,html:'',offset:0,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]){if(B[C]=='hide'){A.cls+='hidden-'+C;return;}
+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,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.html.length){A.html=this.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,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%');}