sync
[roojs1] / Roo / bootstrap / Column.js
1 /*
2  * - LGPL
3  *
4  * column
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.Column
10  * @extends Roo.bootstrap.Component
11  * Bootstrap Column class
12  * @cfg {Number} xs colspan out of 12 for mobile-sized screens
13  * @cfg {Number} sm colspan out of 12 for tablet-sized screens
14  * @cfg {Number} md colspan out of 12 for computer-sized screens
15  * @cfg {Number} lg colspan out of 12 for large computer-sized screens
16  * 
17  * @constructor
18  * Create a new Column
19  * @param {Object} config The config object
20  */
21
22 Roo.bootstrap.Column = function(config){
23     Roo.bootstrap.Column.superclass.constructor.call(this, config);
24 };
25
26 Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component,  {
27     
28     xs: null,
29     sm: null,
30     md: null,
31     lg: null,
32     
33     offset: 0,
34     
35     getAutoCreate : function(){
36         var cfg = Roo.apply({}, Roo.bootstrap.Column.superclass.getAutoCreate.call(this));
37         
38         cfg = {
39             tag: 'div',
40             cls: 'column'
41         }
42         
43         var settings=this;
44         ['xs','sm','md','lg'].map(function(size){
45             if (settings[size]) {
46                 cfg.cls += ' col-' + size + '-' + settings[size];
47             }
48         })
49         
50         return cfg;
51     }
52    
53 });
54
55  
56
57